如何将CAD(DWG)文件转换为GeoJSON? [英] How can i convert my CAD(DWG) file to GeoJSON?

查看:5129
本文介绍了如何将CAD(DWG)文件转换为GeoJSON?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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,这里有的好教程。 Windows mac / linux 以下指南建议首先转换为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,则有一个 CAD到地理数据库工具

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

这篇关于如何将CAD(DWG)文件转换为GeoJSON?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