Content deleted Content added
No edit summary |
k-d tree |
||
Line 5:
Most spatial databases allow the representation of simple geometric objects such as [[Point (geometry)|points]], [[Line (geometry)|lines]] and [[polygon]]s. Some spatial databases handle more complex structures such as [[Solid geometry|3D objects]], [[Coverage data|topological coverages]], linear networks, and [[triangulated irregular network]]s (TINs). While typical databases have developed to manage various numeric and character [[data type|types of data]], such databases require additional functionality to process spatial data types efficiently, and developers have often added ''geometry'' or ''feature'' data types.
'''Geographic database''' (or '''geodatabase''') is a [[georeferenced]] spatial database, used for storing and manipulating [[geographic data]] (or geodata, i.e., data associated with a ___location on Earth),{{efn|The term "geodatabase" may also refer specifically to a set of proprietary spatial database formats, [[Geodatabase (Esri)]].}} especially in [[geographic information systems]] (GIS). Almost all current relational and object-relational database management systems now have spatial extensions, and some GIS software vendors have developed their own spatial extensions to database management systems.
The [[Open Geospatial Consortium]] (OGC) developed the ''[[Simple Features]]'' specification (first released in 1997)<ref>{{cite web | url = http://www.opengeospatial.org/ogc/historylong | title = OGC History (detailed) | last1 = McKee | first1 = Lance | year = 2016 | publisher = OGC | access-date = 2016-07-12 | quote = [...] 1997 [...] OGC released the OpenGIS Simple Features Specification, which specifies the interface that enables diverse systems to communicate in terms of 'simple features' which are based on 2D geometry. The supported geometry types include points, lines, linestrings, curves, and polygons. Each geometric object is associated with a Spatial Reference System, which describes the coordinate space in which the geometric object is defined.}}</ref> and sets standards for adding spatial functionality to database systems.<ref>
Line 28 ⟶ 27:
A '''spatial index''' is used by a spatial database to optimize [[spatial query|spatial queries]]. Database systems use indices to quickly look up values by sorting data values in a linear (e.g. alphabetical) order; however, this way of indexing data is not optimal for [[spatial query|spatial queries]] in two- or three-dimensional space. Instead, spatial databases use a ''spatial'' index designed specifically for multi-dimensional ordering.<ref name="GISTBOK_indexing">{{cite web |last1=Zhang |first1=X. |last2=Du |first2=Z. |title=DM-66 Spatial Indexing |url=http://gistbok.ucgis.org/bok-topics/spatial-indexing |website=GIS&T Body of Knowledge |publisher=UCGIS |access-date=5 January 2023}}</ref> 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]]
* [[
* [[m-tree]] – 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]]
* [[Quadtree]]
* [[R-tree]]: Typically the preferred method for indexing spatial data.<ref>{{Cite book |last=Güting |first=Ralf Hartmut |title=Moving Objects Databases |last2=Schneider |first2=Markus |publisher=Morgan Kaufmann |year=2005 |isbn=9780120887996 |pages=262 |language=en}}</ref> 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{{anchor|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.
Line 54 ⟶ 52:
Function prototype: ''functionName (parameter(s)) : return type ''
* ST_Distance(geometry, geometry) : number
* ST_Equals(geometry, geometry) : boolean
* ST_Disjoint(geometry, geometry) : boolean
* ST_Intersects(geometry, geometry) : boolean
* ST_Touches(geometry, geometry) : boolean
* ST_Crosses(geometry, geometry) : boolean
* ST_Overlaps(geometry, geometry) : boolean
* ST_Contains(geometry, geometry) : boolean
* ST_Length(geometry) : number
* ST_Area(geometry) : number
* ST_[[Centroid]](geometry) : geometry
* ST_Intersection(geometry, geometry) : geometry
Thus, a [[spatial join]] between a points layer of cities and a polygon layer of countries could be performed in a spatially-extended SQL statement as:
Line 82 ⟶ 80:
<!--Entries in this list should be "notable" and already have a sourced Wikipedia article (see WP:GNG).-->
* [[AllegroGraph]] – a [[graph database]] which provides a mechanism for efficient storage and retrieval of two-dimensional geospatial coordinates for [[Resource Description Framework]] data.{{citation needed|date=July 2016}} 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 <ref>[https://drill.apache.org/docs/gis-functions/] Drill Geospatial Function Documentation</ref> similar to PostgreSQL.
* Esri [[Geodatabase]] (Enterprise, Mobile) - a proprietary spatial database structure and logical model that can be implemented on several relational databases, both commercial (Oracle, MS SQL Server, Db2) and open source (PostgreSQL, SQLite)
Line 104 ⟶ 102:
* [[SAP HANA]] supports geospatial with SPS08.<ref>{{Cite web | url=http://help.sap.com/hana/sap_hana_spatial_reference_en.pdf | title=SAP Help Portal}}</ref>
* [[Smallworld]] [[VMDS]], the native GE [[Smallworld]] GIS database
* [https://www.mireo.com/spacetime SpaceTime] is a commercial spatiotemporal database built on top of the proprietary multidimensional index similar to the
* [[Spatial Query Server]] from [[Boeing]] spatially enables Sybase ASE.
* [[SpatiaLite]] extends [[Sqlite]] with spatial datatypes, functions, and utilities.
Line 116 ⟶ 114:
! DBS !! License !! Distributed !! Spatial objects !! Spatial functions !! [[PostgreSQL]] interface !! UMN [[MapServer]] interface !! Documentation !! Modifiable !! [[HDFS]]
|-
| [[Apache Drill]]
| [[Apache License 2.0]]
| yes
| yes
| yes - [https://drill.apache.org/docs/gis-functions/ Drill Geospatial Functions Documentation]
| yes
| no
| Official [https://drill.apache.org/docs/ Documentation]
| ANSI [[SQL]]
| yes
|-
| [[ArangoDB]]
| [[Apache License 2.0]]
| yes
| yes
| yes - [https://www.arangodb.com/community-server/geojson-support-geospatial-queries/ capabilities overview] [https://www.arangodb.com/docs/stable/aql/functions-geo.html query language functions]
| no
| no
| official [https://www.arangodb.com/docs/stable/aql/functions-geo.html documentation]
| AQL
| no
|-
| style="text-align:left" |[[GeoMesa]]
Line 153 ⟶ 151:
| no
| yes (custom, no raster)
| [[Simple Feature Access]] and custom functions for H2Network
| yes
| no
Line 215 ⟶ 213:
| no
|-
| [[RethinkDB]]
| [[Affero General Public License|AGPL]]
| yes
| yes
|
* distance
Line 225 ⟶ 223:
* includes
* intersects
| no
| no
| official documentation<ref>{{Cite web | url=https://rethinkdb.com/api/javascript/ | title=ReQL command reference - RethinkDB}}</ref>
| forking
| no
|}
|