Converting a CAD file to a shape file

杀马特。学长 韩版系。学妹 提交于 2020-01-01 15:03:45

问题


Thanks for the assist on my previous question.... I was able to complete my project This time I have a CAD file created with Autodesk that I need to convert to a shape file.

Couple of questons:

  1. An open source application (can't afford ESRI) that can convert the CAD file to a shape file?

  2. Is that a better file format I can use other than the shape file (shp) format?

Any suggestions would be greatly appricated

Regards Chris


回答1:


You should use OGR

http://www.gdal.org/ogr/

It is the main program for converting between geographic formats. It is written in C++ but there are also python bindings. It is compiled and runs on almost every major OS.




回答2:


I would also suggest to use OGR but in only works with dwg/dxf version 2000 or prior; you could use Teigha (http://www.opendesign.com/) to convert the files to 2000 version and then you can use OGR.

I've done tons of conversions from dwg to shp what I usualy do is convert the dwg to a dwg version 2000 using Teigha, then convert that dwg-200 to a shape file; once a shapefile you'll see that this file contains all the layer in order to separate each layer into a different shape file I use this command

ogr2ogr new_map_from_layer_X.shp -where "LAYER = 'X'" shape_converted_from_DWG_lines.shp




回答3:


Check out what ODA has:

http://www.opendesign.com/



来源:https://stackoverflow.com/questions/3409974/converting-a-cad-file-to-a-shape-file

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