I have a table with some geometry types in and need to be able to return the SRID of a given field. How can I do this. I have had a search but all I can find is the function to alter a SRID. In Oracle I am doing this:
A.CLUSTER_EXTENT.SDO_SRID Is there an equivalent function in PostGIS?
The syntax is find_srid(<db/schema>, <table>, <column>) and the function returns the integer SRID of the specified column by searching through the GEOMETRY_COLUMNS table. If the geometry column has not been properly added with the AddGeometryColumns() function, this function will not work either.
A spatial reference identifier (SRID) is a unique identifier associated with a specific coordinate system, tolerance, and resolution.
Each spatial instance has a spatial reference identifier (SRID). The SRID corresponds to a spatial reference system based on the specific ellipsoid used for either flat-earth mapping or round-earth mapping. A spatial column can contain objects with different SRIDs.
SRID of 0 doesn't technically exist, it just means no SRID — ie, the default if you forget to set it. Zero is a valid SRID, your PostGIS configurations will set for some default value, that in a fresh installation will be WGS84, srid 4326 .
ST_SRID will give you the SRID of a single geometry. Use Find_SRID for getting the SRID of a column.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With