Short answer: DXF for CAD, GeoPackage for GIS, GeoJSON for the web. And whatever the format, pick a coordinate system in metres before you export. That one setting decides whether your contour lines land on the site plan or as a speck near the origin, far from everything else in the drawing.
This guide explains what each format is good at, which coordinate system to choose, and what is inside the files TopoLines writes, layer by layer and field by field. If you design posters or cut wood, you want SVG instead: contour map SVG covers that side.
The three formats at a glance
| DXF | GeoPackage | GeoJSON | |
|---|---|---|---|
| Made for | CAD | GIS | Web and scripts |
| Opens in | AutoCAD, Civil 3D, Rhino, SketchUp Pro, QGIS | QGIS, ArcGIS Pro, GDAL | QGIS, Leaflet, Mapbox, D3, Python |
| Elevation | Z on every vertex | Z on every vertex, plus an elevation column | elevation property |
| Line type | One layer per type | type column | type property |
| Coordinate system stored | No | Yes | Yes (legacy crs member) |
| One file, several layers | Yes | Yes | No, one collection |
All three hold the same traced lines. The difference is how each program expects to read them.
DXF: for AutoCAD, Civil 3D, Rhino and SketchUp
DXF is the file every CAD program agrees on. TopoLines writes it as AutoCAD R12, the oldest and most widely read version. We tried a lighter hand-written DXF first: lenient readers opened it, strict ones refused it. R12 opens everywhere.
Each contour is a 3D polyline, with its elevation as the Z of every vertex. Orbit the view and the terrain stands up. Civil 3D can build a surface from it directly.
The line types sit on separate layers, so you can freeze or restyle each one:
CONTOUR_INDEX: the index contours, every Nth line as set in the editor (orange)CONTOUR_INTERMEDIATE: the lines in between (grey)CONTOUR_AUXILIARY: half-interval lines on flat ground, if you added themCOASTLINE: the sea edge, at Z = 0RIVERS,CITIES,PEAKS,SUMMITS,POIandLABELS, if you added annotations

What DXF can’t hold is an attribute table. The elevation lives in the Z value, the type in the layer name. That’s enough for CAD. In GIS it’s awkward, which is why GeoPackage exists.
Step-by-step pages for each program: AutoCAD and Civil 3D, SketchUp, Rhino and Grasshopper.
GeoPackage: for QGIS and ArcGIS Pro
GeoPackage is the OGC standard GIS file: a single file that holds several layers and stores its own coordinate system. Drop it into QGIS or ArcGIS Pro and it lands in the right place, with no prompt.
A TopoLines GeoPackage contains:
contours: 3D lines, withelevation(in metres),type(index,intermediate,auxiliaryorcoastline) anddepression(1 when the line rings a hollow rather than a hill)annotations: cities, peaks, summits and points of interest as points, withkindandname, when you added themrivers: river lines with their name, when you added themtopolines_metadata: where the file comes from (elevation source and its credit, contour interval, coordinate system)
Because elevation is a real column, the usual GIS moves work right away:
label lines with elevation, style them by type, filter out everything
below 500 m, compute a length per band.
Need a Shapefile for an older workflow? In QGIS, right-click the contours
layer, then Export › Save Features As. Or with GDAL:
ogr2ogr -f "ESRI Shapefile" contours.shp export.gpkg contours
The field names (elevation, type, depression) are 10 characters or
fewer, so they survive the Shapefile limit intact.
GeoJSON: for the web and for code
GeoJSON is plain text. You can read it, diff it, load it in Leaflet, Mapbox GL
or D3 with one line, or open it in Python with json. Each line carries its
elevation and type as properties, and a metadata block at the top gives
the source, interval and coordinate system.
One rule to know: the GeoJSON standard (RFC 7946) expects longitude and
latitude in WGS 84. QGIS reads the legacy crs member that TopoLines writes,
so a GeoJSON in Lambert-93 or UTM still lands in the right place there. Web
libraries ignore it and assume lon/lat. For a web map, keep GeoJSON in WGS
84. For anything else, GeoPackage is the safer choice.

