pub trait Buffer<F: CoordFloat + FromPrimitive> {
// Required method
fn buffer(&self, size: Length) -> Result<Geometry<F>, String>;
}
Required Methods§
Sourcefn buffer(&self, size: Length) -> Result<Geometry<F>, String>
fn buffer(&self, size: Length) -> Result<Geometry<F>, String>
buffer a geometry up to some distance. GEOS uses a fancier method to determine the resolution, but here, we simply assign points at 15 meter intervals along the curve since that is our typical tolerance for spatial errors. or, if that produces fewer than six points, we use six, since that at least gives us a hexagon.
for GEOS’ approach, see this page
where filletAngleQuantum
is calculated and then used to set the maxCurveSegmentError
before building buffer segments.