How can I convert a CAD file (DWG) to GeoJSON?

I am working on openlayers and I need to change the dwg format to GeoJSON using ArcGIS. How can i do this?

+4
source share
2 answers

Indeed, GDAL has the necessary tools to do this. ogr2ogr is a program included in GDAL that can convert various formats , including DWG. If you don't have GDAL yet, here are some good guides for windows and Mac / Linux . The following guide recommends converting to DXF first, since the library for converting from DXF is enabled by default using GDAL. You will need to install some additional dependencies for direct conversion from DWG. If you convert to DXF first, you can use the command line to convert to GeoJson:

ogr2ogr -f GeoJSON ./mynewfile.geojson ./mycadfile.dxf

If you use ArcGIS Desktop, you can use CAD for the geodatabase tool .

+8

GDAL , ogr2ogr, 100%.

+1

Source: https://habr.com/ru/post/1652917/


All Articles