Functions on GeoJson Data
boolean geo_intersect(any*, any*)
Raises an error if it can be detected at compile time that an operand will not return a single valid geometry object. Otherwise, the runtime behavior is as follows:
- Returns false if any operand returns 0 or more than 1 items.
- Returns NULL if any operand returns NULL.
- Returns false if any operand returns an item that is not a valid geometry object.
boolean geo_inside(any*, any*)
Raises an error if it can be detected at compile time that an operand will not return a single valid geometry object. Otherwise, the runtime behavior is as follows:
- Returns false if any operand returns 0 or more than 1 items.
- Returns NULL if any operand returns NULL.
- Returns false if any operand returns an item that is not a valid geometry object (however, if it can be detected at compile time that an operand will not return a valid geometry, an error is raised).
- Returns false if the second operand returns a geometry object that is not a polygon.
boolean geo_within_distance(any*, any*, double)
Raises an error if it can be detected at compile time that any of the first two operands will not return a single valid geometry object. Otherwise, the runtime behavior is as follows:
- Returns false if any of the first two operands returns 0 or more than 1 items.
- Returns NULL if any of the first two operands returns NULL.
- Returns false if any of the first two operands returns an item that is not a valid geometry object.
boolean geo_near(any*, any*, double)
geo_near is converted internally to geo_within_distance plus an (implicit) order-by the distance between the two geometries. However, if the query has an (explicit) order-by already, no ordering by distance is performed. The geo_near function can appear in the WHERE clause only, where it must be a top-level predicate, i.e, not nested under an OR or NOT operator.
double geo_distance(any*, any*)
Raises an error if it can be detected at compile time that an operand will not return a single valid geometry object. Otherwise, the runtime behavior is as follows:
- Returns -1 if any operand returns zero or more than 1 items.
- Returns NULL if any operand returns NULL.
- Returns -1 if any of the operands is not a geometry.
boolean geo_is_geometry(any*)
- Returns false if the operand returns zero or more than 1 items.
- Returns NULL if the operand returns NULL.
- Returns true if the input is a single valid geometry object. Otherwise, false.