Import Markers, Lines, and Surfaces from QGIS
🎯 Objective
GEO4X allows you to import vector layers (points, lines, polygons) in KML or GeoJSON format.
To visualize your data in both 2D and 3D, these files must contain altitude (Z) information.
This guide will help users export their data from QGIS to GEO4X.
🧰 Requirements
- QGIS installed (latest version recommended)
- A Digital Terrain Model (DTM) or Digital Surface Model (DSM) loaded in QGIS
- Your vector data (points, lines, or polygons)
- GEO4X ready to receive
.kml
or.geojson
files
🗺️ Step-by-Step Guide
1. Open Your QGIS Project
- Launch QGIS
- Load your project containing the DTM/DSM and your vector layers
⚠️ Without a Digital Elevation or Terrain Model, you can still import your data into the 2D scene, but not into the 3D scene.
2. Add Altitude to Your Data (Z Dimension)
For your vectors to display correctly in 3D within GEO4X, you must add altitude (Z values).
👉 Steps to interpolate altitude from a DTM:
-
Make sure your raster layer (DTM) is loaded.
-
In the Processing Toolbox ⚙️ (Ctrl + Alt + T):
Use the tool: Drape (Set Z value from raster)
-
In the dialog window:
- Input layer: select your vector layer
- Raster to sample: select your DTM
- Draped layer: name your temporary layer
- Click Run
-
A new temporary layer is created, containing the altitude values in its attribute table (extracted from the DTM).
💡 For polygons, altitudes are draped onto the vertices that form the polygon boundaries.
3. Export to KML or GeoJSON with Z Dimension
- Right-click the temporary layer you created with Z values >
Export
>Save Features As…
- Choose:
- Format:
KML
orGeoJSON
- File name: give it a clear name
- CRS (Coordinate Reference System): select
EPSG:4326
(WGS 84), compatible with GEO4X
- Format:
- Important:
- Check "Include Z dimension (3D)" if available (depends on QGIS version)
- Do not simplify geometry
- Leave other settings as default
- Click OK / Save
4. Verify in GEO4X
- Open GEO4X
- Import your
.kml
or.geojson
file - Check the display in both 2D and 3D (entities should be correctly positioned in height if Z values were added properly).