[postgis] The SPATIAL_REF_SYS table

Paul Ramsey pramsey at refractions.net
Fri Sep 21 10:10:16 PDT 2001

"Roderick A. Anderson" wrote:

> 1. What is (should be) the difference in the values of the columns SRID
>    and AUTH_SRID in the SPATIAL_REF_SYS table?

OGC seems to have made a bit of a compromise when they defined this...
because there are organizations out there already, like EPSG, which have
lists of projections defined with set identifiers, they put in this
extra column. So if you were defining an SRID which already had an EPSG
code, the 'SRID' would be the local ID you would use for your database,
and the AUTH_SRID would be the EPSD id number. So for example, you might

   1  |   EPSG     |   1624     | <big SRTEXT string>

The Big List of EPSG SRIDs which Frank helped put together at
http://www.opengis.org/techno/interop/EPSG2WKT.TXT is especially useful
for filling out a SPATIAL_REF_SYS table. Note that the SRID number can
be anything you like: it is local to your computer, unline the EPSG
code, which is defined in the EPSG standard.

> 2. Does my table design make sense?  The idea being I can select a
>    random rectangle of elevations or the points for a range of
>    elevations.
>         gistest=> \d elevation_pnt
>               Table "elevation_pnt"
>          Attribute |   Type   | Modifier
>         -----------+----------+----------
>          elevation | bigint   |
>          pnt       | geometry |
>         Indices: elevation_pnt_elev_idx,
>                  elevation_pnt_idx
>         Constraints: (srid(pnt) = 26711)
>                      (geometrytype(pnt) = 'POINT'::text)

Looks fine to me.

> 3. Can I have more than one SRID in this table?  If so how do I change
>    the constraints to allow this?

No, OpenGIS (correctly) expects you to store your features homogeneously
with regard to spatial ref system. I am guessing that you want to store
multiple UTM zone information in the same table? Bear in mind that when
you do that, you are no longer storing things in a 'seamless tile'. It
is like storing all your features in coordinates relative to the USGS
quad they are in: sure, theoretically the data is seamless, but
practically it is very hard to work with data which crosses the sheet
lines. I'd suggest you find a nice planar projection which works for
your entire working area, rather than messing with multiple UTM zones.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get your FREE VeriSign guide to security solutions for your web site: encrypting transactions, securing intranets, and more!

To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the postgis-users mailing list