问题描述
我正在使用openlayers,需要使用ArcGIS将dwg的格式更改为GeoJSON。
我该怎么做?
I'm working on openlayers and need to change the format of dwg to GeoJSON with ArcGIS.how can i do this?
推荐答案
事实上,GDAL拥有必要的工具来完成这项工作。 ogr2ogr是GDAL附带的一个程序,可以转换,包括DWG。如果你还没有安装GDAL,这里有和。 建议首先转换为DXF,因为默认情况下,GDAL会包含用于转换DXF的库。您需要安装一些其他依赖项才能直接从DWG转换。如果您先转换为DXF,则可以使用命令行转换为GeoJson:
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
如果您使用的是ArcGIS Desktop,则有一个。
If you are using ArcGIS Desktop there is a CAD to Geodatabase tool that you can use.
这篇关于如何将CAD(DWG)文件转换为GeoJSON?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!