Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are all SQL Geospatial implementations database specific?

My team is looking into geospatial features offered by different database platforms.

Are all of the implementations database specific, or is there a ANSI SQL standard, or similar type of standard, which is being offered, or will be offered in the future?

I ask, because I would like the implemented code to be as database agnostic as possible (our project is written to be ANSI SQL standard).

Is there any known plan for standardization of this functionality in the future?

like image 647
pearcewg Avatar asked Mar 16 '09 19:03

pearcewg


People also ask

What is SQL spatial database?

Spatial data represents information about the physical location and shape of geometric objects. These objects can be point locations or more complex objects such as countries/regions, roads, or lakes. SQL Server supports two spatial data types: the geometry data type and the geography data type.

How do spatial databases differ from regular databases?

It is important to make the distinction between typical databases and spatial databases. Spatial databases are standard databases that have been extended to accept spatial data types and queries. Spatial data types store feature geometry that describes shape and location.

Does Azure SQL support spatial data?

Azure PostgreSQL with PostGIS Extension A key extension within PG is called PostGIS, which would be recognised as a best-of-breed feature to support many spatial types and functions. It can store both Vector and Raster.

What is geometry data type in SQL?

The planar spatial data type, geometry, is implemented as a common language runtime (CLR) data type in SQL Server. This type represents data in a Euclidean (flat) coordinate system. SQL Server supports a set of methods for the geometry spatial data type.


2 Answers

Currently, there are more than one specifications followed by popular proprietary and open source implementations of spatial databases:

  • The OpenGIS - Simple Features for SQL
  • ISO SQL Multimedia Specification for Spatial - ISO/IEC 13249-3:2006 - Information technology -- Database languages -- SQL multimedia and application packages -- Part 3: Spatial

PostGIS, Oracle, Microsoft SQL Server and to some limited degree MySQL, all the databases implement the standard interfaces to manipulate spatial data. However, in spite of this fairly standardized features, all databases usually differ on simple SQL level what may make the database-agnostic implementation of your solution tricky. You likely need to survey the features you are interested and compare what various vendors provide.

like image 136
mloskot Avatar answered Sep 21 '22 09:09

mloskot


For example GIS extensions for MySQL and for PostgreSQL both follow OpenGIS "Simple Features Specification for SQL" standard.

like image 43
vartec Avatar answered Sep 25 '22 09:09

vartec