Google Earth KMZ to DXF in D96/TM: worked example
A site investigation plan drawn in Google Earth converted to a DXF in EPSG:3794, step by step with screenshots, with a hand check of a length and an area against the grid scale factor.
Open this example in the tool Download the sample KMZ below and choose it in the tool.
Problem
The site investigation was planned in Google Earth: a plot boundary, four boreholes and the access road, each in its own folder. The drilling contractor needs the borehole coordinates in D96/TM, and the site plan is drawn in CAD. How do you get the KMZ into a DXF on the national grid, and do the lengths and areas stay right?
| Sample file | site_investigation.kmz (our own example: plot, BH-1 to BH-4, access road) |
| Folders | Site boundary (polygon), Boreholes (4 placemarks), Access road (path) |
| Target CRS | EPSG:3794, Slovenia 1996 / Slovene National Grid (D96/TM) |
1. Save the KMZ from Google Earth
In Google Earth Pro, put the placemarks, paths and polygons of one kind in a folder, right-click the parent folder and choose Save Place As, type KMZ. In Google Earth on the web, use Export as KML file on the project. The folder names become the DXF layers, so name them as you want the layers to be called. KML always stores longitude and latitude in WGS 84, with as many decimals as Google Earth writes, here 8 (about 1 mm).
2. Convert it in the tool
Choose the file, enter EPSG:3794 as the target CRS and name as the point label attribute,
so each borehole gets its name as a text next to it.
3. The drawing
The boreholes are POINT entities with a TEXT label, the plot a closed polyline and the road an open one, each on the layer named after its folder. The line colours of the KML styles are kept. The placemark name and description go into XDATA. Unlike the OSM converter, this tool writes full national grid coordinates, with no local origin, so BH-1 is at (461 430.000, 101 590.000) and can be read off directly for the contractor.
4. Check of a length
The south side of the plot runs from 14.50143204° E, 46.05293135° N to 14.50227103° E, 46.05304298° N. On the GRS80 ellipsoid at the mean latitude (a = 6 378 137 m, e² = 0.00669438):
D96/TM shrinks lengths by its scale factor, which depends on the distance from the central meridian, here x = −38 548 m:
In the DXF the side runs from (461 420.000, 101 580.000) to (461 485.000, 101 592.000): √(65² + 12²) = 66.098 m.
5. Check of the area
By the shoelace formula on the four DXF corners (461 420, 101 580), (461 485, 101 592), (461 478, 101 634), (461 413, 101 622):
The ground area is what Google Earth shows for the polygon (on its own Earth model it may differ in the last digit). Over 2800 m² the difference is 0.5 m², 0.016 %. It matters for a land survey or a quantity take-off over a large area, not for a site plan.
Result in the tool
| Hand calculation | Tool (DXF) | Difference | |
|---|---|---|---|
| South side of the plot, grid | 66.098 m | 66.098 m | 0 |
| Plot area, grid | 2814.0 m² | 2814.0 m² | 0 |
| Plot area, ground | 2814.5 m² | – | |
| Layers | 3 folders | Boreholes, Site boundary, Access road |
Your own case
- Google Earth imagery can be shifted by a few metres against the national grid, especially in hilly terrain. The conversion is exact, but the points are only as good as where they were clicked. Set out boreholes from surveyed coordinates when the position matters.
- For a borehole list instead of a drawing, use the KMZ to coordinates tab of the Coordinates tool, which gives a table to paste into Excel.
- The way back is the DXF to KMZ tool: draw in CAD, then show the drawing on Google Earth.
- Outside Slovenia enter your national grid or a UTM zone, for example EPSG:32633 for UTM 33N or EPSG:3763 for Portugal (PT-TM06).
References
- Open Geospatial Consortium (2008). OGC KML 2.2, document 07-147r2.
- EPSG Geodetic Parameter Dataset, EPSG:3794 Slovenia 1996 / Slovene National Grid.
- Snyder, J.P. (1987). Map Projections: A Working Manual. U.S. Geological Survey Professional Paper 1395, chapter 8 (transverse Mercator).
Worked example by Martin Hostnik, updated 2026-11-21. Results are for checking and preliminary design; verify them for your project. Questions or a correction: [email protected].