Converts a spatial reference string from the Esri well-known text (WKT) format to the Open Geospatial Consortium (OGC) WKT format.
Syntax
cstring ST_SrFromEsriWkt(cstring sr);Parameters
| Parameter | Description |
|---|---|
| sr | The spatial reference string in Esri WKT format. |
Examples
The following example converts a CGCS2000 (China Geodetic Coordinate System 2000) spatial reference string from Esri WKT to OGC WKT. Notice that the DATUM name changes from D_China_2000 to China_2000 — the D_ prefix is removed in the output.
SELECT ST_SrFromEsriWkt('GEOGCS["China Geodetic Coordinate System 2000",DATUM["D_China_2000",SPHEROID["CGCS2000",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]');Output:
st_srfromesriwkt
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]