Spatial references

Spatial references include a coordinate system for x-, y-, and z-values. In enterprise geodatabases, the spatial reference also includes tolerance and resolution values. All this information together helps indicate where on the earth the shapes on your flat map represent.

Each spatial reference also has an identifier (often called a well-known ID, spatial reference ID, or SRID) and a well-known text definition of the coordinate system. There are certain standard IDs, such as those defined by the European Petroleum Survey Group (EPSG) or Esri, but the ID for spatial references is not always standard. This has implications when moving your spatial data between databases. See the section "How the spatial reference system is used in ArcGIS" in this topic for more information.

When created through ArcGIS, a spatial reference system with a specific SRID is assigned to the feature class. If a spatial reference is not assigned, the feature class has an unknown spatial reference. This spatial reference and SRID apply to all rows in the feature class.

When spatial tables are created directly in the database (outside of ArcGIS), each record in a spatial table can be assigned a different SRID and spatial reference. However, when you use these database tables with ArcGIS, ArcGIS only recognizes one SRID and spatial reference for the whole table. You can define a query layer to specify which SRID will be used, and all rows with that SRID will be accessible in ArcGIS. Otherwise, ArcGIS reads the SRID of the first row in the table, and only rows that have that SRID defined will be accessible in ArcGIS.

Spatial reference tables in enterprise geodatabases

In enterprise geodatabases (and Oracle or PostgreSQL databases that have the ST_Geometry type installed), all spatial reference systems are stored in a geodatabase system table.

Database and storage type

Geodatabase system table

Oracle (ST_Geometry)

sde.st_spatial_references

Oracle (SDO_Geometry or SDEBINARY)

sde.spatial_references

PostgreSQL (ST_Geometry and PostGIS Geometry)

public.sde_spatial_references

There is also an editable view on this table—sde.st_spatial_references—to which spatial references can be inserted.

Informix (ST_Geometry)

sde.spatial_references

DB2 (ST_Geometry)

db2gse.st_spatial_reference_systems (This is a system view.)

SQL Server (Geometry, Geography, and SDEBINARY)

sde_spatial_references

The spatial reference system must exist in the spatial reference table for you to use it with your data.

Beginning with ArcGIS 10.1, the geodatabase system table used for ST_Geometry in Oracle and PostgreSQL is prepopulated with spatial reference systems that use EPSG codes for the spatial reference IDs (SRIDs). Upgraded geodatabases in Oracle and PostgreSQL will have the spatial reference systems added to the sde.st_spatial_references and public.sde_spatial_references tables.

For a definition of all the columns in the spatial reference table in each database management system, see their respective system table topics:

Dive-inDive-in:

These are the technical details of how the spatial reference system is used in a geodatabase:

Internal functions use the parameters of a spatial reference system to translate and scale each floating-point coordinate of the geometry into a 64-bit positive integer prior to storage. Upon retrieval, the coordinates are restored to their external floating-point format.

The floating-point coordinates are converted to integers by subtracting the false x- and false y-values, which translates to the false origin; scaling by multiplying by the x,y units; adding a half unit; then truncating the remainder.

The optional z-coordinates and measures are dealt with similarly, except they are translated with false z- and false m-values and scaled with z-units and m-units, respectively.

Spatial reference tables in databases

With the exception of the ST_Geometry type installed in an Oracle or PostgreSQL database, databases that use an SQL geometry type do not contain an ArcSDE system table. Each DBMS has its own system table to store spatial references. In general, those tables store the coordinate system's well-known text and ID but do not store precision or tolerance values.

Most databases use EPSG codes for their spatial reference IDs.

See your DBMS documentation for details.

How the spatial reference system is used in ArcGIS

When you create a feature class in ArcGIS, you choose a spatial reference. If you are storing your data in a geodatabase, ArcGIS calculates default x-, y-, z-, and m-units and offsets based on the spatial reference you choose.

When data is pasted or imported into a database or enterprise geodatabase in ArcGIS for Desktop, ArcGIS takes the well-known text description and ID of the coordinate system of the incoming data, along with the tolerance and resolution if present, and compares it to values in the spatial reference system table. If a match is found, the existing spatial reference is used. If a match is not found—for example, if the incoming data has a custom spatial reference—what happens depends on the spatial type used for the spatial column of the table created in the target database or geodatabase.

The following table lists what SRID is used in the target PostgreSQL, Oracle, SQL Server, or Netezza database when importing or pasting spatial data. The words known or unknown indicate whether the spatial reference in the source data can be mapped to an existing spatial reference in the target database.

Target

Source

ST_Geometry

PostGIS Geometry

Oracle SDO_Geometry

SQL Server Geometry

SQL Server Geography

Netezza spatial

Known EPSG code with an ST_Geometry, SDEBINARY, PostGIS Geometry, SDO_Geometry, SQL Server Geometry, SQL Server Geography, or Netezza spatial column

The EPSG code is used as the spatial reference ID and stored with the geometry.

The EPSG code is used as the spatial reference ID and stored with the geometry.

The EPSG code is used as the spatial reference ID and stored with the geometry.

The EPSG code is used as the spatial reference ID and stored with the geometry.

The EPSG code is used as the spatial reference ID and stored with the geometry.

The EPSG code is used as the spatial reference ID and stored with the geometry.

Known EPSG code with custom tolerance and/or precision with an ST_Geometry, SDEBINARY, or Netezza spatial column

An SRID greater than 300,000 is added to the ArcSDE system table.

The EPSG code is used as the spatial reference ID and stored with the geometry.

The EPSG code is used as the spatial reference ID and stored with the geometry.

The EPSG code is used as the spatial reference ID and stored with the geometry.

The EPSG code is used as the spatial reference ID and stored with the geometry.

The EPSG code is used as the spatial reference ID and stored with the geometry.

Known Esri coordinate system with an ST_Geometry, SDEBINARY, or Netezza spatial column

The Esri code is used for the ID and stored with the geometry.

The ID is set to –1.

The ID is null.

The Esri code is used for the ID and stored with the geometry.

Esri coordinate systems are used for projected coordinate systems. Since projected coordinate systems cannot be used with the SQL Server Geography type, an error is returned and the data cannot be imported.

The Esri code is used as the spatial reference ID and stored with the geometry.

Unknown coordinate system with an ST_Geometry, SDEBINARY, PostGIS Geometry, SDO_Geometry, SQL Server Geometry, or Netezza spatial column

An SRID greater than 300,000 is added to the ArcSDE system table.

The ID is set to –1.

The ID is null.

The ID is set to 0.

An error is returned and the data cannot be imported.

The ID is set to 500000.

Custom Oracle coordinate system with an SDO_Geometry column

An SRID greater than 300,000 is added to the ArcSDE system table.

The ID is set to –1.

The custom Oracle ID is used if it is set in the source. If not set, the SRID is set to null in the target database.

The ID is set to 0.

An error is returned and the data cannot be imported.

An error is returned and the data cannot be imported.

Custom coordinate system with a PostGIS Geometry column

An SRID greater than 300,000 is added to the ArcSDE system table.

The custom PostGIS ID is used, if it is set in the source. If not set, the ID is set to –1 in the target database.

The ID is null.

The ID is set to 0.

An error is returned and the data cannot be imported.

An error is returned and the data cannot be imported.

When pasting or importing data to a DB2 or Informix database, ArcGIS also checks the spatial reference table for a match; if one is not found, a new record with the new information is added to the spatial references table. See your IBM documentation for more information about the IDs used.

Spatial data with an unknown spatial reference cannot be published as a service from ArcGIS. To publish the data, create a query layer on it and specify a spatial reference on the query layer.

6/19/2015