1234567891011121314151617181920212223242526272829303132333435363738394041 |
- -- This example demonstrates how to use the SE_CreateSrtext function
- -- to generate the OpenGIS Well-Known Text for a spatial reference
- -- coordinate system. This text string can be used in the srtext column
- -- of a spatial_references table entry.
- --
- -- SE_CreateSrtext will return the text string associated with the numeric
- -- constants in the ESRI Projection Engine definitions header file.
- -- This file is included with the Informix Spatial DataBlade and can be
- -- found in $INFORMIXDIR/extend/spatial.<version>/include/pedefs.h.
- --
- -- Note that not all constants in this file define coordinate systems;
- -- some constants define coordinate system "building blocks" such as
- -- units of measure, spheroids, datums, projections, etc. SE_CreateSrtext
- -- will still return the text strings for these components, but they
- -- cannot be used in the srtext column of a spatial_references entry.
- -- Only the PE_GCS_xxx and PE_PCS_xxx constants define full coordinate
- -- systems.
- -- Example #1: Clarke 1866 Ellipsoid. This by itself is not a
- -- coordinate system!
- EXECUTE FUNCTION SE_CreateSrtext(7008);
- -- Example #2: North American Datum 1983, unprojected:
- EXECUTE FUNCTION SE_CreateSrtext(4269);
- -- Example #3: UTM zone 17, northern hemisphere, WGS 1984 datum:
- EXECUTE FUNCTION SE_CreateSrtext(32617);
- -- Tip: You can transfer the output of SE_CreateSrtext directly into
- -- the spatial_references table with the following SQL statement.
- -- This example assumes that srid 1000 already exists.
- UPDATE spatial_references
- SET srtext = SE_CreateSrtext(4269) WHERE srid = 1000;
|