ST_SrFromEsriWkt

更新时间: 2026-03-28 04:58:30

Converts a spatial reference string from Esri well-known text (WKT) format to Open Geospatial Consortium (OGC) WKT format.

Syntax

cstring ST_SrFromEsriWkt(cstring sr);

Parameters

ParameterDescription
srThe spatial reference string in Esri WKT format.

Return value

Returns a cstring containing the spatial reference in OGC WKT format.

Usage notes

The conversion normalizes DATUM names to OGC conventions. For example, the Esri DATUM name D_China_2000 becomes China_2000 in OGC WKT — the D_ prefix is stripped.

Examples

Convert a China Geodetic Coordinate System 2000 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]]
上一篇: ST_SrReg 下一篇: Trajectory SQL reference