Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've got tons of DWG/DXF files with information (in several layers) dealing with:

  • Contour lines and elevation (lines)
  • positions of antennas (points)
  • protection areas (polygons)
  • administrative boundaries (lines)
  • roads (lines)
  • rivers (lines)
  • fences (lines)
  • ...

All this information have been inserted into these CAD files in a non-standard way (not-unified names or colors in layers), and now I want to translate it into GIS (SHP files or into a PostGIS Server).

I'm investigating which is the best way to translate these data in the easiest way. I'm considering:

  • create GDAL scripts with Python (http://www.gis.usu.edu/~chrisg/python/2009/)
  • create scripts with Teigha libraries (http://www.opendesign.com/guestfiles/TeighaFileConverter)
  • use ArcGIS Desktop (with Python scripts) (http://www.slideshare.net/cageyjames/python-scripting-with-arcgis)
  • use QGIS or gvSIG (http://www.qgis.org/, http://www.gvsig.org)
  • use GlobalMapper (http://www.globalmapper.com/)
  • use GeoKettle (http://www.spatialytics.org/projects/geokettle/)
  • ...

I'd be very grateful if anybody could share their experiences with the CAD2GIS translation. Thank you very much in advance.

share|improve this question
2  
one word 'FME'safe.com/fme/fme-technology/fme-desktop/overview –  Mapperz Jun 7 '12 at 13:16

4 Answers 4

It seems to me that the main problem for you is to introduce some order to your tons of DWG/DXF files with information (in several layers).

Regardless of choosing software/tool I can recommend you to describe your data. Here is some thoughts:

  1. You should develop some kind of unique codes for all types of your features. It can be one attribute or several or some other way. Let's say it will be some dictionary of codes. PS it is very possible that you already have such dictionary.
  2. You need to make description of your input data based on its properties (layer name, color, linestyle, line width, etc) to be able to pick any object from DWG, read it's properties, then search you description document, find matching record and assign code (of matching description) to your input feature.
  3. Prepare such description in some table format (i.e. Excel).
  4. Write script which will loop through all your input data, match it's properties to Description, assign code and save it to appropriate featureclass/SHP/table.

In such way you can easily update such documented description in future and apply it again to any data without need to modify your scripts.

My experience:

We usually prepare such descriptions in XLS file (it can be easily edited by any cartographer or technician) and use FME for transforming and converting data. But I think you can implement similar idea with any software which can read DWG with properties of objects.

share|improve this answer

autocad map 3d will easily geo-reference your dwg/dxf files and allow conversion to 12 gis formats.

enter image description here

Unless you add FME desktop also (FME extsion for ArcGIS).
Then with FME extended to arcmap and autocad you have all ~275 formats.
But doing it through map3d you have access to some particularly useful tools.
(i.e. select by layer, color, linetype, or even by manuall selection if needed.) Create points from block insert point, convert block attributes to data attributes,
save all this to epf file and apply it to multiple drawings, etc.
Script it also if that is what you are looking for.

I begin all my projects with the assumption that autocad map 3d, arcmap, and fme will each be used for their best purpose.

share|improve this answer

It sounds like you have some major batch processing and therefore, I would be inclided to script this. Doing this all by hand might be feasible but a pain. At least with a script, if you muck something up you can just correct the script and re-run. Also, you have a chance to unify a lot of the non-standard naming etc by using regular expressions and sensible coding/selections.

If you are scripting this, I would suggest you use the medium you are most comfortable in. That said, having a ton of shapefiles can be a bit of a pain and you have a rare opportunity to force some order into your geodata store! SO, I would grab the opportunity and store everything in PostGis, GeoDatabases, or some other spatially enabled database. Your choice here realy depends on who is going to use the data and what software they like most.

To sumarise, script it your way but deliver the data their way.

share|improve this answer

To convert your CAD files to GIS, you'll need to add georeference information to your cad files. If your CAD files are in some recognizable coordinate system, you can assign those to your files, otherwise you'll have to 'manually' georeference the CAD file to translate the local coordinates to a projected coordinate system.

I found this nice guide [PDF] at which gives you a decent idea of the process.

Regarding automating this process, you can try bash with ogr2ogr. If you need more control, python with ogr would definitely do the job.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.