Geoprocessing functions

Geometry processing functions

The following built-in RiskScape functions are provided for creating or manipulating data that is of geometry type. For more details, see riskscape function list -c geometry_processing.

buffer

Implements buffer geometric function as per the GeoTools reference

centroid

Implements centroid geometric function as per the GeoTools reference

create_point

Creates a geometry point using the given x, y coordinate

geom_from_wkt

Implements geomFromWKT geometric function as per the GeoTools reference

intersection

Implements intersection geometric function as per the GeoTools reference

measure

Will measure either the length or area of a geometry, depending on its geometry type. Points will always return 0. Lines will return the length as per measure_length. Polygon’s will return the area as per measure_area. GeometryCollections will return the sum of all geometries in the collection

measure_area

Measure the area of geometry in metres squared (m²). Note that geometries that are specified in degrees are reprojected before being measured. This will lose accuracy for geometries that are larger than 6° in either direction and eventually fail if too big.

measure_length

Measure the length of a geometry’s perimeter in metres (m). Note that geometries that are specified in degrees are reprojected before being measured. This will lose accuracy for geometries that are larger than 6° in either direction and eventually fail if too big.

sample

Select values from a coverage

sample_centroid

Select a single value from a coverage

segment

Cut a geometry up by a distance specified in metres (m). Polygons are cut in to squares with area distance , linestrings are cut in to pieces of at most distance m in length.

Logical geometry functions

The following built-in RiskScape functions are provided for testing how geometry data types relate to each other, as per the GeoTools spatial predicates. For more details, see riskscape function list -c geometry_logical.

  • bbox

  • beyond

  • contains

  • crosses

  • disjoint

  • dwithin

  • equals

  • intersects

  • overlaps

  • relate

  • touches

  • within