1

On trying to copy a feature class to a feature dataset, I get this error message (see the screen shot).

Any ideas how this is happening?

error copying from FeatureClass to Feature Dataset

2 Answers 2

2

The error message you are encountering is telling you that the coordinate systems do not match. For example may be you are trying to copy data that is WGS84 into a UTM defined FeatureDataset? All data copied into the FeatureDataset must match the FeatureDataset..

They have to match exactly on all spatial parameters, including extent. Use the Feature Class to Feature Class tool to overcome this.

3
  • Thanks Hornbydd, but unfortunately they share the same coordinate system, what should I consider else? Nov 29, 2014 at 18:20
  • 4
    They have to match exactly on all spatial parameters, including extent. Use the Feature Class to Feature Class tool to overcome this. Nov 29, 2014 at 18:27
  • Thanks Richard, Feature Class to Feature Class was helpful tool and i overcome the problem. Nov 29, 2014 at 18:43
1

Sometimes it seems that a feature class and a feature dataset have the same spatial references, but thats not always true! It's a nasty bug in ArcGis and it occurs quite often.

The solution is to update the spatial reference of the feature class with an arcpy-script. Here is the code:

import arcpy
fc = r"<<path to your feature class>>"
gdb = r"<<path to your gdb you want to export the feature class in>>"

sr = arcpy.Describe(r"<<path to your feature class>>").spatialReference

arcpy.CreateFeatureDataset_management(gdb, "<<name of the feature dataset>>", sr)
arcpy.CopyFeatures_management(fc,gdb+"<<name of the feature dataset>>")

Change all values between <<...>>

Your Answer

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

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