All Products
Search
Document Center

PolarDB:Spatial reference systems

Last Updated:Mar 28, 2026

A spatial reference system (SRS) defines how GanosBase maps spatial objects to specific positions on Earth's surface.

SRS types

GanosBase supports three SRS types:

  • Geodetic coordinate system: Maps spatial objects using latitude and longitude. Coordinates are expressed in degrees. Use this system when working with global datasets or when geographic accuracy across large distances matters.

  • Projected coordinate system: Flattens Earth's spherical surface onto a two-dimensional plane using mathematical projections. This produces a Cartesian coordinate system with a defined origin and two orthogonal axes, enabling direct calculation of distances, areas, and angles. Units are typically meters or feet. Each projected coordinate system also defines the valid coordinate range it covers.

  • Local coordinate system: A Cartesian coordinate system that does not use Earth's surface as a reference. Use this for spatial data that is not geographically tied to Earth — for example, floor plans or CAD drawings.

The spatial_ref_sys table

GanosBase includes a built-in spatial_ref_sys table that conforms to the Open Geospatial Consortium (OGC) standard. The table covers more than 8,500 known SRSs, along with the information needed to convert and reproject between them. You can also add custom projections that conform to the PROJ4 standard.

ColumnTypeDescription
sridintegerUnique identifier for the SRS within GanosBase.
auth_namevarchar(256)Name of the standards body or authority that defined this SRS — for example, EPSG.
auth_sridintegerThe SRS identifier assigned by the authority in auth_name.
srtextvarchar(2048)The Well-Known Text (WKT) representation of the SRS. WKT encodes the full coordinate system definition — including datum, projection method, and units — in a human-readable string.
proj4textvarchar(2048)The PROJ4 representation of the SRS. This compact definition string is used by the PROJ4 library to perform coordinate transformations.

To look up a specific SRS, query the table by SRID:

SELECT * FROM spatial_ref_sys WHERE srid = 4326;

Register and compare SRSs

Use ST_SrReg to register a new SRS in GanosBase. This is useful when you need a custom projection that is not included in the default spatial_ref_sys table.

Use ST_SrEqual to check whether two SRSs are equivalent. This is helpful when merging datasets from different sources to confirm that their coordinate systems match before running spatial operations.