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.

We did some topographical surveys in Indonesia which are drawn in AutoCAD. It's our aim to publish them with QGIS and its webclient.

I thought the best way is to georeference the data in AutoCAD 2014. Eventually, I opened the DWG-file in AutoCAD Map 3D 2014 (see AutoCAD-Map-3D-Screenshot) because I know of it's possibility to export as SHP-file. Finally, I imported the SHP-file in QGIS (nightly built) but the result is not the expected one, see QGIS-screenshot :

The white dot(s) represents GPS-data which was correctly imported and rendered in the southern part of Nias. The blue dot(s) represents the imported SHP-files which should actually be located at the same location but are -- as you can see -- in the middle of nowhere.

Do you have any clue about a mistake I made?

While exporting/ importing the data I payed attention to the CRS and set it to "DGN95.UTM-47N" in AutoCAD Map 3D and to "EPSG:23867 - DGN95 / UTM zone 47N" in QGIS -- which, in my opinion, should be the same one and lead to a right result. Unfortunately, it doesn't. Or is there something I missed?

I already thought about the "Data source encoding" which I can set in QGIS. Right now it's set to "System". I guess Debian Wheezy (which I use for QGIS) and Windows 7 (which I use for AutoCAD [Map 3D]) use a different one -- but I'd also suppose that I would not see anything at all if I import data with a wrong encoding. Some ideas?

Any help is very appreciated. Thank you.

share|improve this question
    
did you enable on the fly projection? Small detail but easily overlooked. –  Naresh Jul 16 '13 at 8:46
    
Yes, on the fly projection is activated. (But in some other cases this issue is sometimes really tricky. :) ) –  niklaas Jul 16 '13 at 8:49
    
So i can make another observation which is a general issue with CAD to SHP. CAD supports different geometries but SHP doesnt. For example, a line is a feature in a CAD file, but not in SHP file, we need closed polygons or points. There is a good chance the export of CAD into SHP didnt do a good job. You have to look at objects. I recommend that you select one polygon only in CAD file and export that one, and see if that is working. (Thinking out loud.) –  Naresh Jul 16 '13 at 8:55
    
The coordinates in your drawing file are wrong. While the coordinate system is set correctly, the coordinates shown in the drawing are ~500 x ~200. You should be seeing coordinates closer to 300,000 x 60,000. QGIS is displaying it in the right place, because 0 x 0 for UTM 47N is in the Pacific to the West. –  DPierce Jul 16 '13 at 14:12
    
@Naresh, thanks for thinking out loud! I guess it's still quite a defektive task (or at least one which can be optimized) to convert from DWG to SHP but DPierce's comment looks like the source of errors. –  niklaas Jul 17 '13 at 13:43

1 Answer 1

up vote 1 down vote accepted

As @DPierce pointed out:

The coordinates in your drawing file are wrong. While the coordinate system is set correctly, the coordinates shown in the drawing are ~500 x ~200. You should be seeing coordinates closer to 300,000 x 60,000. QGIS is displaying it in the right place, because 0 x 0 for UTM 47N is in the Pacific to the West.

To import AutoCAD [DWG] to QGIS [SHP] my solution is the following, having AutoCAD Map 3D (ACM3D) as a requirement. This solution is tested with AutoCAD Map 3D 2014 and QGIS 1.8 . You also need some geospatial information (in my case a GPS track) which is georeferenced correctly and is in connection with the drawing you want to import into QGIS.

  1. You have to convert this data into a fileformat that is readable by ACM3D. I've got a GPS-Track saved in GPX which is readable by QGIS. So I imported it into QGIS and exported it as a SHP-file. This SHP-file is readable by ACM3D.

  2. Open your DWG drawing in ACM3D. Import the SHP-file with _MAPIMPORT. (To make the following process easier use _GEOGRAPHICLOCATION and use it to georeference your drawing elements. Now it's easier to find your drwaing elements and the imported SHP-file because you have a Bing Maps as basemap.) Now, use _ADETRANSFORM to, firstly, select the elements you want to transform and, secondly, to select two source and destination points. I selected the crossing of two streets in the drawing, then selected the appropriate point in the GPS track, then selected another crossing in the drawing and another appropriate point in the GPS track. Now, the drawing elements are transformed and should fit to the GPS track. (You can now fine tune the entire setup by redoing this operation.)

  3. If you want to, you can _GEOGRAPHICLOCATION the entire drawing again to have the Bing Maps basemap fit accordingly.

Now, you can export the Drawing as SHP with _MAPEXPORT and import it into QGIS. The drawing is now at its correct location. I'm right now at optimizing this process that drawing elemts that belong to each other are exported as an entire feature... I will update this answer when I found some appropriate solution so that this answer can be called "completely".

Here are some links that helped a bit in finding my way through this Odyssee:

  1. http://www.youtube.com/watch?v=-hU6-hk6m0U
  2. http://docs.autodesk.com/MAP/2010/ENU/AutoCAD%20Map%203D%202010%20User%20Documentation/HTML%20Help/index.html?url=WS153E3E0502C1854DBBF07405E6F77738.htm,topicNumber=d0e142023
share|improve this answer
    
Why is this answer marked as community wiki? –  dassouki Jul 19 '13 at 10:37
    
I wanted to give others the opportunity to add or change information they think that need to be clarified. –  niklaas Jul 19 '13 at 10:56

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.