I'm writing a tool and essentially I found out that arcmap defaults an epsg to 0 if it sees that the projection is not supported against the predefined projections.


1 Answer 1


You should try to use the following code and see what happens using a not supported EPSG code:

sr = arcpy.SpatialReference()
sr.factoryCode = 123

May be you can check any property of the sr object to see if the given EPSG code 123 was valid. May be the create() method raises an exception. Have a try :-)

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.