The SE_CreateSrtext() function

The SE_CreateSrtext() function returns the OGC well-known text representation of a spatial reference system, given the ESRI Projection Engine ID number for a coordinate system.

The ID numbers are in the file pedef.h, in the directory $INFORMIXDIR/extend/spatial.version/include.

Syntax

SE_CreateSrtext (factory_id integer)
SE_CreateSrtext (factory_id integer, type varchar(64) default NULL)

The type parameter indicates the type of spatial reference system when different types of systems have overlapping IDs. The following table lists the values of the type parameter. You can use either the long type value or the corresponding short type value.

Table 1. Object types

Long type value Short type value Spatial reference system name
geogcs gcs Geographic Coordinate System
projcs pcs Projected Coordinate System
coordsys crs Either the Geographic Coordinate System or the Project Coordinate System
vertcs vcs Vertical Coordinate System
geoxyzcs xyz Geographic Coordinate System with XYZ coordinates
hvcoordsys hvc Horizontal-vertical Coordinate System
datum dat Datum
vdatum vdt Vertical datum
hvdatum hvd Either datum or vertical datum
geogtran gtf Geographic Transform
verttran vtf Vertical Transform
linunit lin Linear units
angunit ang Angular units
unit uni Either linear or angular units
areaunit are Area units
primem pri Prime Meridian
spheriod sph Spheroid
method mth Method
htmethod htm Horizontal method
vtmethod vtm Vertical method
projection prj Projection method
parameter par Parameter

Return type

LVARCHAR

Example

To obtain the spatial reference system text for the 1983 North American Datum:
EXECUTE FUNCTION SE_CreateSrtext(4269);


(expression)  GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SP
              HEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],U
              NIT["Degree",0.0174532925199432955]] 
Tip: You can transfer the output of SE_CreateSrtext() directly into the spatial_references table with the following SQL statement:
UPDATE spatial_references 
   SET srtext = SE_CreateSrtext(4269) WHERE srid = 1000;