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

查看:250
本文介绍了如何将我的 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,这里有很好的教程 windowsmac/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天全站免登陆