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:

  • Quickly transferring a route, road alignment, or other linear features from a drawing to a map.
  • Situations where specialized GIS software is unavailable.
  • Cases where the DXF file’s coordinate system is unknown (the app uses georeferencing via reference points).


❌ Not suitable if:

  • The drawing contains arc segments (GPX does not support them).
  • The DXF file’s exact coordinate system is known (desktop tools like QGIS or AutoCAD Map 3D are more efficient).

 

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).

 

georeferencing method
georeferencing method: We move the first point, scale the second point. The points should be as far apart from each other as possible.

Brief Overview of the Process

  1. Find the coordinates of two reference points on the terrain using Google Maps.
  2. In the DXF drawing, identify these same two points, create a polyline between them, and note its length and the vertex numbers of these points.
  3. Load the DXF file into the Alignment tracking app.
  4. Enter the coordinates from Google Maps, selecting the corresponding vertex numbers from the list.

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).

  1. Open the drawing and select the polylines you want to convert. Important: Polylines must not contain arc segments, as the GPX format does not support them.
  2. Use the _Wblock command to save the selected objects into a new DXF file.
  3. Transfer the created DXF file to your phone.

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.

 

the main menu of the application

Step 2: Identifying Reference Points

Before creating the DXF file, define a base polyline in the drawing (e.g., the centerline of a road).

  1. Select two vertices of this polyline for which you can determine real-world coordinates on the terrain (in the WGS84 system). Recommendation: For better accuracy, choose vertices that are as far apart as possible.
  2. Note the numbers of these vertices and the length of the base polyline (this information will be needed in the app).
  3. 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).

  1. 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.

DXF - Lat, Lon

 

    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).

list of polylines

 

  • 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).

 

correct coordinates

 

 

    4. Specify the approximate elevation of the area above sea level (e.g., 150 m).

 

Step 4: Verification and Export to GPX

  1. Press the Calculate DXF button. The app will compare the distance between the coordinates in the DXF file and the entered GPS coordinates.
  • 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.

The delta is more than a meter, so there will be no calculation in the GPX file

 

    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

Now the delta is less than a meter, click the button and the file will automatically appear in the Download folder.

 

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.