Python Script: Convert KML to AutoCAD(DWG\DXF)

8983
3
Jump to solution
08-31-2015 03:41 PM
PeterWilson
Occasional Contributor III

I've searched online looking for an open source tool, script or source code. I need a stand alone Python script that can convert KML files to AutoCAD (DWG\DXF) without the reliance on ArcGIS. The reason is that our colleagues need to be able to convert KML files to AutoCAD (DWG\DXF) without have to contact us each time they need a KML file converted to AutoCAD (DWG\DXF). Any help to achieve the following will be appreciated.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
NICOLAPEDDIS
Occasional Contributor II

Online you can get this free

Free KML Tools - KML to DXF Convertor

and a standalone tool here

kml2cad

and also okmap

OkMap Desktop - Features

without waisting time coding with pyhon

Take a look this usefool python tool if you want play  python code

OpenColorado-Tools-and-Utilities/PublishOpenDataset.py at master · opencolorado/OpenColorado-Tools-a...

View solution in original post

0 Kudos
3 Replies
ShaunWalbridge
Esri Regular Contributor

You're probably best trying this question elsewhere, since this is a support forum for Python in the context of ArcGIS. That said, if you need the exact implemention that ArcGIS provides, you could set up a server instance that does the conversion. If you're not afraid of the command line, you can also try your luck with ogr2ogr, which has a somewhat limited DXF AutoCAD 2000 driver:

ogr2ogr -f "DXF" destination.dxf source.kml

Both formats are complicated and have non-overlapping featuresets, so expect this to be a lossy translation.

0 Kudos
NICOLAPEDDIS
Occasional Contributor II

Online you can get this free

Free KML Tools - KML to DXF Convertor

and a standalone tool here

kml2cad

and also okmap

OkMap Desktop - Features

without waisting time coding with pyhon

Take a look this usefool python tool if you want play  python code

OpenColorado-Tools-and-Utilities/PublishOpenDataset.py at master · opencolorado/OpenColorado-Tools-a...

0 Kudos
PeterWilson
Occasional Contributor III

Hi Nicola

Thanks for the following, much appreciated.

0 Kudos