7

I've definitely got at least a couple of grey hairs while trying to convert some dwg. files to shapefiles. I've seen that this subject has been disscused a lot, but hope someone will have the patience to help me.

The procedure I'm following is this:

  1. I add the dwg files to ArcMap.
  2. TOC- right clik-Convert CAD Feature Layer
  3. Data Management Tools-Projections- Define Projection.

The conversion happened but then I realized things are not that simple, looked over the files again and apparently I have some "lost points"....enter image description here

My data is acctually in that middle point and it looks like this: enter image description here

I definitely have to georeference the data before converting it to shapefile. But how do I do that? I tried to create some control points, but I'm probably not doing it the right way cause nothing happens. Plus I have no idea where those lost points should actually be. enter image description here

Forgot to mention that the dwg files have no coordinate system.

3
  • Where is your data from. Are you sure the data is not projected?
    – johanvdw
    Jul 12, 2012 at 20:22
  • Well. I went ArcCatalog- CAD Feature Dataset Properties- and got "No Default Projection File +Unknown Coordinate System". And ArcMap says the same.
    – Ligia
    Jul 13, 2012 at 7:39
  • 1
    your data seems projected from the coordinates in your screenshot. Have you checked if it works well if you just set one of the usual coordinate systems for your area
    – johanvdw
    Jul 13, 2012 at 8:47

5 Answers 5

5

For future reference, it helps to add as much relevant information to your question as possible in order to obtain the best answer. In this case, something that would be useful is to say what projection you think your CAD file should be in, and possibly give a screenshot of the coordinates you are seeing when you have loaded the CAD file into ArcGIS.

You have a few options to ensure that your CAD data will line up with other data you may add. Both of these involve defining a projection for your CAD drawing, without editing the drawing itself.

  1. If you know the features in the CAD drawing are already in a projected coordinate system, you may simply define the projection for the dataset. Here is the Help document describing that process: Defining a coordinate system for a CAD dataset.
  2. If you know the CAD features are not in a projected coordinate system, but want to define a projection for the drawing anyway, thus enabling it to be projected on-the-fly in ArcGIS, then here is the procedure to Create a custom projection file in ArcMap to align CAD data.
  3. If instead of creating a custom projection for your CAD data, but instead want to georeference your CAD file, which creates a .wld file with parameters to shift, scale and rotate your drawing, you will want to use the following help file: Georeferencing a CAD dataset

The reason that I have focused on locating the CAD file with reference to your other data as opposed to converting data from CAD to a different GIS format is the time savings involved. It is a lot faster to define the projection, or georeference your CAD dataset once, knowing that any data you convert out of that drawing will then carry along that projection information, rather than leaving the CAD file as it stands, then having to define the spatial reference separately of each dataset you export from the CAD file.

To complete the process of converting to a shapefile, you would then do the following:

Use the various tools for importing CAD data to convert features from your CAD drawing to a shapefile or any other desired GIS format. This help file contains links to the various options: Importing CAD data
At the time you perform the import, you will have the option of keeping the data in the coordinate system of your CAD file, or using the coordinate system of the Data frame, or the Feature Dataset you are importing the data into.

5
  • First of all thank you for the very thorough answer.Indeed, I forgot to mention that The CAD data doesn't have any coordinate system. When I'm loading them in ArcMap I got "1033160.651 471859.284 Unknown Units". I went ArcCatalog- CAD Feature Dataset Properties- and got "No Default Projection File +Unknown Coordinate System". I will try the second solution you suggested me and get back with feedback.
    – Ligia
    Jul 13, 2012 at 7:52
  • 1
    @Ligia - Even though your CAD drawing does not have a coordinate system defined by name, the coordinates that you are showing indicate that the drawing was created in a projected coordinate space, as opposed to Lat/Lon. You just have to figure out what coordinate system those match up with, and you can define it in ArcGIS. I am sure there are a few common ones in use in Romania. A search at www.spatialreference.org, came up with this one: SR-org 7205 Jul 13, 2012 at 8:58
  • 1. Your second suggestion (creating a custom projection file) was a very good idea, but the data didn't fit quite well.2. Stereographic 1970 is the coordinate system used for romania, but I don't think this is it. So should I just try giving different .prj files to the cad data and see which one matches? . Plus what do I do with those "lost points"? They are still there, even though I gave the data this "custom projection" which I defined on a WSG 1984 map.
    – Ligia
    Jul 13, 2012 at 9:49
  • 2
    @Ligia - in autocad there are sometimes points or lines that the drafter did not complete, or used a tool to create that are (lack of a better term) "thrown" out into the extremities of the coordinate system. Sometimes a block will be inserted at the default 0,0. This may be what you are seeing with these lost points. You may try to get the exported to their own dataset in order to identify their exact properties and determine if they are valid.
    – Brad Nesom
    Jul 16, 2012 at 14:03
  • Hello Brad. Thanks for explanation. I didn't quite understand your advice "get the exported to their own dataset in order to identify their properties and determine if they are valid." Did you mean export my dwg's in a feature dataset of a geodatabase and check what exactly?
    – Ligia
    Jul 17, 2012 at 8:43
