Analyzing spatial data
You can use special functions to generate and analyze data about geographic features, and to store and manage the data on which that information is based.
A geographic feature (sometimes called feature, for short) is anything in the real
world that has an identifiable location, or anything that could be imagined as existing at an
identifiable location. Examples of features are:
- An object (that is, a concrete entity of any sort), such as a river, forest, or mountain range.
- A space such as a safety zone around a hazardous site, or the marketing area serviced by a particular business.
- An event that occurs at a definable location; for example, an auto accident that occurred at a particular intersection, or a sales transaction at a specific store.
The term spatial information refers to facts and figures about the locations of geographic
features that the database makes available to its users, such as:
- Locations of geographic features on a map (for example, the longitude and latitude of a city)
- The location of geographic features with respect to one another (for example, the location of all hospitals and clinics within a city, or the proximity of city residents to a particular earthquake zone)
- Ways in which geographic features are related to each other (for example, information that a certain watershed or bridge is contained within a specific region)
- Measurements that apply to one or more geographic features (for example, the distance between an office building and its lot line, or the length of the perimeter of a wildlife preserve)
Spatial information, either by itself or in combination with traditional relational data, can
help institutions and businesses do things such as decide in which areas to provide services or
determine the locations of possible markets. For example:
- The manager of a county welfare district can verify which welfare applicants and recipients actually live within the area that the district services. This can be done by analyzing the geometry of the service area and the addresses of the applicants and recipients.
- The owner of a restaurant chain wants to open new restaurants in nearby cities, and needs to answer to such questions as: Where in these cities are concentrations of the types of people who typically frequent restaurants like mine? Where are the major highways? Where is the crime rate lowest? Where are competing restaurants located? The analysis of spatial data can help to answer these questions.
You can employ additional tools to enhance the insights provided by your spatial data analysis,
for example:
- Visualization tools can graphically display, on a map, information produced by the spatial analysis, such as the location of clients and the proximity of major highways to a proposed restaurant.
- Business intelligence tools can create reports containing associated information, such as the names and descriptions of competitors.
The database provides the following sets of functions that you can use to analyze spatial data:
- Spatial Extender
- These are in-database functions that are integrated with the database and can be used for row-organized data.
- Spatial Analytics
- These are in-database functions that are integrated with the database and can be used for both row-organized and column-organized data.
- Geospatial Toolkit
- These are in-application functions that run in a Spark environment. You can use these functions only if your database either has an integrated Spark environment or is connected to an external Spark environment.
Capability | Spatial Extender | Spatial Analytics | Geospatial Toolkit |
---|---|---|---|
Processing method | In-database execution | In-database execution | Spark distributed processing using data frames |
Data organization | Row-organized only | Row-organized or column-organized | Row-organized or column-organized |
Index type | Spatial grid | (not applicable) | Geohash |
Spatial join (also called spatial relation) functions | Yes | Yes | Yes |
Spatiotemporal join function | No | No | Yes |
Function type | Planar | Planar | Geodetic |
Custom coordinate systems can be used | Yes | Yes | No |
Spatial reference system can be specified by user | Yes | Yes | No |
Default spatial reference system | 0 (undefined) | 4326 (WGS84) | 4326 (WGS84) |
Maximum geometry size (compressed) in the database | 4 MB | 4 MB | Unlimited |
Data Transport Format | Spatial Extender | Spatial Analytics | Geospatial Toolkit |
---|---|---|---|
GeoJSON | No | No | Yes |
WKB | Yes | Yes | Yes |
WKT | Yes | Yes | Yes |
GML | Yes | Yes | No |
KML | Yes (export only) | Yes (export only) | No |
SDE | Yes | Yes | No |
Shapefiles | Yes | Yes | No |