Converts a spatial reference string from Esri well-known text (WKT) format to Open Geospatial Consortium (OGC) WKT format.
Esri WKT and OGC WKT represent coordinate systems differently: Esri prefixes datum names with D_ (for example, D_China_2000), while OGC WKT does not.
Syntax
cstring ST_SrFromEsriWkt(cstring sr)Parameters
| Parameter | Description |
|---|---|
sr | The spatial reference string in Esri WKT format. |
Example
Convert the China Geodetic Coordinate System 2000 (CGCS2000) spatial reference from Esri WKT to OGC WKT:
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:
GEOGCS["China Geodetic Coordinate System 2000",DATUM["China_2000",SPHEROID["CGCS2000",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]The datum name changes from D_China_2000 (Esri WKT) to China_2000 (OGC WKT) — this is the key transformation the function performs.