The OpenGIS standard

hingo's picture

While the underlying index should be opaque to the user of a DBMS with spatial features, the API used to define spatial types and operate on them is of course more visible. The relevant standard in this space is often referred to as "OpenGIS", however the Open Geospatial Consortium in fact defines a long list of standards. The standard relevant to SQL databases is known more precisely as "OpenGIS Implementation Specification for Geographic information - Simple feature access - Part 2: SQL option" aka "Simple feature access".

It is not meaningful to recite the standard at length in my blog, my focus is instead on actual implementations that I will blog about later. The following points are however worth noting:

  • Products typically support either or both of a Geometry space and Geography space. Shapes in the Geometry type are located on a 2D plane and referred to with (x,y) coordinates. (There can also be more dimensions, but only 2 are supported in practice.) Shapes defined in the Geography space live on a sphere and are refererenced with (latitude, longitude) coordinates.
  • Given that the world is neither a 2D plane, nor a perfect sphere, the GIS standard defines the concept of a SRID = Spatial Reference system ID. In practice this shows up in implementations as a "magic constant" that refers to a well defined projection of the real world to the coordinate system in use. PostGIS functions will use this information to calculate distances with the correct projection. MySQL will silently ignore the SRID and always use Euclidean geometry.

The MariaDB developers have published a nice webcast that demonstrates the operations that are possible to do with good GIS functions: http://blog.mariadb.org/screencast-mariadb-gis-demo/

The SQLite tutorial is easy to approach yet comprehensive overview of the functionality provided by a good implementation of the OpenGIS standard: http://www.gaia-gis.it/gaia-sins/spatialite-tutorial-2.3.1.html

The Simple Feature Access GIS standard: http://www.opengeospatial.org/standards/sfs

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hingo's picture

This post seems to explain

This post seems to explain the difference in reference systems, projections, datums, etc quite well: http://spatialreference.org/ref/epsg/

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • Allowed HTML tags: <h1> <h2> <h3> <h4> <p> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <br> <sup> <div> <blockquote> <pre> <img>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically. (Better URL filter.)

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
10 + 9 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.