Method BufferGeodetic
BufferGeodetic(Geometry, Double, LinearUnit, Double, GeodeticCurveType)
Calculates the geodesic buffer of a given geometry.
Declaration
public static Geometry BufferGeodetic(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- |
Double | distance | The distance to buffer. |
LinearUnit | unit | The unit of measure for the |
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.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.15 |
Relevant samples
BufferGeodetic(IEnumerable<Geometry>, IEnumerable<Double>, LinearUnit, Double, GeodeticCurveType, Boolean)
Calculates the geodesic buffer of the geometries in a given collection.
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 |
---|---|---|
IEnumerable<Geometry> | geometries | A collection of geometries. |
IEnumerable<Double> | distances | The distance to buffer each geometry, expressed as a sequence of double. If the size of the distances collection is less than the number of geometries, the last distance value is used for the rest of geometries. |
LinearUnit | distanceUnit | The unit of measure for the distance. |
Double | maxDeviation | The maximum deviation between points. |
GeodeticCurveType | curveType | The curve type to calculate. |
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 |
---|---|
IEnumerable<Geometry> | A collection of polygon geometries that represent a geodesic buffer at the desired distance(s) relative to the given geometries.
If |
Remarks
The geometries must have consistent, non-null
spatial references.
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 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.1 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 100.14 |