Show / Hide Table of Contents

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-null spatial reference is required.

System.Double distance

The distance to buffer.

LinearUnit unit

The unit of measure for the distance.

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
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
Relevant samples
Buffer: Create a buffer around a map point and display the results as a `Graphic`
Route around barriers: Find a route that reaches all stops without crossing any barriers.

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 doubles. 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.

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 unionResult is true, the resulting collection contains a single polygon. If geometries is empty, returns an empty enumerable.

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
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.2 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.1 - 200.7
Xamarin.Android100.1 - 100.14
Xamarin.iOS100.1 - 100.15
UWP100.1 - 200.7
In This Article
Back to top Copyright © 2022 Esri.