Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Have you checked out the SpatialReference Class documentation at… ? No answer jumps out at me from there but coordinate systems are not my forte. – PolyGeo Apr 26 '12 at 10:58
up vote 1 down vote accepted

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 :-)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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