A spatial reference system (SRS) defines how spatial objects in GanosBase map to positions on the Earth's surface.
SRS types
GanosBase supports three types of SRSs:
| Type | Description | Unit |
|---|---|---|
| Geodetic coordinate system | Maps spatial objects using latitude and longitude on the Earth's surface | Degrees |
| Projected coordinate system | Flattens the Earth's spherical surface onto a plane using mathematical projections, enabling direct calculation of distances, areas, and angles | Meters or feet (varies by SRS) |
| Local coordinate system | A Cartesian coordinate system that does not reference the Earth's surface | Varies |
How projected coordinate systems work: Think of shining a light through a globe onto a surrounding sheet of paper — the shadow on the paper is a projection of the globe's surface. A projected coordinate system does the same mathematically, using a defined origin and two orthogonal axes to create a flat Cartesian grid. Each projected SRS defines its own unit of measurement and the range of valid coordinates.
The spatial_ref_sys table
GanosBase includes a built-in spatial_ref_sys table that conforms to Open Geospatial Consortium (OGC) standards. 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 SRSs that conform to the PROJ4 standard.
Table columns
| Column | Data type | Description |
|---|---|---|
srid | integer | Unique identifier of the SRS within GanosBase |
auth_name | varchar(256) | Name of the standards body that defined the SRS (for example, EPSG) |
auth_srid | integer | Identifier of the SRS within its standards body |
srtext | varchar(2048) | Well-Known Text (WKT) representation of the SRS |
proj4text | varchar(2048) | PROJ4 representation of the SRS |
Register a custom SRS
Use ST_SrReg to register a new SRS not included in the built-in table. This is useful when working with a proprietary or regional coordinate system outside the default 8,500+ SRSs.
Compare two SRSs
Use ST_SrEqual to check whether two SRSs are equivalent — for example, before combining spatial data from different sources.