1

I'm a (reasonably) proficient GIS user (mostly QGIS, but some Arc GIS) who has been thrown the conundrum of converting/importing CAD urban planning drawings (2D drawings produce in AutoCAD 2014) to GIS shapefiles (or similar).

I have had some success in importing the drawings, but have realised that all of the drawings have been produced as lines (not polylines or polygons) which means I am losing a layer of detail that would be really very useful in GIS.

For example, I have a site plan of a new housing layout which shows hundreds of individual plots of land, which 'look' like polygons but are actually represented in AutoCAD as lines. As I understand it from reading through forum posts here it's probably best that these plots are converted to polygons in AutoCAD before we attempt to export/import them to GIS?

I'm really just looking for a solid enough workflow to produce 2D architectural plans in AutoCAD and import them to GIS so that I can now attach additional attributes to individual polygons (e.g. buildings, plots) and polylines (roads, rivers etc).

From first glance the CAD files are a bit of a mess (please see example DWG file here). They are also huge e.g. new housing estates with +4000 plots in some cases. I think refining the workflow at the CAD end is probably something that needs to happen. My other constraint is that with the exception of AutoCAD 2014 I'm pretty much restricted to using opensource software (QGIS etc)

Has anyone come across any useful resources that would point me in the right direction?!

  • Do you have access FME? - we do this nightly bulk cad 'change only' to oracle converts lines to polygons etc. – Mapperz Mar 18 '15 at 14:26
  • googledrive blocked at work... can try later at home – Mapperz Mar 18 '15 at 14:27
  • @Mapperz thanks - I use Linux and do have a trial version of FME, but the end-user won't have any access to FME so I'm trying to avoid a solution that uses expensive proprietary software! But would still be interested to hear your workflow:) – marty_c Mar 18 '15 at 14:41
  • 1
    FME is not expensive when your asleep at 3am and it does the work for you.. saves time and money in the long run. – Mapperz Mar 18 '15 at 14:45
  • I haven't touched AutoCAD in a while, but there are options and tools in there (or were) that can address the problem. For example, Boundary Polygon tool you click in an enclosed area and it creates a polygon by flood (I'd swear there was a mass way of doing this). You can also convert line segments to polylines by selecting them and using pedit (which has options, including close polyline - but you can run into issues if you only have one line and need it for two polys). On the GIS side some version of nhopton's answer (cleanup and polygonize) is the way to go. – Chris W Mar 19 '15 at 6:01
4

Ubuntu 14.04, QGIS 2.8.1

The way I did this with your test file was to convert the DWG file to a DXF using (free) Teigha File Converter. Then I loaded the DXF into QGIS and tried to polygonize it (using 'Polygonize' from the Processing toolkit). In fact 'Polygonize' only partially converted the lines to polygons, there is a problem with the DXF.

So, it was necessary clean the DXF with GRASS v.clean snap from the Processing Toolbox (I just used the default settings). Then on the output file I ran 'Polygonize' again, which polygonised the lines perfectly.

Teigha File Converter can do batch conversion, by the way. All of the shapes on the picture below are polygons, I styled the layer on the 'area' attribute which explains why some of the colours are the same.

enter image description here

  • thanks for this works pretty well. I still think the drawings needs to be cleaned up and in AutoCAD (i.e. individual plots referenced in AutoCAD). I had a play around with a more complicated drawing where there are lots of different plot sizes which are odd shapes and the v.clean and polygonize functions can't really cope. Perhaps I just need to play around with some of the settings though... – marty_c Mar 23 '15 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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