How can i convert my CAD(DWG) file to GeoJSON?

半腔热情 提交于 2019-12-20 10:25:27

问题


I'm working on openlayers and need to change the format of dwg to GeoJSON with ArcGIS. how can i do this?


回答1:


Indeed, GDAL has the necessary tools to get this done. ogr2ogr is a program included with GDAL that can transform a variety of formats, including DWG. If you don't already have GDAL installed, here are good tutorials for windows and mac/linux. The following guide recommends converting to a DXF first, since the library for converting from DXF is included by default with GDAL. You will need to install some additional dependencies to convert directly from DWG. If you convert to DXF first, you can then use command line to convert to GeoJson:

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

If you are using ArcGIS Desktop there is a CAD to Geodatabase tool that you can use.




回答2:


GDAL can be used to do this, and I want to say ogr2ogr too, but not 100%.



来源:https://stackoverflow.com/questions/39214367/how-can-i-convert-my-caddwg-file-to-geojson

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!