Select to view content in your preferred language

What is the difference: Coordinate System v.s. Spatial Reference?

2635
2
Jump to solution
03-26-2013 02:30 PM
SuiHuang
Frequent Contributor
Hi Everybody:

    I am trying to create a script that takes coordinate system as an input, but after checking the list of data types I found that both Spatial Reference and Coordinate System types are suitable (see attached picture). Which should I use? or what are the difference between them?
    Thank you!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor
Check out this help page on Spatial References. The coordinate system, along with resolution and tolerance are properties of the spatial reference.

View solution in original post

0 Kudos
2 Replies
LucasDanzinger
Esri Frequent Contributor
Check out this help page on Spatial References. The coordinate system, along with resolution and tolerance are properties of the spatial reference.
0 Kudos
GhislainPrince
Esri Contributor
tl/dr version: they're the same.

Longer version: From the script tool standpoint there is no difference.

if your tool has a SpatialReference parameter, the user of said script tool will get identical experience to a CoordinateSystem.

Once upon a time they were different, the UI/user experience for these 2 types were different, SpatialReference had additional parameters (XY, Z & M Domains). That is no longer the case as of the 9.2 release.

For backward compatibility we kept both types, thought they are are interchangeable and basically identical.

You can glimpse a difference by doing arcpy.AddWarning(arcpy.GetParameterAsText(i)) in your script. They have different string values. But when you turn around and pass these values into other gp tools/arcpy api, the two slightly different strings behave identically.


SpatialReference string representation

GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119522E-09;0.001;0.001;IsHighPrecision


While CoordinateSystem looks like this
GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]
0 Kudos