Searching GeoJSON Data
The Oracle NoSQL Database has the following functions to use for searching GeoJSON data that has some relationship with a search geometry.
-
boolean geo_intersect(any*, any*) -
boolean geo_inside(any*, any*) -
boolean geo_within_distance(any*, any*, double) -
boolean geo_near(any*, any*, double)In addition to the search functions, two other functions are available, and listed as the last two rows of the table:
Table 1 - GeoJSON Search Functions
| Function | Type | Details |
|---|---|---|
geo_intersect(any*, any*) |
boolean | Raises an error at compile time if the function can detect that any operand will not return a single valid GeoJson object. Otherwise, the runtime behavior is as follows:
|
geo_inside(any*, any*) |
boolean | Raises an error at compile time if the function can detect that any operand will not return a single valid GeoJson object. Otherwise, the runtime behavior is as follows:
|
geo_within_distance(any*, any*, double) |
boolean | Raises an error at compile time if the function detects that the first two operands will not return a single valid GeoJson object. Otherwise, the runtime behavior is as follows:
|
geo_near(any*, any*, double) |
boolean | The geo_near funcion is converted internally to a geo_within_distance function, with an an (implicit) order by the distance between the two geometries. However, if the query has an (explicit) order-by already, the function performs no ordering by distance. The geo_near function can appear only in the WHERE clause, and must be a top-level predicate. The geo_near function cannot be nested under an OR or NOT operator. |
geo_distance(any*, any*) |
double | Raises an error at compile time if the function detects that an operand will not return a single valid GeoJson object. Otherwise, the runtime behavior is as follows:
|
geo_is_geometry(any*) |
boolean |
|