Geometric functions

Geometric functions calculate with geometries (coordinates) of points, arcs or polygons

point

  • point_xy - make a point attribute based on an X and Y attribute
  • point_yx - make a point attribute based on an Y and X attribute
  • point_isnearby - compare if two points are (almost) the same location
  • pointrow - get the row numbers of a point attribute
  • pointcol - get the column numbers of a point attribute
  • get_x - get the x coordinate of a point attribute
  • get_y - get the y coordinate of a point attribute
  • dist(ance) - calculate the distance between two point sets
  • sq(ua)r(e)dist(ance) - calculate the square distance between two arrays of points
  • bg_buffer_point - creates a buffer polygon for each point in a pointset
  • point - DEPRECIATED: make a point attribute based on an X and Y attribute
  • join_near_values - creates a new unit with points nearby other points
  • [[bp_buffer_point]]
  • [[bp_buffer_multi_point]]
  • bg_buffer_point
  • bg_buffer_multi_point - creates a buffer polygon for each coordinate of the arc/polygon
  • [[cgal_buffer_point]]
  • [[cgal_buffer_multi_point]]
  • [[geos_buffer_point]]
  • [[geos_buffer_multi_point]]

polygon

  • area - calculates the surface area of each polygon
  • centroid - center of mass of each polygon
  • centroid_or_mid - the centroid if it is located within a polygon or else a mid-point of a polygon.
  • poly2grid - a grid representation of polygons
  • poly2grid_untiled - a grid representation of polygons
  • poly2allgrids - a cross-table representation of polygons and raster cells
  • poly2allgrids_uint64 - a uint64 cross-table representation of polygons and raster cells
  • lower_bound - the lowest X and Y values of the points in each polygon
  • upper_bound - the highest X and Y values of the points in each polygon
  • center_bound - the center X and Y values of the points in each polygon
  • points2polygon - functions to create polygons from sequences of points
  • sub-(difference) - a cutout of a polygon in another polygon, where both domains match or one is void
  • mul-(polygon-intersection) - the overlap of two arrays of polygons, where both domains match or one is void
  • add-(union) - the element-by-element union of two polygons, where both domains match or one is void
  • box_connectivity - domain unit with the connected polygons based on their bounding box (this should be less precise but faster than polygon_connectivity)

Operators based on the boost-polygon library (usually slower than the _bg__-variants, and can only process integer coordinates):

Several boost polygon functions can be combined in a single operator; for the full list of those combinations, see here

Operators based on the boost-geometry library (usually faster and can process float64 (a.k.a. double) coordinates):

  • bg_buffer_multi_polygon - creates a buffer polygon for each multi polygon
  • bg_buffer_single_polygon - creates a buffer polygon for each single polygon; see for documentation: bg_buffer_multi_polygon
  • bg_difference - takes the difference of the polygon arguments, where both domains match or one is void. min operator, automatically chosen if - is used, and using fpoint or dpoint coordinates.
  • bg_intersect - intersect the polygon arguments, where both domains match, or one is void
  • bg_outer_multi_polygon - selects only the outer ring of a multi polygon
  • bg_outer_single_polygon - selects only the outer ring of a single polygon; see for documentation: bg_outer_multi_polygon
  • bg_overlay_polygon - see overlay_polygon
  • [[bg_polygon]]
  • [[bg_polygon_connectivity]]
  • bg_simplify_multi_polygon - simplify the geometry of a multi polygon
  • bg_simplify_polygon - simplify the geometry of a single polygon, see for documentation: bg_simplify_multi_polygon
  • bg_split_polygon
  • bg_split_union_polygon
  • bg_union - union the polygon arguments, where both domains match or one is void plus operator, automatically chosen if + is used, and using fpoint or dpoint coordinates.
  • bg_union_polygon - DO NOT USE: current implementation does not produce reliable results
  • bg_xor - xor the polygon arguments, where both domains match or one is void
  • bg_simplify_polygon - DEPRICIATED simplify the geometry of a polygon

For examples, see here.

Operators based on the [[geos]] library (usually faster, can process float64 (a.k.a. double) coordinates, and more reliable):

  • [[geos_buffer_multi_polygon]] - creates a buffer polygon for each multi polygon
  • [[geos_difference]] - takes the difference of the polygon arguments, where both domains match or one is void. min operator, automatically chosen if - is used, and using fpoint or dpoint coordinates.
  • [[geos_intersect]] - intersect the polygon arguments, where both domains match, or one is void
  • [[geos_overlay_polygon]] - see overlay_polygon
  • [[geos_polygon]]
  • [[geos_polygon_connectivity]]
  • [[geos_simplify_multi_polygon]] - simplify the geometry of a multi polygon
  • [[geos_split_polygon]]
  • [[geos_split_union_polygon]]
  • [[geos_union]] - union the polygon arguments, where both domains match or one is void plus operator, automatically chosen if + is used, and using fpoint or dpoint coordinates.
  • [[geos_union_polygon]]
  • [[geos_xor]] - xor the polygon arguments, where both domains match or one is void

MISSING:

  • geos_simplify_single_polygon - simplify the geometry of a single polygon, see for documentation: bg_simplify_multi_polygon
  • geos_buffer_single_polygon - creates a buffer polygon for each single polygon; see for documentation: bg_buffer_multi_polygon
  • geos_outer_single_polygon - selects only the outer ring of a single polygon; see for documentation: bg_outer_multi_polygon
  • [[geos_outer_multi_polygon]] - selects only the outer ring of a multi polygon

Operators based on the [[cgal]] library:

  • [[cgal_difference]]
  • [[cgal_intersect]]
  • [[cgal_overlay_polygon]]
  • [[cgal_polygon]]
  • [[cgal_polygon_connectivity]]
  • [[cgal_split_polygon]]
  • [[cgal_split_union_polygon]]
  • [[cgal_union]]
  • [[cgal_union_polygon]]
  • [[cgal_xor]]

points/arcs

  • dyna_point / dyna_point_with_ends - configures a point set for an arc on an equal distance
  • dyna_segment / dyna_segments_with_ends - configures a segment set for an arc on an equal distance

points/polygons

arc/polygon

points/arcs/polygons

conversion