-
Notifications
You must be signed in to change notification settings - Fork 1
geos_buffer_multi_point
Geometric functions > geos_buffer_multi_point
- geos_buffer_multi_point(multipoint_data_item, buffer_distance, nrPointsInCircle)
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.
- attribute multipoint_data_item with a point value type and multipoint composition
- parameter buffer_distance with a Float64 value type
- parameter nrPointsInCircle with a UInt8 value type
Since version 20.2.0 the first argument is expected to have multipoint composition. Passing an arc or polygon attribute is deprecated: it still works but produces a deprecation warning, and is slated to become an error in a future major version. Construct genuine multipoint geometry with points2multi_point. Before 20.2.0 this operator accepted arc or polygon geometry (their coordinates were treated as a set of points).
If you want to buffer the vertices of an existing 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 buffered result is the same as it was when arc or polygon geometry was passed directly before 20.2.0; the conversion only makes the multipoint composition explicit, so no deprecation warning is issued.
- buffer_distance must be a positive value.
- nrPointsInCircle must be at least 3.
7.202
attribute<fpoint> points (road, multipoint) := points2multi_point(point, Sequence_rel, ordinal);
attribute<fpoint> buffer_geometry (road) := geos_buffer_multi_point(points, 50.0, 8b);
- geos_buffer - picks the buffer variant by composition
- geos_buffer_point
- geos_buffer_linestring
- geos_buffer_multi_polygon
- bg_buffer_multi_point
- bp_buffer_multi_point
- cgal_buffer_multi_point
- points2multi_point - construct multipoint geometry
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.