Generate multiple individual buffers or a single unioned buffer around multiple points.
Creating buffers is a core concept in GIS proximity analysis that allows you to visualize and locate geographic features contained within a set distance of a feature. For example, consider an area where wind turbines are proposed. It has been determined that each turbine should be located at least 2 km away from residential premises due to noise pollution regulations, and a proximity analysis is therefore required. The first step would be to generate 2 km buffer polygons around all proposed turbines. As the buffer polygons may overlap for each turbine, unioning the result would produce a single graphic result with a neater visual output. If any premises are located within 2 km of a turbine, that turbine would be in breach of planning regulations.
Click/tap on the map to add points. Tap the "Create Buffer(s)" button to draw buffer(s) around the points (the size of the buffer is determined by the value entered by the user). Check the check box if you want the result to union (combine) the buffers. Tap the "Clear" button to start over. The red dashed envelope shows the area where you can expect reasonable results for planar buffer operations with the North Central Texas State Plane spatial reference.
GeometryEngine.Buffer(points, distances, union)to create a
Polygon. The parameter
pointsare the points to buffer around,
distancesare the buffer distances for each point (in meters) and
unionis a boolean for whether the results should be unioned.
- Add the resulting polygons (if not unioned) or single polygon (if unioned) to the map's
The properties of the underlying projection determine the accuracy of buffer polygons in a given area. Planar buffers work well when analyzing distances around features that are concentrated in a relatively small area in a projected coordinate system. Inaccurate buffers could still be created by buffering points inside the spatial reference's envelope with distances that move it outside the envelope. On the other hand, geodesic buffers consider the curved shape of the Earth's surface and provide more accurate buffer offsets for features that are more dispersed (i.e., cover multiple UTM zones, large regions, or even the whole globe). See the "Buffer" sample for an example of a geodesic buffer.
For more information about using buffer analysis, see the topic How Buffer (Analysis) works in the ArcGIS Pro documentation.
analysis, buffer, geometry, planar
<?xml version="1.0" encoding="utf-8" ?> <ContentPage x:Class="ArcGISRuntime.Samples.BufferList.BufferList" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition /> </Grid.RowDefinitions> <Grid Grid.Row="0" Margin="10,0" HorizontalOptions="Center"> <Grid.RowDefinitions> <RowDefinition Height="auto" /> <RowDefinition Height="40" /> <RowDefinition Height="40" /> <RowDefinition Height="40" /> </Grid.RowDefinitions> <Label x:Name="BufferInstructionsLabel" Grid.Row="0" Text="Tap the map to add points. Each point uses the buffer distance entered when it was created. The envelope shows the area where you can expect reasonable results for planar buffers with this map's spatial reference." /> <StackLayout Grid.Row="1" Orientation="Horizontal"> <Label Text="Buffer distance (miles):" VerticalOptions="Center" /> <Entry x:Name="BufferDistanceMilesEntry" Text="10" /> </StackLayout> <StackLayout Grid.Row="2" Orientation="Horizontal"> <Label Text="Union the buffers:" VerticalOptions="Center" /> <Switch x:Name="UnionSwitch" IsToggled="True" /> </StackLayout> <StackLayout Grid.Row="3" Orientation="Horizontal"> <Button x:Name="BufferButton" Clicked="BufferButton_Click" Text="Create buffers" WidthRequest="120" /> <Button x:Name="ClearButton" Margin="10,0,0,0" Clicked="ClearButton_Click" Text="Clear" WidthRequest="120" /> </StackLayout> </Grid> <esriUI:MapView x:Name="MyMapView" Grid.Row="1" /> </Grid> </ContentPage>