GP service example: Buffer features
Folder |
BufferFeatures |
Purpose |
Create polygons around point, line, or polygon features. |
Services |
BufferFeatures (geoprocessing service). |
Geoprocessing tasks |
Buffer Points, Buffer Lines, Buffer Polygons. |
Inputs |
User digitizes a point, line, or polygon. |
Outputs |
Polygon |
Data |
None |
Extensions |
None |
Of note |
GP service step by step: Buffer points showed how to build a service that creates buffer polygons around points. This service allows you to create buffers around the three basic feature types: points, lines, and polygons. |
Corresponding folder
C:\arcgis\ArcTutor\GP Service Examples\BufferFeatures contains the completed models and data.
Data
Similar to the BufferPoints service, you need to create schema feature classes for use in the three models. For this service, you need three schema feature classes: one containing point features, one containing line features, and another containing polygon features. Create these feature classes in the Schema geodatabase inside the ToolData folder.
Models
There is one model for each of the feature types. These models are constructed using the same basic steps as described in GP service step by step: Buffer points. The main difference between the models is that they use different schemas for the input variable to Buffer.
- Buffer Lines model—The Input Lines variable uses line schema.
- Buffer Points model—The Input Points variable uses point schema.
- Buffer Polygons model—The Input Polygons variable uses polygon schema.
The Buffer Lines model has one additional parameter, the end type of the line, which is either ROUND or FLAT, as described in the Buffer tool reference. This variable was created as follows:
- In the Buffer Lines model, right-click Buffer and click Make Variable > From Parameter > End Type.
- Right-click the End Type variable and check Model Parameter.
It is not required that you make a variable for the End Type parameter. End Type will default to ROUND if you do not create a variable.
Publishing
The BufferFeatures toolbox is published using similar steps as described in GP service step by step: Buffer points.