2

Use Spatial Adjustment but you will have to import DWG/DXF to an editable data format first (Shapefiles or and geodatabase features classes).
Personally I would also obtain some data which you can use for geographical reference; road intersections, geodetic "survey" markers.

Are you sure the DWG/DXF file is not projected to a coordinate system already? Have you tried projection on-the-fly? Add existing projected data to the map (this will set the data frame coordinate system) then add the drawing. With some files if I add the drawing first, ArcMap doesn't know what to do with it bit it does if the data frame is set to the correct coordinate system. I get a variety of drawings from many different sources and they all behave differently. Some are projected, some have obscure local coordinate systems that surveyors use, some are not projected, some are 3D, others are a combination of 2D and 3D. Really depends on where it came from. Good luck

3
  • Apparently you are right.when trying to use the Spatial Adjustment toolbar I can only do it in an edit session, and my data isn't editable, because we are talking about CAD files.
    – Ligia
    Jul 13, 2012 at 7:58
  • This whole CAD to ArcGIS process is really a matter of luck apparently:))
    – Ligia
    Jul 13, 2012 at 10:32
  • I convert a lot drawings and personally I don't really have very many issues with the conversion process. Usually if there are any issues its with the drawing itself. I find that a lot of people with very limited drafting experience attempt to create or edit drawings. When they are done properly by experienced draftspersons then it's usually an effortless process. Jul 13, 2012 at 12:58
2

If you have access to autocad map. I would suggest that method over the method proposed.
Autocad map can output vector data to several gis formats.
I also use it by setting up a drawing base file which I use the fdo interface to view one or more shape files with known projection.
I then query in the dwg that I want to geo-reference. This allows me to move, scale, & rotate that data to match the known crs.
Autocad map can then output any portion or all of the data to shape file.

EDIT: It does look like your dwg files were created in a coordinate system (as noted in the comment).
1. What I would do at this point is collect on data set (that overlays the same area as your dwgs) that has a known crs.
2. Double check it with other data to make sure it is indeed a correct known crs.
3. go to arccatalog and select one dwg (right click).
4. go to properties and assign a crs (I am guessing those coords look like a utm meters crs - you will have to pick the zone).
5. load the (now projected) dwg and the know crs data set into an arcmap session together.
Background
by selecting the dwg and setting the projection you create (only for arcmap) a prj file for the dwg.
This does not change the coordinates - it only changes where arcmap thinks those coordinates are.
when you add data to arcmap the first dataset added will "set" the crs for the dataframe(in the document). You can always go to the dataframe (ussually called layers) properties and change it to something else.
If at this point you have data that lines up you have successfully guessed which crs your data is in (note that if you guess the utm zone other dwgs could cross into the next zone)
Now you should have the concept.
So a more simple method once you understand that is...
1. load a known crs dataset into arcmap.
2. load an unknown crs dataset into arcmap. 3. go to the layer dataframe properties and change the crs to the system you think the unknon dataset is in. If the data lines up you have just proven that unprojected data is lying in the projection you guessed.
more background
you need to understand that setting the projection for a datset by telling arcatalog what that projection is "Doesn't" change any coordinates in the data. It only tells arcmap how to project it when it is put with other data or shown in a secondary projection.
This applies to foriegn data (autocad dwg, microstation dgn, or other datatypes) also.
After you have the projection issue figured out there are several ways to get that data into esri format. (Decide shape, fgdb, sde, csv or other)

1
  • Your idea is definitely the best solution but unfortunately we don't have a licence for Autocad Map
    – Ligia
    Jul 13, 2012 at 7:42
1

You have the right idea but using the wrong tool. For vector data you want to use the Spatial Adjustment toolbar not Georeference.

2
  • this is the procedure suggested by esri. apparently you can georeference raster data and autocad data with no spatial reference. webhelp.esri.com/arcgisdesktop/9.2/… but of course, i'll happily try your suggestion as well.10x
    – Ligia
    Jul 12, 2012 at 19:50
  • 1
    Apparently when trying to use the Spatial Adjustment toolbar I can only do it in an edit session, and my data isn't editable, because we are talking about CAD files.
    – Ligia
    Jul 13, 2012 at 7:57
-1

Posting this for the benefit of anybody who may come across this and may not have thought to do this: I had survey data in CSV files and assumed the data was X,Y,Z coordinates, but spent several hours trying to import and project to no avail.

It wasn't until after speaking with the surveyor that I found out that the coordinates were Northing, Easting, Elevation, so in essence Y, X, Z. Importing the data that way fixed my problem.

1
  • This does not seem to be a direct answer to the question which was asked.
    – PolyGeo
    Sep 29, 2015 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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