A spatial database is a database that is optimized to store and query data that is related to objects in space, including points, lines and polygons. While typical databases can understand various numeric and character types of data, additional functionality needs to be added for databases to process spatial data types. These are typically called geometry or feature.
As of 2011, only Oracle Spatial is largely supported. Basically, most of the Relational Database Management Systems (MySQL, Postgres, …) can be used as a spatial database in Orbit. Therefore, some additional fields are required en the geometry needs to be stored using well-known text or well-known binary. Points can also be saved by storing their coordinates in separate fields.
Different syntaxes are used within spatial databases for representing vector geometry objects.
| RDBMS using a text markup language | |||
|---|---|---|---|
| VALUE | DESCRIPTION | DIMENSION | GEOMETRY |
| SpatialCLOB | Well-known text | 2D / 3D | points / lines / areas |
| SpatialBLOB | Well-known binary | 2D / 3D | points / lines / areas |
| RDBMS using separate coordinate fields | |||
| VALUE | DESCRIPTION | DIMENSION | GEOMETRY |
| PointXY | text | 2D | points |
| PointXYZ | text | 3D | points |
| Oracle Spatial | |||
| VALUE | DIMENSION | GEOMETRY | |
| com.orbitgis.orbitx.driver.spatialsql.oracle10.Ty peOracleSpatial | 2D / 3D | points / lines / areas | |
| Oracle Spatial | |||
|---|---|---|---|
| NAME | TYPE | COMMENT | EXAMPLE |
| <OBJECTID_COLUMN> | Integer | Unique identifier | OG_OBJ_ID |
| <SPATIAL_COLUMN> | Longtext | vector geometry | OG_GEOM |
| Well-known text / Well-known binary | |||
| NAME | TYPE | COMMENT | EXAMPLE |
| <OBJECTID_COLUMN> | Integer | Unique identifier | OG_OBJ_ID |
| <SPATIAL_COLUMN> | Longtext | vector geometry (WKT/WKB) | OG_GEOM |
| <SPATIAL_COLUMN>MinX | Double | boundary > minimum X | OG_GEOMMinX |
| <SPATIAL_COLUMN>MaxX | Double | boundary > maximum X | OG_GEOMMaxX |
| <SPATIAL_COLUMN>MinY | Double | boundary > minimum Y | OG_GEOMMinY |
| <SPATIAL_COLUMN>MaxY | Double | boundary > maximum X | OG_GEOMMaxY |
| Separate coordinates | |||
| NAME | TYPE | COMMENT | EXAMPLE |
| <OBJECTID_COLUMN> | Integer | Unique identifier | OG_OBJ_ID |
| <SPATIAL_COLUMN_X> | Double | x-coordinate | OG_COORD_X |
| <SPATIAL_COLUMN_Y> | Double | y-coordinate | OG_COORD_Y |
| <SPATIAL_COLUMN_Z> | Double | z-coordinate (3D) | OG_COORD_Z |
The Orbit Database File describes how spatial information is stored in an external database and allows the translation of spatial data from a database into an Orbit dataset, which can be considered as a map layer.
In an odb-file, the following characteristics are determined:
Each odb-file is editable in a common text editor, but it is very important to take into account the hierarchical structure.