KML and KMZ to DWG: Moving a Google Earth File into AutoCAD
The query is usually short: "kml to dwg", "kml in autocad", "kmz to dxf". Behind it there is almost always the same situation: a colleague or a client sent a file from Google Earth, and the work has to happen in AutoCAD. It can be moved across, but renaming the extension is not enough: KML and DWG live in different coordinate systems and measure the world in different units. Here is a working route and a look at what breaks along the way.
Why the direct route fails
KML stores coordinates in degrees of latitude and longitude (WGS-84, EPSG:4326). A building in such a file measures about 0.0003 by 0.0002 — a fraction of a unit. AutoCAD, meanwhile, treats coordinates as flat and unitless.
Hence the two classic outcomes of a failed import:
- A drawing the size of a dot. Everything collapses into a speck near the origin: 55 and 37 degrees at drawing scale are practically zero.
- Huge values and no visible geometry. Objects sit 55 and 37 units away from the origin while being thousandths of a unit across, so you see nothing even after
ZOOM E.
The conclusion is simple: the data must be reprojected into a metric coordinate system before it reaches CAD — a UTM zone, or a national/local metric grid. That single operation turns degrees into metres and makes the drawing measurable.
Step 0. Unpack KMZ into KML
KMZ is a ZIP archive with a KML inside, nothing more. Rename map.kmz to map.zip, unpack it, take doc.kml. The details and the reverse trip are in KMZ to KML and back. Many programs read KMZ directly, but when a converter stumbles, unpacking removes half the questions.
Step 1. Open the file in QGIS
QGIS is free and reads KML/KMZ out of the box.
- Layer → Add Layer → Add Vector Layer, pick
doc.kml. - If the file has several Google Earth folders, QGIS asks which layers to load. Take all the ones you need — each becomes a separate layer, and later a separate layer in the DXF.
- Check that the layer lands where it should on the map. If the objects sit off the coast of Africa near the null island, the coordinates in the file are broken and there is no point going further.
Step 2. Reproject into metres
This is the key step, and the one most often skipped.
- Right-click the layer → Export → Save Features As.
- Format — AutoCAD DXF.
- In the CRS field pick a metric system: the right UTM zone or the local metric grid.
- Give it a file name and save.
After this the coordinates are measured in metres, and a building in the drawing is an honest 12 by 8 rather than 0.0001.
The same route in one command
With GDAL installed, no interface is needed:
ogr2ogr -f DXF out.dxf doc.kml -s_srs EPSG:4326 -t_srs EPSG:32637
Here EPSG:32637 is UTM zone 37N — substitute your own. For KMZ the command is the same, GDAL reads the archive directly.
What gets lost in transit
A CAD format is poorer than a geographic one, and it is better to accept that up front:
- Attributes do not travel. Names, descriptions, links and ExtendedData from KML do not reach DXF. If you need labels, build a text layer from the relevant field in QGIS first and export it separately.
- Styles do not travel. Google Earth colours and icons mean nothing in CAD; presentation is defined by layers and lineweights inside AutoCAD.
- Elevations are often relative. In KML the Z coordinate is frequently relative to the ground, not to sea level. Do not use it as a design level.
- Polygons with holes. Inner rings may arrive as separate closed polylines; check the islands when you hatch.
A technical breakdown of the format itself is in KML: a deep dive.
DXF or DWG
QGIS and ogr2ogr produce DXF, not DWG. For AutoCAD that is enough: open the DXF and save it as DWG (File → Save As → AutoCAD Drawing). If the file is going to travel between programs, keep DXF — nearly every CAD system reads it. The difference is covered in DXF vs DWG, and which format to pick for a particular CAD is worked through in Which map format to choose for CAD import.
Easier — get the drawing of the area straight away
People often convert KML not for the sake of that particular file but because they need a map of the district: streets, buildings, water, greenery to design on. In that case the Google Earth → QGIS → DXF chain is unnecessary. Select the area and download it directly as DWG or DXF: OpenStreetMap data arrives split into drawing layers, in metres, in the coordinate system you pick. Your own KML does not go anywhere — you can lay it on top with the same procedure.
In short
- KMZ is a ZIP with KML inside; rename to
.zipto unpack. - KML is always in WGS-84 degrees, so a direct CAD import gives a drawing a fraction of a unit across.
- The working route: QGIS → Export → Save Features As → DXF with a metric CRS (UTM or local).
- The same in one command:
ogr2ogr -f DXF out.dxf doc.kml -t_srs EPSG:32637. - Attributes, styles and labels do not survive the trip into CAD, prepare them separately.
- If you need a map of the district rather than that one file, take DWG or DXF directly.