Spatial database
Adapted from Wikipedia Β· Discoverer experience
A spatial database is a special kind of database that has been made better to include spatial data. This means it can work with information about objects in a geometric space, like where things are and how they are shaped. It has tools to ask questions about this spatial data and to analyze it.
Most spatial databases can show simple shapes such as points, lines, and polygons. Some can even handle more complicated shapes like 3D objects, topological coverages, and triangulated irregular networks. Regular databases are good at handling numbers and words, but they need extra features to work well with spatial data.
A geographic database is a type of spatial database that stores and works with geographic data, which is information linked to places on Earth. This is very useful for geographic information systems (GIS). Today, most database systems have added special features for spatial data, and some GIS companies have made their own additions too.
The Open Geospatial Consortium created the Simple Features specification to help make sure databases can handle spatial data in a standard way. There is also a standard called SQL/MM Spatial that adds spatial features to the structured query language.
Characteristics
A spatial database is a special kind of database that can store and work with maps and shapes. It adds new types of data that let it hold points, lines, and areas, which are ways to show real-world objects like cities, roads, and parks.
These databases also let people ask special questions using regular database language. For example, you can find out how far two places are from each other, see if one area overlaps another, or create new shapes by changing existing ones. This helps in many map-related tasks.
Spatial index
A spatial index helps a spatial database work faster when looking for places or objects. Normal databases use simple lists to find things, but this doesnβt work well for maps or 3D spaces. So spatial databases use special kinds of indexes made just for places.
Some common ways to make a spatial index include:
- Binary space partitioning (BSP-Tree)
- Bounding volume hierarchy (BVH)
- Geohash
- Grid (spatial index)
- HHCode
- Hilbert R-tree
- k-d tree
- m-tree
- Octree
- PH-tree
- Quadtree
- R-tree β often the best way to organize spatial data. It groups objects by their minimum bounding rectangle (MBR).
- R+ tree
- R* tree
- UB-tree
- X-tree
- Z-order (curve)
Spatial query
A spatial query is a special kind of search that spatial databases can do. These databases can handle maps and shapes, like points, lines, and areas. The queries are different from regular database searches because they look at how these shapes relate to each other.
Different databases use different names for their search tools. For example, PostGIS, a free tool that adds map features to PostgreSQL, has many useful functions. Some of these include checking the distance between points, seeing if shapes touch or overlap, and finding the size or center of a shape. These tools help answer questions like which cities are inside which countries.
Spatial database management systems
Main category: Spatial database management systems
Main category: Geographical databases
Spatial database management systems are special tools that help computers store and work with maps and locations. These systems can handle simple shapes like points, lines, and areas, and some can even manage more complex 3D objects and networks.
Here are some examples of these special tools:
- AllegroGraph β works with maps for web data.
- ArangoDB β can find places in maps.
- Apache Drill β queries big sets of map data.
- Apache Sedona β processes maps at large scales.
- Esri Geodatabase β a special map system that works with many databases.
- Caliper β adds map features to another database system.
- CouchDB β a document database that can be updated to work with maps.
- Elasticsearch β supports different types of map data like points and shapes.
- GeoMesa β a cloud-based map database built on Apache Accumulo and Apache Hadoop (also supports Apache HBase, Google Bigtable, Apache Cassandra, and Apache Kafka).
- H2 β supports map types and indexes.
- Any edition of IBM Db2 can be updated to work with maps.
- IBM Informix β adds map features automatically.
- Linter SQL Server β works with map types and functions.
- Microsoft SQL Server β supports map types since version 2008.
- MonetDB/GIS β adds map features to a database.
- MySQL β supports map data types and functions.
- Neo4j β a graph database that can build indexes for maps.
- OpenLink Virtuoso β supports map features.
- Oracle Spatial
- PostgreSQL β uses PostGIS to add map features.
- Redis β with a special map tool.
- RethinkDB β supports map indexes in 2D.
- SAP HANA β supports maps with SPS08.
- Smallworld VMDS β the native map database for Smallworld.
- SpaceTime β a commercial map database.
- Spatial Query Server from Boeing β updates another database to work with maps.
- SpatiaLite β adds map features to a lightweight database.
- Tarantool β supports map queries.
- Teradata Geospatial β includes map features in its data system.
- Vertica Place β adds map features to a database.
- Wherobots β a cloud-based map platform built on Apache Sedona.
| DBS | License | Distributed | Spatial objects | Spatial functions | PostgreSQL interface | UMN MapServer interface | Documentation | Modifiable | HDFS |
|---|---|---|---|---|---|---|---|---|---|
| Apache Drill | Apache License 2.0 | Yes | Yes | Yes - Drill Geospatial Functions Documentation | Yes | No | Official Documentation | ANSI SQL | Yes |
| ArangoDB | Apache License 2.0 | Yes | Yes | Yes - capabilities overview query language functions | No | No | official documentation | AQL | No |
| GeoMesa | Apache License 2.0 | Yes | Yes (Simple Features) | Yes (JTS) | No (manufacturable with GeoTools) | No | parts of the functions, a few examples | with Simple Feature Access in Java Virtual Machine and Apache Spark are all kinds of tasks solvable | Yes |
| H2 (H2GIS) | LGPL 3 (since v1.3), GPL 3 before | No | Yes (custom, no raster) | Simple Feature Access and custom functions for H2Network | Yes | No | Yes (homepage) | SQL | No |
| Ingres | GPL or proprietary | Yes (if extension is installed) | Yes (custom, no raster) | Geometry Engine, Open Source | No | with MapScript | just briefly | with C and OME | No |
| Neo4J-spatial | GNU affero general public license | No | Yes (Simple Features) | Yes (contain, cover, covered by, cross, disjoint, intersect, intersect window, overlap, touch, within and within distance) | No | No | just briefly | fork of JTS | No |
| PostgreSQL with PostGIS | GNU General Public License | No | Yes (Simple Features and raster) | Yes (Simple Feature Access and raster functions) | Yes | Yes | detailed | SQL, in connection with R | No |
| Postgres-XL with PostGIS | Mozilla public license and GNU general public license | Yes | Yes (Simple Features and raster) | Yes (Simple Feature Access and raster functions) | Yes | Yes | PostGIS: yes, Postgres-XL: briefly | SQL, in connection with R or Tcl or Python | No |
| Rasdaman | server GPL, client LGPL, enterprise proprietary | Yes | just raster | raster manipulation with rasql | Yes | with Web Coverage Service or Web Processing Service | detailed wiki | own defined function in enterprise edition | No |
| RethinkDB | AGPL | Yes | Yes | distance getIntersecting getNearest includes intersects | No | No | official documentation | forking | No |
Related articles
This article is a child-friendly adaptation of the Wikipedia article on Spatial database, available under CC BY-SA 4.0.
Safekipedia