geo_is_geometry
Validates a geospatial
object.
boolean geo_is_geometry(any*)
The parameter any*
can be any geometric object.
The function determines if the given input is a valid geometry object.
- Returns false if the parameter returns zero or more than 1 item.
- Returns NULL if the parameter returns NULL.
- Returns true if the input is a single valid geometry object. Otherwise, false.
Example: Determine if the location pointing to the city hall is
a valid geometric
object.
SELECT geo_is_geometry(t.poi.location) AS city_hall
FROM PointsOfInterest t
WHERE t.poi.kind = "city hall"
Explanation: You use the function geo_is_geometry to determine if a given location is a valid geometric object or not.
Result:
{ "city_hall" : true}