11

I am creating a model that needs to ensure that all input datasets end up in the same coordinate system (among other things). I was originally going to batch project all of the datasets whether they need to be projected or not, but then there's the issue of assigning the correct geographic transformation. Then I remembered that all data that is input into a feature dataset has to be the same coordinate system, so I decided to put all the data into one.

My question is: When a feature class is imported into a feature dataset that is of a different coordinate system, does it automatically project the data? What happens?

I tested this myself on roads data and it seemed to project the data, as they lined up nicely with my other data. The thing is, no transformation was needed (and a transformation method was needed had I projected it), so it seems fishy that the data is just automatically projected. Maybe it makes a best guess?

2 Answers 2

6

From the help on About importing feature classes:

Suppose you want to import a feature class that's in another coordinate system. For example, you may want to import a feature class that uses the North American Datum (NAD) 1927 coordinate system into a feature dataset that uses the NAD 1983 coordinate system. To import the feature class, use the Project tool to simultaneously import the data and convert it into the new coordinate system.

If the feature class you're importing is already in the coordinate system you want it to be in for the geodatabase, use the Feature Class To Feature Class or Feature Class To Geodatabase tools to import the data. The feature class you create with these tools can standalone or import into an existing feature dataset.

When you create a stand-alone feature class, the new feature class is created with the same spatial reference as the feature class you're importing.

If you're creating a feature class in an existing feature dataset, the new feature class will automatically take on the same spatial reference as the feature dataset.

So this suggests that it does a "best guess". I would strongly recommend specifying the projection transformation method manually if you want to avoid projection errors. See "Revenge of the Shift" for an excellent overview of the errors introduced by incorrect projection transformations!

3

When the FeatureClass gets imported into a FeatureDataset it gets projected to the coordinate system because all FeatureClasses inside a FeatureDataset must have the same Spatial Reference.

If you are curios as to the exact process in terms of code, the Import process grabs the ISpatialReference object from the Destination FeatureDataset and, as it loops through every single geometry in the source FeatureClass, it calls IGeometry::Project on it and passes that ISpatialReference object as the parameter.

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.