The database control of spatial data is based on an integration strategy that depends on ESRI ArcSDE. ArcSDE�s Projection Engine does the actual creation and maintenance of the coordinate system and spatial data. Therefore spatial data must be defined and understood within the limitations of ArcSDE. The ArcSDE Projection Engine supports 2D projected and geographic coordinate system with the naming convention containing PE_PROJCS and PE_GEOGCS structures. A PE_COORDSYS superclass also exists to manipulate active PE_PROJCS or PE_GEOGCS objects. Also, any extension must be made using the projection engine to create the new version of the coordinate system. The only exemption to this rule is where a coordinate system is used to tag an original coordinate value that is preserved in it�s native state along with the normalized value that is converted to the database default coordinate system.
The ESRI ArcSDE Projection Engine imposes some rules concerning coordinate system definition. First, the coordinate system is known by a standard numeric code value. This code is based on codes provided by EPSG. Where ESRI has expanded or contracted this list, their code values will take precedence. Finally, users may make their own extensions but they must follow the guidelines prescribed by ESRI. If additions are made, they are expected to integrate with the use of the ArcSDE projection engine and therefore should follow the extension guidelines provided by ESRI. For more information on how to make projection engine comparable coordinate system definitions see the ESRI web page, http://arcsdeonline.esri.com/index.htm and follow the links, Developer Interfaces> C API> C API Concepts> Coordinate Systems and Projections> Using persistent user defined objects.
Once you define a numeric code value for each new object representing coordinate systems, you can use that code in your applications and databases. Code values are reserved and users should make extensions using codes in the 200000-299999 (or higher) range. EPGS reserves codes from 1-32766. ESRI-defined objects have codes in the 32670-50000 and the 100000-199999 ranges. You must add 200000 to a standard code value when defining a new object. For example, predefined spheroids use 7001-7999. You must use 207001-207999 for enterprise-defined spheroids. If an extension edits the content for an existing code, the new definition will override the internal, standard one. This is a bad practice. User-defined code ranges are:
� 209000-209099 for Linear units
� 209100-209199 for Angular units
� 207000-207999 for Spheroids
� 206000-206999 for Datums
� 208900-208999 for Prime meridians
� 204000-204999 for Geogcs
� 202000-202999 for Projcs
� 208000-208399 for Geogtran
While using an agreed upon number to stand in for a full coordinate system definition is easy for software it is not a full definition. The complete understanding of the coordinate system variables is needed and is also available. This data is kept in the attribute OpenGIS_Well_Known_Text. A coordinate system is an assemblage of key geodetic names, parameters, values and units. They are concatenated in a long string in ASCII format as well known text. The complete set of information specifying the structure of well known text (WKT) is described by the standards organization OpenGIS consortium (OGC) in Simple Features Specification for SQL and Coordinate Transformation Services documents.
There are three options for defining the standard 2D types of coordinate reference system (CRS), geographic and projected. These methods will populate reference data in R_Coordinate_Ref_System and include:
� A coordinate system is defined by giving a recognized ESRI ArcSDE coordinate reference system code, contained in the ESRI ArcSDE pedef.h file. This is the most compact option. By providing the ESRI ArcSDE coordinate reference system code, all of the defining parameters and the coordinate reference system units are implicit. Additional key attributes are optional but are provided with all delivered CRS values. These other key attributes include, R_Coordinate_Ref_System.Name, R_Coordinate_Ref_System.Original_Source, R_Coordinate_Ref_System.Source_Version and R_Coordinate_Ref_System.OpenGIS_Well_Known_Text.
� A coordinate system is defined by creating a new ESRI ArcSDE coordinate reference system code using the ESRI projection engine utility as outlined above. If the coordinate reference system is not part of the ESRI ArcSDE pedef.h file, or if one or more components (for example the axes units) vary from the ESRI ArcSDE reference it is a different coordinate reference system and must be redefined. All minimum defining parameters also need to be explicitly given. This extended coordinate system must follow the code numbering convention given by ESRI and should not be considered shareable across implementations unless there are prior arrangements.
� A coordinate system is defined by creating another external or proprietary CRS code value outside of the scope of the ESRI ArcSDE projection engine utility. This CRS is unknown to the system but the code may be used to tag legacy or original coordinates or for mapping coordinate system names between GIS vendor systems.
The minimum parameters contained in OpenGIS_Well_Known_Text required by EPSG to define a 2D geographic coordinate reference system are:
� geographical coordinate reference system name
� geographical coordinate reference system axes units
� geodetic datum name, if this is different from the geographic CRS name
� ellipsoid name
� ellipsoid defining parameters:
o semi-major axis value
o semi-major axis units name
o inverse flattening value
The minimum parameters contained in OpenGIS_Well_Known_Text required by EPSG to define a 2D projected coordinate reference system are:
� projected coordinate reference system name
� geographic coordinate reference system as described above, except that the geographic coordinate reference system axes units are not required
� map projection (coordinate conversion) name
� name of map projection (coordinate operation) method
� map projection (coordinate operation) parameters, values and units
The minimum parameters required to define a local 3D coordinate system in project scope for a compound (2D + 1D) coordinate system are:
� horizontal coordinate reference system definition as a 2D projected or geographic coordinate reference system described above
� A vertical coordinate reference system defined in R_Vertical_Reference
� An azimuth reference defined by the class Azimuth_Reference and generally describing the north direction as true north, magnetic north or grid
Generally a local coordinate system for an engineering coordinate system is not georeferenced. However an engineering 2D coordinate reference system can be indirectly georeferenced if:
� an affine or similarity transformation to a projected coordinate reference system is defined
� the projected coordinate reference system is defined as above
While many coordinate systems have standard and shareable definitions these are generally 2D or may vary between specific GIS vendor application architectures. Additionally may coordinate systems have a locally specified vertical component which must be defined in the project. An important aspect of using these project scope coordinate systems is to find and reuse the correct coordinates system rather than recreate identical copies every time new data is loaded. This is the match and merge process. The problem is that there is no reliable natural identifier for coordinate systems. To alleviate this issue an inclusive natural key for Coordinate system was created containing all possible attributes comprising; CRS, Vertical_Reference, Azimuth_Reference_Id, Coordinate_System_Type, From_Coord_Sys_Id, Name, Carto_Transform, Z_Offset, X_Offset, Y_Offset, Rotation_Z, Rotation_X and Rotation_Y. This is more than what is useful but the intention is that a local implementation can customize a subset of the complete list according to their individual business rules for database identifiers. The expected subset would always contain the elements relevant to local 3D coordinate systems including; CRS, Vertical_Reference, Azimuth_Reference_Id, Coordinate_System_Type and From_Coord_Sys_Id.