Skip to content

Commit dca03f4

Browse files
Merge pull request #72 from Esri/PaulAllanSturm/createPlanarAndGeodeticBuffers
Create planar and geodetic buffers
2 parents 366acfc + bfe5116 commit dca03f4

File tree

6 files changed

+392
-0
lines changed

6 files changed

+392
-0
lines changed

assets/generated_samples_list.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,36 @@
314314
"title": "Create mobile geodatabase",
315315
"key": "create_mobile_geodatabase"
316316
},
317+
"create_planar_and_geodetic_buffers": {
318+
"category": "Analysis",
319+
"description": "Create a buffer around a map point and display the results as a graphic.",
320+
"ignore": false,
321+
"images": [
322+
"create_planar_and_geodetic_buffers.png"
323+
],
324+
"keywords": [
325+
"analysis",
326+
"buffer",
327+
"euclidean",
328+
"geodetic",
329+
"geometry",
330+
"planar",
331+
"GeometryEngine.buffer",
332+
"GeometryEngine.bufferGeodetic",
333+
"GraphicsOverlay"
334+
],
335+
"redirect_from": [],
336+
"relevant_apis": [
337+
"GeometryEngine.buffer",
338+
"GeometryEngine.bufferGeodetic",
339+
"GraphicsOverlay"
340+
],
341+
"snippets": [
342+
"create_planar_and_geodetic_buffers_sample.dart"
343+
],
344+
"title": "Create planar and geodetic buffers",
345+
"key": "create_planar_and_geodetic_buffers"
346+
},
317347
"densify_and_generalize_geometry": {
318348
"category": "Edit and Manage Data",
319349
"description": "A multipart geometry can be densified by adding interpolated points at regular intervals. Generalizing multipart geometry simplifies it while preserving its general shape. Densifying a multipart geometry adds more vertices at regular intervals.",

lib/models/samples_widget_list.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import 'package:arcgis_maps_sdk_flutter_samples/samples/apply_simple_renderer_to
99
import 'package:arcgis_maps_sdk_flutter_samples/samples/apply_unique_value_renderer/apply_unique_value_renderer_sample.dart';
1010
import 'package:arcgis_maps_sdk_flutter_samples/samples/authenticate_with_oauth/authenticate_with_oauth_sample.dart';
1111
import 'package:arcgis_maps_sdk_flutter_samples/samples/create_mobile_geodatabase/create_mobile_geodatabase_sample.dart';
12+
import 'package:arcgis_maps_sdk_flutter_samples/samples/create_planar_and_geodetic_buffers/create_planar_and_geodetic_buffers_sample.dart';
1213
import 'package:arcgis_maps_sdk_flutter_samples/samples/densify_and_generalize_geometry/densify_and_generalize_geometry_sample.dart';
1314
import 'package:arcgis_maps_sdk_flutter_samples/samples/display_clusters/display_clusters_sample.dart';
1415
import 'package:arcgis_maps_sdk_flutter_samples/samples/display_map/display_map_sample.dart';
@@ -55,6 +56,7 @@ const sampleWidgets = <String, Widget>{
5556
'apply_unique_value_renderer': ApplyUniqueValueRendererSample(),
5657
'authenticate_with_oauth': AuthenticateWithOAuthSample(),
5758
'create_mobile_geodatabase': CreateMobileGeodatabaseSample(),
59+
'create_planar_and_geodetic_buffers': CreatePlanarAndGeodeticBuffersSample(),
5860
'densify_and_generalize_geometry': DensifyAndGeneralizeGeometrySample(),
5961
'display_clusters': DisplayClustersSample(),
6062
'display_map': DisplayMapSample(),
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Create planar and geodetic buffers
2+
3+
Create a buffer around a map point and display the results as a graphic.
4+
5+
![Image of create planar and geodetic buffers](create_planar_and_geodetic_buffers.png)
6+
7+
## Use case
8+
9+
Creating buffers is a core concept in GIS proximity analysis that allows you to visualize and locate geographic features contained within a polygon. For example, suppose you wanted to visualize areas of your city where alcohol sales are prohibited because they are within 500 meters of a school. The first step in this proximity analysis would be to generate 500 meter buffer polygons around all schools in the city. Any such businesses you find inside one of the resulting polygons are violating the law.
10+
11+
## How to use the sample
12+
13+
1. Tap on the map.
14+
2. A planar and a geodetic buffer will be created at the tap location using the distance (miles) specified.
15+
3. Continue tapping to create additional buffers. Notice that buffers closer to the equator appear similar in size. As you move north or south from the equator, however, the geodetic polygons become much larger. Geodetic polygons are in fact a better representation of the true shape and size of the buffer.
16+
4. Tap Clear to remove all buffers and start again.
17+
18+
## How it works
19+
20+
1. The map `ArcGISPoint` for a tap on the display is captured.
21+
2. The static method `GeometryEngine.buffer` is called to create a planar buffer polygon from the map location and distance.
22+
3. Another static method, `GeometryEngine.bufferGeodetic`, is called to create a geodetic buffer polygon using the same inputs.
23+
4. The polygon results (and tap location) are displayed in the map view with different symbols in order to highlight the difference between the buffer techniques due to the spatial reference used in the planar calculation.
24+
25+
## Relevant API
26+
27+
* GeometryEngine.buffer
28+
* GeometryEngine.bufferGeodetic
29+
* GraphicsOverlay
30+
31+
## Additional information
32+
33+
Buffers can be generated as either planar (flat - coordinate space of the map's spatial reference) or geodetic (technique that considers the curved shape of the Earth's surface, which is generally a more accurate representation). In general, distortion in the map increases as you move away from the standard parallels of the spatial reference's projection. This map is in Web Mercator so areas near the equator are the most accurate. As you move the buffer location north or south from that line, you'll see a greater difference in the polygon size and shape. Planar operations are generally faster, but performance improvement may only be noticeable for large operations (buffering a great number or complex geometry).
34+
35+
For more information about using buffer analysis, see the topic How [Buffer (Analysis) works](https://pro.arcgis.com/en/pro-app/latest/tool-reference/analysis/how-buffer-analysis-works.htm) in the ArcGIS Pro documentation.
36+
37+
## Tags
38+
39+
analysis, buffer, euclidean, geodetic, geometry, planar
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"category": "Analysis",
3+
"description": "Create a buffer around a map point and display the results as a graphic.",
4+
"ignore": false,
5+
"images": [
6+
"create_planar_and_geodetic_buffers.png"
7+
],
8+
"keywords": [
9+
"analysis",
10+
"buffer",
11+
"euclidean",
12+
"geodetic",
13+
"geometry",
14+
"planar",
15+
"GeometryEngine.buffer",
16+
"GeometryEngine.bufferGeodetic",
17+
"GraphicsOverlay"
18+
],
19+
"redirect_from": [],
20+
"relevant_apis": [
21+
"GeometryEngine.buffer",
22+
"GeometryEngine.bufferGeodetic",
23+
"GraphicsOverlay"
24+
],
25+
"snippets": [
26+
"create_planar_and_geodetic_buffers_sample.dart"
27+
],
28+
"title": "Create planar and geodetic buffers"
29+
}
193 KB
Loading

0 commit comments

Comments
 (0)