Pick the coordinate system before you export
This is where most imports go wrong. Every vector export in TopoLines has a Coordinate system setting:
| Option | Unit | Use it for |
|---|---|---|
| WGS 84, lon/lat (EPSG:4326) | degrees | Web maps, GeoJSON, quick checks |
| RGF93 / Lambert-93 (EPSG:2154) | metres | Mainland France |
| British National Grid (EPSG:27700) | metres | Great Britain |
| WGS 84 / UTM, auto zone | metres | Anywhere else |
| Web Mercator (EPSG:3857) | “metres” | Matching web tiles only |
For CAD, never stay in lon/lat. The X and Y are then in degrees while Z is in metres. One degree of latitude is about 111 km, so in a 3D view the terrain becomes a needle, and every distance you measure is wrong.
UTM, auto zone picks the UTM zone under the centre of your area (for example WGS 84 / UTM zone 31N). It works anywhere on Earth, in metres, with little distortion across a site.
Avoid Web Mercator for measuring. Its units look like metres but grow with latitude: at 45° north, 100 m on the ground measures about 141 units. Use it only to line up with web map tiles.
If your project uses a national grid that isn’t in the list, export in UTM
and reproject in QGIS or with ogr2ogr -t_srs. The coordinates are
already in metres, so the step is clean.
What’s in the file, and what isn’t
In the file:
- the contour lines of your zone, at the interval you chose (5 to 100 m)
- the elevation on every line, and its type
- annotations and rivers, if you added them in the editor
- where the elevation comes from, and its credit
Coordinates are rounded to the millimetre in DXF, the centimetre in GeoJSON and GeoPackage, or about 10 cm in lon/lat. That’s far below the precision of the data.
Not in the file:
- No styling. Colours, line weights and gradients belong to PNG and SVG. DXF layers get plain default colours, GIS formats none at all.
- No elevation grid. You get the lines, not the DEM. To get a surface, build it from the contours (Civil 3D, Rhino and SketchUp all can).
- No Points rendering. In Points mode, vector exports still contain the contour lines. The dots are a picture of the terrain, not data.
How accurate are the lines?
As accurate as the elevation data under them. In HD, TopoLines picks the best national model for your zone automatically, down to 1 m on small zones (0.5 m in Switzerland). Standard, and HD where no national model covers the zone, use the worldwide 30 m GEDTM30. The lines are smoothed and simplified, so they read like a map rather than a staircase.
That’s plenty for a site study, a concept design, a landscape plan or a 3D massing model. It is not a survey. For a building permit, earthworks or a legal boundary, hire a surveyor. Their points are what the contours should be checked against.
If you already have survey-grade elevation, upload your own GeoTIFF and trace it the same way: see DEM to contour lines.
How to export
- Open the contour map generator and draw your zone.
- Set the interval. How to choose a contour interval helps.
- Turn on index contours if you want the
indextype (and layer). - In Export, pick DXF, GeoPackage or GeoJSON, then the Coordinate system.
- Download.
Vector exports are part of Pro and cost the same credits as any paid export, by area (up to 500 km² per zone). Details on the exports and plans page.
FAQ
Which format should I use for AutoCAD? DXF, in a coordinate system in metres: Lambert-93 in France, British National Grid in Great Britain, UTM anywhere else. Contours arrive as 3D polylines, one layer per type.
Can I get contour lines as a Shapefile?
Export a GeoPackage, then save the contours layer as a Shapefile in QGIS
(Export › Save Features As) or with ogr2ogr. The fields keep their names.
Why do my contour lines appear in the wrong place in CAD? Almost always the coordinate system. A file in WGS 84 lon/lat has X and Y in degrees, which CAD reads as tiny numbers near the origin. Export again in UTM or your national grid.
Do the files carry the elevation of each line?
Yes, in all three. DXF stores it as the Z of each vertex. GeoPackage stores it
as Z and as an elevation column. GeoJSON stores it as an elevation
property.
Is a GeoJSON in UTM valid?
Recent GeoJSON (RFC 7946) only allows WGS 84 lon/lat. TopoLines writes the
older crs member so QGIS and GDAL still read a projected file correctly,
but web libraries won’t. Keep GeoJSON in WGS 84 for the web, and use
GeoPackage for projected data.
Can I import the contours into QGIS without any setup?
Yes. GeoPackage stores its coordinate system, so it lands in place. Label
with the elevation field and style by type. If you’d rather trace
contours inside QGIS itself, see
how to make contour lines in QGIS.
