Stadiamark · Alignment Tracking

DXF to GPX, in the field

Turn a CAD drawing into a GPX route on your phone — no computer, no GIS software, even when the drawing's coordinate system is unknown.

Convert DXF/DWG drawings to GPX for viewing in navigation apps — Organic Maps, Maps.me, Google Earth — directly on site.

Ideal for

  • Getting a route, road alignment or other linear feature off a drawing and onto a map fast.
  • Situations where GIS software isn't available.
  • Drawings whose coordinate system is unknown — the app georeferences from two reference points.

Not suitable if

  • The drawing contains arc segments — GPX doesn't support them.
  • The DXF's exact coordinate system is known — QGIS or AutoCAD Map 3D will be quicker.
If you know the coordinate system, use it. Online calculators or desktop software will be easier. This app uses georeferencing: it matches two reference points from the drawing to real GPS coordinates in WGS84.
The georeferencing method: matching drawing points to real-world coordinates
Georeferencing — two points tie the drawing to the world
Animation: move the first point, then scale and rotate the drawing onto the second
Move the first point, then scale and rotate onto the second
Overview

The process in brief

  1. Find the coordinates of two reference points on the ground using Google Maps.
  2. In the drawing, identify those same two points, draw a polyline between them, and note its length and the vertex numbers.
  3. Load the DXF into Alignment Tracking.
  4. Enter the Google Maps coordinates, choosing the matching vertex numbers from the list.

The app checks the entered data; if it's consistent, it writes a GPX file into the Download folder automatically.

Convert DXF to GPX — the whole feature on video
Step by step
1

Prepare the DXF drawing

Assume a DWG in AutoCAD (other software works the same way, only the command names differ).

  • Open the drawing and select the polylines to convert. They must contain no arc segments — GPX has no way to store them.
  • Use _Wblock to save the selection into a new DXF file.
  • Copy the DXF to your phone.
Test file. To practise, use brest2.dxf. In the app choose Open Files, then find and load it.
The main menu of the app with the Open Files option
The app's main menu — Open Files
2

Identify the reference points

Before creating the DXF, define a base polyline in the drawing — the centreline of a road, say.

  • Pick two of its vertices whose real-world WGS84 coordinates you can determine. The further apart they are, the better the accuracy.
  • Note the vertex numbers and the length of the base polyline — you'll enter both in the app.
  • Run _Wblock, create the DXF, and transfer it to the phone.
3

Enter the coordinates

Find the real-world coordinates of the two points with Google Maps (or another service, such as Bing Maps).

  1. Locate the first point (point 1′ in the example), right-click and copy its latitude and longitude. Here 1′ is vertex #6 of the base polyline.
  2. Do the same for the second point (2′), which is vertex #50.
  3. In the app, load the DXF. If the DXF working window opens, the file is valid.
  4. Use the |▼| button to pick the base polyline from the list — recognise it by its length (5450.8) and vertex count (e.g. 52).
  5. Enter the first point (#6) into latitude_B1 / longitude_L1.
  6. Enter the second point (#50) into latitude_B2 / longitude_L2.
  7. Give the approximate elevation of the area (e.g. 150 m).
Vertex numbers go in ascending order. The smaller number first (#6 → B1/L1), then the larger (#50 → B2/L2).
Reading a vertex position as latitude and longitude from the DXF
DXF vertex → latitude, longitude
Choosing the base polyline from the list of polylines in the app
Selecting the base polyline
4

Verify the delta and export

Press Calculate DXF. The app compares the distance between the two vertices in the DXF with the distance between the GPS coordinates you entered. The difference — the delta — must be under one metre.

Worked example. In the DXF the distance between #6 and #50 is 5085.26 m; between the entered coordinates it is 5086.65 m. Delta = 5085.26 − 5086.65 = −1.38 m, too large. Editing the sixth decimal place of a coordinate shifts the distance by about 10 cm, so a few small corrections bring the delta under a metre.
Entered coordinates for vertices 6 and 50 in the app
Coordinates entered for #6 and #50
The delta is more than a metre, so no GPX is produced yet
Delta over a metre — not yet
The delta is now under a metre; pressing the button writes the GPX
Delta under a metre — press to write the GPX

Enter the coordinates to six decimal places to pull the delta below a metre. Once it's in range the Calculate DXF button stops being red — press it again and the GPX is written to Download. The app then switches to its normal mode, showing station (chainage) and your offset from the base route.

Convert in the browser

DXF → GPX, right here

The same arithmetic the app runs, entirely in your browser. Load the .dxf, pick a polyline and its two reference vertices, and enter their WGS84 coordinates. The calculator projects every vertex onto the ellipsoid by the base-line method and lets you download the result as GPX or KML — named after your DXF. Set the plane height for high-altitude work, and switch distances to feet if you prefer.

Your file never leaves your device. The DXF is read and all the projection maths run locally in your browser — nothing is uploaded to any server, so the drawing stays private.
Coordinate format:
raise it for high-altitude surveys
Reference point coordinates (WGS84) — these two vertices define the base line
Point 1 (#6) — lat B1
Point 1 (#6) — lon L1
Point 2 (#50) — lat B2
Point 2 (#50) — lon L2
GPS distance (Vincenty, WGS84): —
DXF distance — from the drawing
Or enter plane coordinates X, Y by hand
DXF distance (√(ΔX²+ΔY²)): —
Delta: —
Accuracy & limits

How far the base line can stretch

The method treats the DXF as a flat plane laid tangent to the ellipsoid at the base line. Because the Earth curves away from that plane, a small error grows with the cube of the distance between the two reference points. It stays negligible for ordinary site work and only matters over very long baselines.

Rule of thumb. The projection error reaches about 1 metre when the two WGS84 reference points are roughly 337 km apart. Keep them closer than 20 km and the error drops below 1 mm. Since the error scales with the cube of the baseline, halving the distance cuts the error to an eighth.

The 337 km figure comes from where the curvature term reaches one metre: L ≈ (24 · 4.059·10¹³)^(1/3) ≈ (9.7416·10¹⁴)^(1/3) ≈ 3.37·10⁵ m = 337 km. In practice, put the two reference points at opposite ends of your drawing but within a few kilometres of each other and the projection is effectively exact.

Notes

Common mistakes

  • Don't use arc segments in polylines — GPX can't represent them, and the conversion will fail.
  • If the delta won't come down, recheck the coordinates in Google Maps. Where you can, read them from your phone's GPS sensor on the ground rather than from the map — it's more accurate.
In short. This brings a drawing to life in a navigation app without any GIS tooling. Get the two reference points right, check the delta, and you have a route to follow.
Get the app

Liked this? The app does much more

This page converts a DXF. The Alignment Tracking app does the same conversion and then some — guiding you along the alignment with live station and offset, monitoring utility networks, and more. All of it runs on the phone in the field, with no PC and no internet connection required.

stadiamark.almagest.name →

QR code to the Alignment Tracking app on Google Play Scan for Google Play