Geospatial Objects
This article describes geospatial objects in Exasol.
Geospatial data is information that identifies geographic features, locations, and boundaries on Earth. By using geospatial data, you can store and analyze geographical information. In Exasol, geospatial data is stored as GEOMETRY
objects that are defined through coordinates stored as strings, for example, 'POINT(2 5)'
.
The following types of geospatial objects can be defined in Exasol:
Constructor | Description |
---|---|
GEOMETRY
|
General abstraction of any geospatial object |
POINT (X Y)
|
Point within the two-dimensional area |
LINESTRING (X Y, X Y,...)
|
LineString that connects several two-dimensional Points |
LINEARRING (X Y, X Y,...)
|
A LineString whose start and end Points are identical |
POLYGON ((X Y,...)[,(X Y,...),...])
|
Area defined by a linear ring and an optional list of holes within this area |
GEOMETRYCOLLECTION (geometry,...)
|
A collection of any geospatial objects |
MULTIPOLYGON ((X Y,...),...)
|
Set of Polygons |
MULTILINESTRING ((X Y,...),...)
|
Set of LineStrings |
MULTIPOINT (X Y,...)
|
Set of Points |
To create an empty set of a geospatial object you can use the keyword EMPTY
instead of numerical arguments. For example: POLYGON EMPTY
.
Example
POINT(2 5) -- PT
LINESTRING(11 1, 15 2, 15 10) -- L
POLYGON((5 1, 5 5, 9 7, 10 1, 5 1),
(6 2, 6 3, 7 3, 7 2, 6 2)) -- PG
MULTIPOINT(0.1 1.4, 2.2 3, 1 6.4)
MULTILINESTRING((0 1, 2 3, 1 6), (4 4, 5 5))
MULTIPOLYGON(((0 0, 0 2, 2 2, 3 1, 0 0)),
((4 6, 8 9, 12 5, 4 6), (8 6, 9 6, 9 7, 8 7, 8 6)))
GEOMETRYCOLLECTION(POINT(2 5), LINESTRING(1 1, 15 2, 15 10))
Included geometry data types:
POINT
- pLINESTRING
- lsMULTILINESTRING
- mlsPOLYGON
- pgMULTIPOLYGON
- mpGEOMETRY
- gGEOMETRYCOLLECTION
- gcINTEGER
- n
GEOMETRY
columns can optionally have an SRID (spatial reference system identifier), which defines a reference coordinate system that acts as a constraint. For more information, see EXA_SPATIAL_REF_SYS