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

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?

3 Answers 3


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.


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.
  • 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, 2013 at 4:47
  • 2
    @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, 2013 at 18:44

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.

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.