Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
1  
Have you checked out the SpatialReference Class documentation at help.arcgis.com/en/arcgisdesktop/10.0/help/000v/… ? No answer jumps out at me from there but coordinate systems are not my forte. –  PolyGeo Apr 26 '12 at 10:58
add comment

1 Answer

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
sr.create()

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
add comment

Your Answer

 
discard

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.