Using persistent user-defined objects

You can define persistent object definitions with the Projection Engine software without storing the string definitions after defining the coordinate system. You can also use this to updated or edit existing predefined objects. To allow a platform- and software-independent implementation, we have defined a system environment variable, PEOBJEDITHOME, to store the object definitions.

On UNIX:

setenv PEOBJEDITHOME /path/to/the/data (C shell) PEOBJEDITHOME = /path/to/the/data; export PEOBJEDITHOME (Bourne shell)

On Windows:

set PEOBJEDITHOME \path\to\the\data

Within the PEOBJEDITHOME directory, the object definitions are within a subdirectory called object_edits. Not all files must exist. If you don’t need to define or edit an object, don’t include the file. Use the file names.

datum /* DATUM,code,"name",<spheroid_code> */

geogcs /* GEOGCS,code,"name",<datum_code>,<primem_code>,<unit_code> */

geogtran /* GEOGTRAN,code,"name",<gcs1_code>,<gcs2_code>,<method_code>, <parameter_code1>,<parameter_value1>,..., <parameter_codeN>,<parameter_valueN> */

primem /* PRIMEM,code,"name",<value> */

projcs /* PROJCS,code,"name",<gcs_code>,<projection_code>, <parameter_code1>,<parameter_value1,..., <parameter_codeN>,<parameter_valueN>,<unit_code> */

spheroid /* SPHEROID,code,"name",<semimajor axis>,<1/f> */

unit /* UNIT,code,"name",<value> */

Each file has a particular comma-delimited format. Don’t use commas in any numerical values. Just as when you define a coordinate system definition, you need to define any objects used by a higher level object. For example, if you want to define a geographic coordinate system, you may need to define the spheroid or datum if they aren’t predefined.

Because you define a code for each new object, you can use that code in your programs. Use codes in the 200000-299999 (or higher) range. EPGS reserves 1-32766. ESRI-defined objects are 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 you use an existing code, your new definition will override the internal one. User-defined ranges are:

Linear units 209000-209099

Angular units 209100-209199

Spheroids 207000-207999

Datums 206000-206999

Prime meridians 208900-208999

Geogcs 204000-204999

Projcs 202000-202999

Geogtran 208000-208399

Here are some examples. They would each be located in the appropriate file in the object_edits directory under PEOBJEDITHOME.

UNIT,209100,"my_feet",3.2808

UNIT,9003,"Survey_feet_modified",3.2808

UNIT,PE_U_FOOT_US,"Survey_foot_mod",3.2808

 

SPHEROID,207260,"my_spheroid",6378000,298.1

 

DATUM,206260,"my_datum",207260

DATUM,206261,"my_datum2",PE_S_BESSEL_NAMIBIA

 

PRIMEM,208901,"my_primem",-117.0

PRIMEM,PE_PM_STOCKHOLM,"Stockholm_new",18.0582

 

GEOGCS,204000,"my_gcs",206261,208901,9102

GEOGCS,204000,"my_gcs",206261,208901,PE_U_DEGREE

 

For any predefined object, you can use the code or the macro.

 

PROJCS,202000,”my_pcs”,204000,43004,3082,500000,3088,-112.0,9001

PROJCS,202000,”my_pcs”,204000,PE_PRJ_MERCATOR,PE_PAR_FALSE_NORTHING,500000,

      PE_PAR_FALSE_EASTING,200000,PE_PAR_CENTRAL_MERIDIAN,-112.0,PE_U_METER

 

GEOGTRAN,208004,”my_gt”,4267,4268,PE_MTH_COORDINATE_FRAME,PE_PAR_X_AXIS_TRANSLATION,328.4,PE_PAR_Y_AXIS_TRANSLATION,75.9,PE_PAR_Y_AXIS_TRANSLATION,31.6,PE_PAR_X_AXIS_ROTATION,3.6,PE_PAR_Y_AXIS_ROTATION,2.3,PE_PAR_Z_AXIS_ROTATION,4.7,PE_PAR_SCALE_FACTOR,1.4

 

Changing a low-level object like a unit of measure will affect any other objects that use the unit. For example, if you change the definition of a US survey foot (shown above), all NAD 1927 State Plane coordinate systems will be affected.

Note        Although it’s easier to use the integer numbers for a predefined object, you should instead use the macros. Occasionally, the codes will change because of a conflict or an update by EPSG. The macros won’t change.