A spatial database is a general-purpose
database (usually a
relational database
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
) that has been enhanced to include
spatial data that represents objects defined in a
geometric space, along with tools for
querying and analyzing such data. Most spatial databases allow the representation of simple geometric objects such as
points
Point or points may refer to:
Places
* Point, Lewis, a peninsula in the Outer Hebrides, Scotland
* Point, Texas, a city in Rains County, Texas, United States
* Point, the NE tip and a ferry terminal of Lismore, Inner Hebrides, Scotland
* Point ...
,
lines and
polygons. Some spatial databases handle more complex structures such as
3D objects,
topological coverages, linear networks, and
triangulated irregular networks (TINs). While typical databases have developed to manage various numeric and character
types of data, such databases require additional functionality to process spatial data types efficiently, and developers have often added ''geometry'' or ''feature'' data types. The
Open Geospatial Consortium (OGC) developed the
Simple Features specification (first released in 1997) and sets standards for adding spatial functionality to database systems. The ''
SQL/MM Spatial'' ISO/IEC standard is a part the SQL/MM multimedia standard and extends the Simple Features standard with data types that support circular interpolations.
[
]
Geodatabase
A geodatabase (also geographical database and geospatial database) is a
database of
geographic data
Geographic data and information is defined in the ISO/TC 211 series of standards as data and information having an implicit or explicit association with a location relative to Earth (a geographic location or geographic position).
It is also c ...
, such as
countries
A country is a distinct part of the world, such as a state (polity), state, nation, or other polity, political entity. It may be a sovereign state or make up one part of a larger state. For example, the country of Japan is an independent, so ...
,
administrative divisions,
cities, and related information. Such databases can be useful for websites that wish to
identify the locations of their visitors for customization purposes.
Characteristics
Database systems use indexes to quickly look up values; however, this way of indexing data is not optimal for
spatial queries. Instead, spatial databases use a spatial index to speed up database operations.
In addition to typical SQL queries such as SELECT statements, spatial databases can perform a wide variety of spatial operations. The following operations and many more are specified by the
Open Geospatial Consortium standard:
*Spatial Measurements: Computes line length, polygon area, the distance between geometries, etc.
*Spatial Functions: Modify existing features to create new ones, for example by providing a buffer around them, intersecting features, etc.
*Spatial Predicates: Allows true/false queries about spatial relationships between geometries. Examples include "do two polygons overlap" or 'is there a residence located within a mile of the area we are planning to build the landfill?' (see
DE-9IM)
*Geometry Constructors: Creates new geometries, usually by specifying the vertices (points or nodes) which define the shape.
*Observer Functions: Queries which return specific information about a feature such as the location of the center of a circle.
Some databases support only simplified or modified sets of these operations, especially in cases of
NoSQL
A NoSQL (originally referring to "non- SQL" or "non-relational") database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. Such databases have existed ...
systems like
MongoDB and
CouchDB.
Spatial index
Spatial indices are used by spatial databases (databases which store information related to objects in space) to optimize
spatial queries. Conventional index types do not efficiently handle spatial queries such as how far two points differ, or whether points fall within a spatial area of interest. Common spatial index methods include:
*
Binary space partitioning (BSP-Tree): Subdividing space by hyperplanes.
*
Bounding volume hierarchy (BVH)
*
Geohash
*
Grid (spatial index)
*
HHCode
*
Hilbert R-tree
*
kd-tree
*
m-tree
In computer science, M-trees are tree data structures that are similar to R-trees and B-trees. It is constructed using a metric and relies on the triangle inequality for efficient range and k-nearest neighbor (k-NN) queries.
While M-trees can perf ...
– an m-tree index can be used for the efficient resolution of similarity queries on complex objects as compared using an arbitrary metric.
*
Octree
*
PH-tree
The PH-tree is a tree data structure used for spatial indexing of multi-dimensional data (keys) such as geographical coordinates, points, feature vectors, rectangles or bounding boxes.
The PH-tree is space partitioning index with a structur ...
*
Quadtree
*
R-tree
R-trees are tree data structures used for spatial access methods, i.e., for indexing multi-dimensional information such as geographical coordinates, rectangles or polygons. The R-tree was proposed by Antonin Guttman in 1984 and has found sign ...
: Typically the preferred method for indexing spatial data. Objects (shapes, lines and points) are grouped using the
minimum bounding rectangle (MBR). Objects are added to an MBR within the index that will lead to the smallest increase in its size.
*
R+ tree
*
R* tree
*
UB-tree
*
X-tree
*
Z-order (curve)
Spatial query
A spatial query is a special type of
database query supported by spatial databases, including geodatabases. The queries differ from non-spatial
SQL queries in several important ways. Two of the most important are that they allow for the use of geometry data types such as points, lines and polygons and that these queries consider the spatial relationship between these geometries.
The function names for queries differ across geodatabases. The following list contains commonly used functions built into
PostGIS, a free geodatabase which is a PostgreSQL extension (the term 'geometry' refers to a point, line, box or other two or three dimensional shape):
Function prototype: ''functionName (parameter(s)) : return type ''
*Distance(geometry, geometry) : number
*Equals(geometry, geometry) : boolean
*Disjoint(geometry, geometry) : boolean
*Intersects(geometry, geometry) : boolean
*Touches(geometry, geometry) : boolean
*Crosses(geometry, geometry) : boolean
*Overlaps(geometry, geometry) : boolean
*Contains(geometry, geometry) : boolean
*Length(geometry) : number
*Area(geometry) : number
*
Centroid(geometry) : geometry
Spatial database management systems
List
*
AllegroGraph
AllegroGraph is a closed source triplestore which is designed to store RDF triples, a standard format for Linked Data.
It also operates as a document store designed for storing, retrieving and managing document-oriented information, in JSON-LD ...
– a
graph database which provides a mechanism for efficient storage and retrieval of two-dimensional geospatial coordinates for
Resource Description Framework The Resource Description Framework (RDF) is a World Wide Web Consortium (W3C) standard originally designed as a data model for metadata. It has come to be used as a general method for description and exchange of graph data. RDF provides a variety of ...
data. It includes an extension syntax for
SPARQL queries.
*
ArangoDB - a multi-model database which provides geoindexing capability.
*
Apache Drill - A MPP SQL query engine for querying large datasets. Drill supports spatial data types and functions similar to PostgreSQL.
*
Caliper extends the
Raima Data Manager with spatial datatypes, functions, and utilities.
*
CouchDB a document-based database system that can be spatially enabled by a plugin called Geocouch
*
Elasticsearch is a document-based database system that supports two types of geo data: geo_point fields which support lat/lon pairs, and geo_shape fields, which support points, lines, circles, polygons, multi-polygons, etc.
*
GeoMesa is a cloud-based spatio-temporal database built on top of
Apache Accumulo
Apache Accumulo is a highly scalable sorted, distributed key-value store based on Google's Bigtable. It is a system built on top of Apache Hadoop, Apache ZooKeeper, and Apache Thrift. Written in Java, Accumulo has cell-level access labels a ...
and
Apache Hadoop
Apache Hadoop () is a collection of open-source software utilities that facilitates using a network of many computers to solve problems involving massive amounts of data and computation. It provides a software framework for distributed storage ...
(also supports
Apache HBase,
Google Bigtable,
Apache Cassandra, and
Apache Kafka
Apache Kafka is a distributed event store and stream-processing platform. It is an open-source system developed by the Apache Software Foundation written in Java and Scala. The project aims to provide a unified, high-throughput, low-latency plat ...
). GeoMesa supports full OGC
Simple Features and a GeoServer plugin.
*
H2 supports geometry types and spatial indices as of version 1.3.173 (2013-07-28). An extension called H2GIS available on Maven Central gives full OGC
Simple Features support.
* Any edition of
IBM Db2
Db2 is a family of data management products, including database servers, developed by IBM. It initially supported the relational model, but was extended to support object–relational features and non-relational structures like JSON a ...
can be spatially-enabled to implement the OpenGIS spatial functionality with SQL spatial types and functions.
*
IBM Informix Geodetic and Spatial datablade extensions auto-install on use and expand Informix's datatypes to include multiple standard coordinate systems and support for RTree indexes. Geodetic and Spatial data can also be incorporated with Informix's Timeseries data support for tracking objects in motion over time.
*
Linter SQL Server supports spatial types and spatial functions according to the OpenGIS specifications.
*
Microsoft SQL Server has support for spatial types since version 2008
*
MonetDB/GIS extension for
MonetDB adds OGS Simple Features to the relational
column-store database.
*
MySQL DBMS implements the datatype ''geometry'', plus some spatial functions implemented according to the OpenGIS specifications. However, in MySQL version 5.5 and earlier, functions that test spatial relationships are limited to working with minimum bounding rectangles rather than the actual geometries. MySQL versions earlier than 5.0.16 only supported spatial data in MyISAM tables. As of MySQL 5.0.16, InnoDB, NDB, BDB, and ARCHIVE also support spatial features.
*
Neo4j – a
graph database that can build 1D and 2D indexes as
B-tree,
Quadtree and
Hilbert curve directly in the
graph
*
OpenLink Virtuoso has supported SQL/MM since version 6.01.3126, with significant enhancements including
GeoSPARQL in Open Source Edition 7.2.6, and in Enterprise Edition 8.2.0
*
Oracle Spatial
*
PostgreSQL
PostgreSQL (, ), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the In ...
DBMS (database management system) uses the extension
PostGIS to implement OGC-compliant spatial functionality, including standardized datatype ''geometry'' and corresponding functions.
*
Redis
Redis (; Remote Dictionary Server) is an in-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Redis supports different kinds of abstract data structures, su ...
with the Geo API.
*
RethinkDB supports geospatial indexes in 2D.
*
SAP HANA supports geospatial with SPS08.
*
Smallworld VMDS, the native GE
Smallworld GIS database
*
Spatial Query Server {{Infobox Software
, name = Boeing Spatial Query Server
, logo = Boeing full logo.svg
, logo size = 240px
, screenshot = Sqs viewer.jpg
, screenshot size = 255px
, caption ...
from
Boeing spatially enables Sybase ASE.
*
SpatiaLite extends
Sqlite with spatial datatypes, functions, and utilities.
*
Tarantool
Tarantool is an in-memory computing platform with a flexible data schema, best used for creating high-performance applications. Two main parts of it are an in-memory database and a Lua application server.
Tarantool maintains data in memory and ...
supports geospatial queries with RTREE index.
[ ]
*
Teradata Geospatial
Teradata Corporation is an American software company that provides cloud database and analytics-related software, products, and services. The company was formed in 1979 in Brentwood, California, as a collaboration between researchers at Caltech ...
includes 2D spatial functionality (OGC-compliant) in its data warehouse system.
*
Vertica Place, the geo-spatial extension for
HP Vertica
Vertica Systems is an analytic database management software company. Vertica was founded in 2005 by the database researcher Michael Stonebraker, with Andrew Palmer as the founding CEO. Ralph Breslauer and Christopher P. Lynch served as later ...
, adds OGC-compliant spatial features to the relational
column-store database.
Table of free systems especially for spatial data processing
See also
*
Geographic information system
A geographic information system (GIS) is a type of database containing Geographic data and information, geographic data (that is, descriptions of phenomena for which location is relevant), combined with Geographic information system software, sof ...
(GIS)
*
GeoSPARQL
*
Glacio-geological databases
Glacio-geological databases compile data on glacially associated sedimentary deposits and erosional activity from former and current ice-sheets, usually from published peer-reviewed sources. Their purposes are generally directed towards two ends: ( ...
*
Location intelligence
In business intelligence, location intelligence (LI), or spatial intelligence, is the process of deriving meaningful insight from geospatial data relationships to solve a particular problem. It involves layering multiple data sets spatially and/or ...
*
Multimedia database
*
Nearest neighbor search
*
Object-based spatial database
An object-based spatial database is a spatial database that stores the location as objects. The object-based spatial model treats the world as surface littered with recognizable objects (e.g. cities, rivers), which exist independent of their locati ...
*
Simple Features
*
Spatial analysis
*
Spatial ETL
Spatial extract, transform, load (spatial ETL), also known as geospatial transformation and load (GTL), provides the data processing functionality of traditional extract, transform, load (ETL) software, but with a primary focus on the ability to ma ...
*
Spatiotemporal database
References
Further reading
Spatial Databases: A Tour Shashi Shekhar and Sanjay Chawla, Prentice Hall, 2003 ()
Spatial Databases – With Application to GISPhilippe Rigaux, Michel Scholl and Agnes Voisard.
Morgan Kaufmann Publishers. 2002 ()
Evaluation of Data Management Systems for Geospatial Big DataPouria Amirian, Anahid Basiri and Adam Winstanley. Springer. 2014 ()
External links
An introduction to PostgreSQL PostGIS SOAA Trigger Based Security Alarming Scheme for Moving Objects on Road NetworksSajimon Abraham, P. Sojan Lal, Published by Springer Berlin / Heidelberg-2008.
ArcGIS Resource Center description of a geodatabase
{{Authority control
Geometric algorithms