Skip to main content
Assigns EPSG:4326 or EPSG:3857 CRS metadata to native GEOMETRY. The WKB bytes and every coordinate remain unchanged; use ST_Transform to reproject coordinates.

Syntax

target_srid must be a FE-foldable constant equal to 4326 or 3857. The source CRS must be EPSG:4326, EPSG:3857, or OGC:CRS84. This restricted set keeps the CRS metadata two-dimensional without requiring an external CRS database. SQL coordinates use X/Y order, or longitude/latitude for EPSG:4326. Only XY WKB is supported, across the seven OGC geometry families including collections and EMPTY. A NULL geometry returns NULL; malformed WKB and conflicting CRS metadata produce an error. GEOGRAPHY is not accepted.

Example

Keywords

ST_SETSRID, GEOMETRY, CRS, EPSG GEOMETRY, INT