Geography Reference
In-Depth Information
The SRID as defined by the authenticating body, which is normally the same as
the SRID defined by OGC standards.
auth_srid
srtext
The definition text used to map the spatial difference in projcs format.
proj4text
The definition text used to map the spatial difference in proj4 format.
Everything in the spatial reference table is straightforward types for integers and strings. The
srtext and proj4text have different meanings depending on what software is reading them.
The srtext field holds information for the projection, ellipsoid, spheroid, and other essential
information that allows any software to be able to translate from one coordinate set to
another. We'll cover this a little more later, but a complete description of everything you will
find in this field is well beyond the scope of this small book. In fact, the smallest book I've
seen describing the basics was over 500 pages!
The proj4text field serves a similar purpose but is used by applications using the open
source Proj.4 library.
Proj.4 and Geos were two of the first open source libraries to be used by many different
spatial databases and GIS applications. These two libraries are now used in close to 100%
of all commercial and open source software used for any kind of spatial or GIS work. Both
libraries are still actively maintained and are available for every platform you would expect to
work with. We'll meet them again later when we take a brief look at some of the GIS
software available for the .NET developer.
For now, all you need to be aware of is that in order to support different spatial coordinate
systems, you must have entries in the spatial_ref_sys table.
As previously mentioned, you don't need every entry in the table; you can get by using only
the SRIDs that your geometry, database, and software use. Since I live in the U.K., I typically
use:
OSGB36, SRID: 27700—Ordnance Survey, meters with false offset at origin.
and
WGS84, SRID: 4326—Worldwide latitude/longitude, degrees with
minute/hour/seconds offset, origin at 0 degrees latitude (the equator) and 0 degrees
longitude (the Prime Meridian).
For other territories, you can import the entire table and see which works best, or you can
look up your territory on the EPSG site at http://www.epsg-registry.org/ and grab only the
definitions you need. If you are using Postgres or PostGIS as your spatial database, the
spatial_ref_sys table is populated in a database template with all the known SRIDs
available when you install the database. Creating your own databases is simply a matter of
using this template to have a fully populated table from the start.
Search WWH ::




Custom Search