DXF to GPX Conversion Feature in the Alignment tracking App
Purpose:
Convert DXF/DWG drawings to GPX format for viewing in navigation apps (Maps.me, Organic Maps, Google Earth) directly in the field—no computer required.
When to Use?
✅ Ideal for:
❌ Not suitable if:
Important Note: If you know the coordinate system of your drawing, it might be easier to use specialized services (online calculators or PC software). The Alignment tracking app uses a georeferencing method (Georeferencing), which relies on matching two reference points from the DXF drawing with real GPS coordinates (WGS84).
Brief Overview of the Process
The app will verify the correctness of the entered data, and if everything is correct, it will automatically create a GPX file in the Downloads folder.
For those who prefer visual instructions, I’ve prepared a video tutorial of the feature on YouTube. If you’re ready for a detailed description, I’ve broken the process into 4 simple steps.
Step-by-Step Instructions
Step 1: Preparing the DXF Drawing
Let’s assume you have a drawing in DWG format and are working in AutoCAD (if you’re using other software, the command names may differ, but the logic remains the same).
For training purposes, I’ve prepared a test file, brest2.dxf. In the app, select the "Open Files" menu option, then find and load brest2.dxf.
Step 2: Identifying Reference Points
Before creating the DXF file, define a base polyline in the drawing (e.g., the centerline of a road).
Execute the _Wblock command, create the DXF file, and transfer it to your phone.
Step 3: Entering Coordinates in the App
Now, find the real-world coordinates of the selected points using Google Maps (or another service, such as Bing Maps).
Open Google Maps and locate the first point (e.g., point 1’ on the drawing). Copy its coordinates (latitude and longitude in WGS84 format) by right-clicking.In my example, point 1’ corresponds to vertex #6 of the base polyline.
2. Similarly, find the coordinates for the second point (e.g., point 2’, which corresponds to vertex #50).
3. In the Alignment tracking app:
Load the DXF file. If a specialized window for working with DXF opens, the file is valid.
Use the |▼| button to select the base polyline from the list (orient yourself by its length(5450.8) and number of vertices, e.g., 52).
Enter the coordinates of the first point (vertex #6) into the latitude_B1 and longitude_L1 fields.
Enter the coordinates of the second point (vertex #50) into the latitude_B2 and longitude_L2 fields. Important: Vertex numbers must be entered in ascending order: first the smaller number (#6 for B1, L1), then the larger one (#50 for B2, L2).
4. Specify the approximate elevation of the area above sea level (e.g., 150 m).
Step 4: Verification and Export to GPX
The difference (delta) between these distances should be less than 1 meter.
If the delta is larger (e.g., -1.38 m, as in my example), adjust the coordinates manually. Changing the sixth decimal place alters the distance by approximately 4 inches (10 cm).
In the example: the distance between vertices #6 and #50 in the DXF is 5085.26 m, while the distance between the entered coordinates is 5086.65 m.
Delta: 5085.26 - 5086.65 = -1.38 m.
2. Enter the coordinates with a precision of 6 decimal places to reduce the delta to less than 1 meter.
3. Once the delta is within the acceptable range, the Calculate DXF button will no longer be red. Press it again—the app will create a GPX file, which will be automatically saved in the Download folder.
4. After this, the app will switch to its normal mode, displaying chainage(Station) and your position offset relative to the base route
Summary
This feature lets you quickly bring a drawing to life in a navigation app, even without complex GIS tools. Just ensure your reference points are correct and verify the delta!
Common Mistakes and How to Avoid Them
Do not use arc segments in polylines—GPX does not support them.
If the delta doesn’t decrease, double-check the accuracy of the coordinates in Google Maps. For better accuracy, use your phone’s GPS sensor instead of Google Maps, if possible.