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've got a project where I'm reading in geometry objects from text files to put them in ArcSDE. These geometry objects have an associated EPSG code, and I'm looking for a way to ensure they're in the right projection when I've finished with them.

Having taken a look at the factory codes that I'm interested in, (GCS GDA94; EPSG:4283, and VicGrid 94; EPSG:3111) for a project I'm working on it appears that the EPSG codes correspond directly to the ESRI factory codes for the spatial reference (here and here). This is great, as it means I don't have to worry about navigating to projection files to create SpatialReference objects, for example in the code below:

import arcpy

# Create a spatial reference object using a factory code
#
sr = arcpy.SpatialReference()
sr.factoryCode = int(epsg_code.lstrip("EPSG:"))
sr.create()

Unfortunately I can't find any reference in the ESRI documentation to say whether this holds true all the time or not - I'm guess it does, but I'd rather know for sure. Does anyone know where I'd be able to find out?

share|improve this question

3 Answers 3

up vote 22 down vote accepted

If an Esri well-known ID is below 32767, it corresponds to the EPSG ID. WKIDs that are 32767 or above are Esri-defined. Either the object isn't in the EPSG Geodetic Parameter Dataset yet, or it probably won't be added. If an object is later added to the EPSG Dataset, Esri will update the WKID to match the EPSG one, but the previous value will still work.

There are some limitations. Esri doesn't follow the axes directions that EPSG does, in ArcGIS Desktop at least, it's always longitude-latitude or easting-northing (xy), although we're picking up the axes order in Server now.

I'm intimately familiar with this as I'm the product engineer that handles these for Esri.

share|improve this answer
    
Sounds good to me. Thanks heaps for clearing that up! –  om_henners Jan 10 '12 at 21:08
    
in arcgis js api axis orientation are mathematical too.. –  Krystian Mar 22 '13 at 15:24

The only reference I could find regarding EPSG was in the What's new in ArcGIS 10 which said

Map projections and coordinate systems

New coordinate systems and transformations have been added, including the following: •Definitions from the EPSG Geodetic Parameter Dataset versions 6.15 through 7.1, including 181 geographic (datum) transformations and over 280 coordinate systems ...

I don't know if that is the confirmation you need.

share|improve this answer

This appears to be documented in the SDK help, e.g. IGeometryServer.FindSRByWKID:

AuthorityName is usually "EPSG" or "ESRI", but can also be an arbitrary string. It can also be the empty string if you want the default authority name associated with the new spatial reference. Clients can associate their own authority names with factory codes that are currently associated with the EPSG or ESRI authority names, because only the WKID is used to create the spatial reference. Here are the current rules for mapping WKID ranges to default authority names:

  • A WKID in the EPSG code range (1000 – 32768) will result in an AUTHORITY name of “EPSG”, and the version will be the current EPSG version used (currently “6.12”).
  • A WKID in the ESRI code range (33000 – 199999) will result in an AUTHORITY name of “ESRI”, and the version will be the current PE library version (currently “9.3”).
  • A WKID in the user (objedit) range (200000 – 209199) will result in an AUTHORITY name of “CUSTOM”, with no version associated with it. This name is specified by the OGC.
share|improve this answer
    
If I found a 0 value in spatial reference factory code, Can I tell that the spatial reference is not authorised/valid? –  Emi Jan 3 '13 at 4:47
1  
@Emi, A 0 for the factory code/wkid usually means that ArcGIS doesn't recognize the spatial reference (coordinate system). I would still call it a valid spatial reference because it can be used, it just doesn't have an ID. –  mkennedy Jan 25 '13 at 18:44

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.