bufferGeodeticOrNull

fun bufferGeodeticOrNull(geometry: Geometry, distance: Double, distanceUnit: LinearUnit?, maxDeviation: Double, curveType: GeodeticCurveType): Polygon?

Creates a buffer polygon at the specified distance around the given geometry, calculated using a geodetic curve. Geodetic buffers account for the actual shape of the earth. Distances are calculated between points on a curved surface (the geoid) as opposed to points on a flat surface (the Cartesian plane).

Negative distance can be used to create a buffer inside a Polygon or an Envelope. Using a negative buffer distance shrinks the geometry's boundary by the distance specified. Note that if the negative buffer distance is large enough, the geometry may collapse to an empty polygon.

Supports true curves as input, and may produce a densified curve as output.

Return

The geodetic buffer, or null if an error occurs.

Since

200.1.0

Parameters

geometry

A geometry object.

distance

The distance to buffer the geometry.

distanceUnit

The unit of measure for the distance.

maxDeviation

The maximum deviation between points. If NaN then a maximum deviation of up to 0.2% of the buffer distance, with a maximum of 0.01 meters, aiming to give an output geometry with a smooth boundary.

curveType

The GeodeticCurveType used to calculate the buffer.