Method BufferGeodetic
BufferGeodetic(Geometry, Double, LinearUnit, Double, GeodeticCurveType)
Calculates the geodesic buffer of a given geometry.
Declaration
public static Geometry BufferGeodetic(this Geometry geometry, double distance, LinearUnit unit, double maxDeviation = NaN, GeodeticCurveType geodeticCurveType = GeodeticCurveType.Geodesic)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geometry | The geometry to buffer. A non- |
System.Double | distance | The distance to buffer. |
LinearUnit | unit | The unit of measure for the |
System.Double | maxDeviation | The maximum deviation between points. |
GeodeticCurveType | geodeticCurveType | The curve type to calculate. |
Returns
Type | Description |
---|---|
Geometry | The Polygon that represents the buffered area. |
Remarks
Geodesic buffers account for the actual shape of the Earth. Distances are calculated between two points on a curved surface (the geoid) as opposed to two points on a flat surface (the Cartesian plane).
Negative distance
can be used to create buffers 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.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.0 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |
Relevant samples
BufferGeodetic(IEnumerable<Geometry>, IEnumerable<Double>, LinearUnit, Double, GeodeticCurveType, Boolean)
Creates and returns a geodesic buffer or buffers relative to the given collection of geometries.
Declaration
public static IEnumerable<Geometry> BufferGeodetic(IEnumerable<Geometry> geometries, IEnumerable<double> distances, LinearUnit distanceUnit, double maxDeviation = NaN, GeodeticCurveType curveType = GeodeticCurveType.Geodesic, bool unionResult = false)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Geometry> | geometries | A collection of geometries. |
System.Collections.Generic.IEnumerable<System.Double> | distances | The distance to buffer each geometry, expressed as a sequence of |
LinearUnit | distanceUnit | The unit of measure for the distance. |
System.Double | maxDeviation | The maximum deviation between points. If System.Double.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. |
GeodeticCurveType | curveType | The GeodeticCurveType used to calculate the buffer. |
System.Boolean | unionResult | Return a single geometry that buffers all the geometries (true), or one buffer for each in the given collection (false). |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Geometry> | A collection of polygon geometries that represent a geodesic buffer at the desired distance(s) relative to the given geometries.
If |
Remarks
Geodesic buffers account for the actual shape of the Earth. Distances are calculated between two points on a curved surface (the geoid) as opposed to two points on a flat surface (the Cartesian plane).
Negative distances
can be used to create buffers inside polygons.
Using a negative buffer distance shrinks the polygons' boundaries by the distance specified.
Note that if the negative buffer distance is large enough, polygons may collapse to empty geometries.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.2 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.1 - 200.5 |
Xamarin.Android | 100.1 - 100.14 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 200.5 |