AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Assign geoloction to drawing and export to shapefile

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
1586 Views, 4 Replies

Assign geoloction to drawing and export to shapefile

I have a dwg file from a spatial planning company and whant to convert this to a shapefile in a specific location. I have identified the right CRS and the right location using the GeoLocation function. However, this location is not kept when converting it to a shapefile.

How can I give the shapefile the right geolocation?

4 REPLIES 4
Message 2 of 5
ChicagoLooper
in reply to: Anonymous


@Anonymous wrote:

I have a dwg file from a spatial planning company and whant to convert this to a shapefile in a specific location.

OK, forget the part where you want to convert this to a shapefile because what's important now is the original coordinate system the sender 'assigned' to the dwg he or she sent to you. If you know for sure, no guessing, then you can put the drawing into your desired coordinate system. If you don't know for sure, or the original author didn't georefence the drawing, then you'll need to position it correctly in modelspace before you 'convert' it from coordinate system A to coordinate system B.

 

What is coordinate system A, the original CS which should be the CS it is currently in?

What is coordinate system B, the target CS you want the shapaefile to be in?

 

To convert, go to Planning and Analysis workspace, then Output Tab=>Map Data Transfer Panel=>DWG to SDF Icon.

  1. In Export Location window change Files of type to ESRI Shapefile (*shp)
  2. Give shapefile a name and browse to, or create, a folder to save it, then OK. In the next window, three TABS will be presented.
  3. SELECTION TAB. For Object Type: Click Point OR Line OR Polygon. Must be one of those 3 options. Mxing 'types' is not allowed. If you want to export more than one type, e.g. points and lines, then you'll have to export twice, once for each type (one for points and one for lines). Select objects to export. Selection method will vary based on your drawing.
  4. DATA TAB. Click Select Attributes. The attributes you select will populate the shapefile's dbf. Expand properties and select properties as desired. If you have Object Data, expand OD then select as desired. If you have Autocad blocks, you may harvest the block attributes to populate the dbf. When finished selecting, click OK to close window and go to Options Tab.
  5. OPTIONS TAB. The drawing's current coordinate system will be displayed on this tab. Check box labeled Convert coordinates to. Click the World icon to access the Coordinate System Library. Highlight your target CS, then click Select. Your target CS will be displayed next to the World icon.
  6. Click OK to close the Export window.

Go to the folder you choose to access your shapefile.

Chicagolooper

EESignature

Message 3 of 5
Anonymous
in reply to: ChicagoLooper

@ChicagoLooper Thank you so much for your eleborate answer.

The exporting as you described works perfectly. However, I still have the problem of the exported shapefile not being in the right location.

 

So as you described, the original author did not georeference the drawing. I know the coordinate system for sure but that only seems to matter for the right scale, not for the right location. 

I have positioned the drawing in the modelspace using the GeoLocation. However this location is not preserved correctly when exporting to a shapefile.

Message 4 of 5
ChicagoLooper
in reply to: Anonymous


@Anonymous wrote: I have positioned the drawing in the modelspace using the GeoLocation. However this location is not preserved correctly when exporting to a shapefile.

 

Positioning the drawing using the GEOLOCATION command is not a widely understood procedure, mainly because AutoCAD doesn't provide clear instructions to execute it properly. The sequence of steps AND the set up info you must gather beforehand is beyond the comprehension of what most users think is required. This command is so misunderstood it is even deemed faulty by many users, when in fact, it is entirely usable, you just have to know how.

 

To make it easy on you, skip the geolocation command altogether and do this instead, It's less complicated, more straightforward and will give you the geospatial results you need when exporting to shapefile.

 

Type MAPCSASSIGN on commad line then 1) use the Search Box and search for the CoordSys you want to give to your shapefile, 2) select it by highlignting it, make it blue, and 3) click ASSIGN and your highlighted CoordSys will be properly assigned to modelspace. Next, then turn ON Bing imagery. You may have to zoom in, way in, then pan around and zoom in until you find the correct spot based on the Bing imagery displayed in modelspace. Select your line work and move it, or paste it, to the correct location using the background imagery as your reference. Once you've positioned your line work, you may turn off Bing imagery.

 

You have just used the 'eyeball' technique to move your line work to the correct location based on your Assigned Coordinate System. Since the sender didn't accurately  geolocate the drawing, the eyeball method is the best you can do. You may now export to shapefile.

 

Warnings:

  1. If you do not ASSIGN any CoordSys to modelspace before preforming export-to-shapefile, then your shape file won't have a prj file and your shapefile won't be located in 'real world' coordinates, it'll plop down in some default location.
  2. If you have assigned the wrong CoordSys to modelspace, then you won't have an accurate geospatial shapefile, then it'll be in the wrong location, not at the 'real world' location.

Chicagolooper

EESignature

Message 5 of 5

I am a long time SketchUp user, very rusted Autocad user and new to Civil 3D. I had been struggling for days trying to find out why my exported models from Sketchup to .dwg and then to shapefile were thousands of kilometers badly geolocated when the GIS department opened them. Thank you, you have been the only one that has addressed and solved the issue. Straightforward, clear, simple, thorough. Awesome!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report