geos_buffer_multi_point

Geometric functions > geos_buffer_multi_point

syntax

  • geos_buffer_multi_point(multipoint_data_item, buffer_distance, nrPointsInCircle)

description

geos_buffer_multi_point(multipoint_data_item, buffer_distance, nrPointsInCircle) creates a buffer polygon around each coordinate of the multipoint_data_item. The result is a polygon data item with the same domain as the multipoint_data_item.

The buffer_distance is a Float64 value that specifies the radius of the buffer in the units of the coordinate system of the multipoint_data_item.

The nrPointsInCircle is a UInt8 value that specifies the number of points used to approximate the circle per source point. A higher value results in a smoother buffer but increases computation time. The minimum value is 3.

The geos_ prefix of the function name indicates that the implementation of the operator uses geos.

applies to

arc or polygon geometry as first argument

The first argument has multipoint composition. An arc or polygon attribute as first argument is deprecated: it works, with a deprecation warning, and GeoDMS 21 will refuse it. Make multipoint geometry with points2multi_point.

buffering the vertices of arc or polygon geometry

To buffer the vertices of an arc or polygon attribute as a set of points, first convert that geometry to multipoint composition. Decompose it into its vertices with sequence2points and rebuild a multipoint with points2multi_point, grouping by the relation back to the original geometry:

// geom is an (arc) or (polygon) attribute on domain district
unit<uint32> vertices := sequence2points(district/geom);   // point, sequence_rel (-> district), ordinal
attribute<fpoint> mpoints (district, multipoint) := points2multi_point(vertices/point, vertices/sequence_rel, vertices/ordinal);
attribute<fpoint> buffer_geometry (district)     := geos_buffer_multi_point(mpoints, 50.0, 8b);

The result is the same as when the arc or polygon attribute is passed directly. The conversion only makes the multipoint composition explicit, so there is no deprecation warning.

conditions

  1. buffer_distance must be a positive value.
  2. nrPointsInCircle must be at least 3.

since version

example

attribute<fpoint> points          (road, multipoint) := points2multi_point(point, Sequence_rel, ordinal);
attribute<fpoint> buffer_geometry (road)             := geos_buffer_multi_point(points, 50.0, 8b);

see also

GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.