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 filesite_investigation.kmz (our own example: plot, BH-1 to BH-4, access road)
FoldersSite boundary (polygon), Boreholes (4 placemarks), Access road (path)
Target CRSEPSG: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.

KMZ to DXF tool with site_investigation.kmz chosen, target CRS EPSG:3794 and point labels from name
The tool with the sample file, EPSG:3794 and labels from the placemark name.
Result: 4 points, 1 line, 1 polygon, 3 layers, extent in EPSG:3794
The result: 6 features on 3 layers, and the extent in D96/TM.

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.

The converted DXF: red plot boundary, green borehole points with labels, yellow access road
The converted DXF. Layer colours come from the KML styles.

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

M = a (1 − e²) / (1 − e² sin²φ)3/2 = 6 368 560.7 m,   N = a / (1 − e² sin²φ)1/2 = 6 389 232.6 m,   cos φ = 0.693993
Δx = N cos φ Δλ = 6 389 232.6 · 0.693993 · (0.00083899 · π / 180) = 64.929 m
Δy = M Δφ = 6 368 560.7 · (0.00011163 · π / 180) = 12.408 m
Lground = √(64.929² + 12.408²) = 66.104 m

D96/TM shrinks lengths by its scale factor, which depends on the distance from the central meridian, here x = −38 548 m:

k = 0.9999 · (1 + x² / (2 R²)) = 0.9999 · (1 + 38 548² / (2 · 6 378 888²)) = 0.999918
Lgrid = 0.999918 · 66.104 = 66.098 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):

2A = Σ (xi yi+1 − xi+1 yi), taken relative to the first corner: (65 · 54 − 58 · 12) + (58 · 42 − (−7) · 54) = 2814 + 2814 = 5628 m²
Agrid = 2814.0 m²
areas scale with k²: Aground = 2814.0 / 0.999918² = 2814.0 / 0.999837 = 2814.5 m²

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 calculationTool (DXF)Difference
South side of the plot, grid66.098 m66.098 m0
Plot area, grid2814.0 m²2814.0 m²0
Plot area, ground2814.5 m²–
Layers3 foldersBoreholes, 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].