This topic describes spatial reference systems (SRSs) and the spatial_ref_sys table.
Overview
An SRS defines how to map spatial objects in GanosBase to specific positions on the surface of the earth.
SRSs can be classified into the following types:
Geodetic coordinate system: maps spatial objects to the surface of the earth by using a system of coordinates based on latitude and longitude. Unit: degrees.
Projected coordinate system: uses mathematical projections to flatten the spherical surface of the earth onto a plane.
In a projected coordinate system, you can directly calculate distances, areas, and angles.
A projected coordinate system is a Cartesian coordinate system that consists of a defined origin and two orthogonal axes.
Each projected coordinate system specifies its own unit of measurement, meters or feet in most cases.
Each projected coordinate system defines the range of applicable coordinates.
Local coordinate system: a Cartesian coordinate system that does not use the surface of the earth as a reference.
spatial_ref_sys table
The spatial_ref_sys
table is a built-in spatial reference system table in GanosBase that conforms to the Open Geospatial Consortium (OGC) standards. The spatial_ref_sys covers more than 8500 known SRSs, together with the detailed information required for converting and reprojecting between the SRSs. You can create custom projections that conform to the PROJ4 standard.
The following table describes the columns in the spatial_ref_sys table.
Column name | Data type | Description |
srid | integer | The unique identifier of the SRS. |
auth_name | varchar(256) | The name of the standard or standard organization of the SRS. |
auth_srid | integer | The unique identifier of the SRS in its standard or standard organization. |
srtext | varchar(2048) | The Well-Known Text (WKT) representation of the SRS. |
proj4text | varchar(2048) | The PROJ4 representation of the SRS. |
In GanosBase, you can use the ST_SrReg function to register a new SRS and the ST_SrEqual function to compare two SRSs.