Spatial database: Difference between revisions

Content deleted Content added
m Spatial index: add tag "spatial access methods"
 
(One intermediate revision by the same user not shown)
Line 52:
Function prototype: ''functionName (parameter(s)) : return type ''
 
* <code>ST_Distance(geometry, geometry) : number</code>
* <code>ST_Equals(geometry, geometry) : boolean</code>
* <code>ST_Disjoint(geometry, geometry) : boolean</code>
* <code>ST_Intersects(geometry, geometry) : boolean</code>
* <code>ST_Touches(geometry, geometry) : boolean</code>
* <code>ST_Crosses(geometry, geometry) : boolean</code>
* <code>ST_Overlaps(geometry, geometry) : boolean</code>
* <code>ST_Contains(geometry, geometry) : boolean</code>
* <code>ST_Length(geometry) : number</code>
* <code>ST_Area(geometry) : number</code>
* <code>ST_[[Centroid]](geometry) : geometry</code>
* <code>ST_Intersection(geometry, geometry) : geometry</code>
 
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:
 
<code>{{sxhl|2=postgres|SELECT * FROM cities, countries WHERE ST_Contains(countries.shape, cities.shape)</code>}}
 
The Intersect [[vector overlay]] operation (a core element of GIS software) could be replicated as:
 
<code>{{sxhl|2=postgres|SELECT ST_Intersection(veg.shape, soil.shape) int_poly, veg.*, soil.* FROM veg, soil where ST_Intersects(veg.shape, soil.shape)</code>}}
 
==Spatial database management systems==
Line 111:
===Table of free systems especially for spatial data processing===
<!--Entries in this table should be "notable" and already have a sourced Wikipedia article (see WP:GNG).-->
{{sort-under}}
{| class="wikitable sortable sort-under"
! 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]]
| [[Apache License]] 2.0
| {{yes}}
| {{yes}} ([[Simple Features]])
| {{yes}} ([[JTS Topology Suite|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}}
|-
| style="text-align:left" |[[H2 (DBMS)|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}}
|-
| style="text-align:left" |[[Ingres (database)|Ingres]]
| [[GPL]] or proprietary
| {{yes}} (if extension is installed)
| {{yes}} (custom, no raster)
| Geometry Engine, Open Source<ref>{{Cite web | url=http://trac.osgeo.org/geos/ | title=GEOS}}</ref>
| {{no}}
| with MapScript
| just briefly
| with C and OME
| {{no}}
|-
| style="text-align:left" |[[Neo4j|Neo4J]]-spatial<ref>{{Cite web | url=https://github.com/neo4j-contrib/spatial | title=Neo4j Spatial is a library of utilities for Neo4j that facilitates the enabling of spatial operations on data. In particular you can add spatial indexes to already located data, and perform spatial| website=[[GitHub]]| date=2019-02-18}}</ref>
| 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 Topology Suite|JTS]]
| {{no}}
|-
| style="text-align:left" |[[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 (programming language)|R]]
| {{no}}
|-
| style="text-align:left" |[[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 (programming language)|R]] or [[Tcl]] or [[Python (programming language)|Python]]
| {{no}}
|-
| style="text-align:left" |[[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]]
| [[Affero General Public License|AGPL]]
| {{yes}}
| {{yes}}
|
* distance
Line 223 ⟶ 224:
* includes
* intersects
| {{no}}
| {{no}}
| official documentation<ref>{{Cite web | url=https://rethinkdb.com/api/javascript/ | title=ReQL command reference - RethinkDB}}</ref>
| forking
| {{no}}
|}