|Source : Autodesk community forum|
Recently, I was facing challenges in converting AUTOCAD Drawing files (.dwg) into useful shapefiles for both my work and (my own consultancy projects).
It is known that some organizations have GIS files for small scale sites while their engineering teams keep the large scale plans of the sites. Hence, there is an issue where the management is not able to see the big and the small picture of their assets.
Secondly, not everyone knows how to relate AUTOCAD plans to their daily life. They would like to see their site in a user friendly format (i.e. Google Maps, Google Earth).
Now we have looked at potentially scenarios, we need to ask ourselves what we should be prepared for when conversion of AUTOCAD to a GIS software (i.e. ArcMap). Below here are the things to be considered:
- Is your file in dwg or dxf file format?
- Do you know the projection of the AUTOCAD drawing is done?
- Are you potentially aware that conversion will only bring spatial drawings (not the attributes)?
1. DWG or DXF Format?
.dwg file is native format for AUTOCAD. A .dxf file is interchangeable format of AUTOCAD product.
In ArcMap, one can freely add dwg file and all the layers (including attribute annotation) will come out. You can save them as a shapefile.
For QGIS, it will ONLY open a .dxf file. How can I convert .dwg to .dxf file? Refer to this article here for the procedure
2. Projection Issue
Everyone should realise one thing about conversion of AUTOCAD file to GIS file - there is no projection for the exported data. None at all!
How can I find the projection of AUTOCAD file. One is to open the dwg file on A360 Viewer. If you look at the survey plan, the mention of coordinate system or projections would be located at one of the corners of the plan.
If no (which I have encountered), please contact the source and obtain the projection name from the client or the surveyor.
Once we identified the name, we need to incorporate this projection to the GIS file. How?
When you open the .dxf file or converted shapefile (adding vector), the system prompts you to add the coordinate system. Input the projection name and apply to all layers of AUTOCAD that is to be migrated into QGIS.
In the case of ArcMap, the process is bit more complex. Bring the dxf file or converted shapefiles as unprojected files. Ignore all the error message. To ensure the shapefiles are to have the correct projection, we are going to do vector georeferencing. Vector georeferencing only works if the survey plan (AUTOCAD file viewed on A360) has coordinates marked on it or you find equivalent coordinates on another system.
To activate vector georeferencing, you must use Spatial Adjustment. When I was made aware of it by ESRI support, it worked wonders. Refer to the video below on how to use the tool.
While I do not have clear answers on this, it is important for you to be aware that conversion of AUTOCAD files to shapefiles WILL NOT BRING attributes (names, heights, feature types). If the file has limited attributes, one can manually add them as separate columns to the shapefiles (which I have done before).
However, if there are many attributes, I would like to hear your answers on bringing attributes effectively during the conversion.
Hope it helps!