Geoprocessing task settings: Features
In this topic
Name and description
A meaningful name and description for the parameters helps your clients understand and provide appropriate values for the parameter. By default, the Service Editor copies the description of the parameter from the tool's item description.
Type
The parameter type defines whether the
client must supply a value for the task to execute successfully. In the Service Editor, you can only change optional parameters to required. To change a required parameter to an optional parameter, you'll need to exit the Service Editor, edit the properties of your tool, and run the tool again to create a new result.
Input mode
The Input mode determines how clients will input features to your task. There are three choices, described in detail below.
User defined value
In this mode, the client will create their own features as input to the task parameter. The client can construct these features using any technique suitable to their application. For ArcGIS for Desktop clients, the Feature Set data type is used to construct features for geoprocessing tasks.
Geometry
The Geometry type of the input features is either point, polyline, or polygon. The geometry type comes from the input features used to create the result.
Note:
The geometry type (such as from points to polygons) cannot be modified in the Service Editor. You need to exit the Service Editor, rerun the tool using features of the desired geometry type, then share the result created by the run.
Schema
The Schema is a list of fields (attributes) that need to be supplied by the client when they construct the features for input to the task. This list of fields is the same as the layer or dataset you used as input to the tool that created the result.
Since this is a list of fields that need to be supplied by the client, you need to review the list carefully. Are there fields that aren't required? If so, you should either delete them or document that they are optional in the parameter's Description. Use the Description to describe how the fields affect task execution.
Note:
The schema cannot be modified in the Service Editor. See Feature and table schemas for task parameters for methods to edit the schema.Include features
If Include features is checked, the features used to create the result will be included as part of the parameter definition; that is, the parameter is prepopulated with features and their attributes.
Use this option if you want to start with a set of features that the client can add and remove features and edit attributes. For example, suppose your task evaluates the proposed locations of a new urgent care clinic in relation to existing clinics. You want your client to have the proposed locations to view and edit, and the ability to change the proposal to see the affects. You would enable the Include features option so that the Feature Set was prepopulated with the proposed clinic locations and their attributes.
Choice list
Use the Choice list input mode when you want the client to choose one (or more) feature layers as input. The list of layers is populated from the applicable layers in the current map document. Check the box next to the feature layer or layers the client can choose as input.
For example, the illustration shows a task designed to help home buyers evaluate houses for sale. The task executes the Generate Near Table tool to return a table containing all the nearest High Schools, Elementary Schools, Fire Stations (and so on) within a user-specified distance of candidate houses. The Near Features parameters is a choice list of nearby features to search. The client will choose one or more of the layers enabled in the Layers list. The client may only be interested in the nearest High Schools and Grocery, but none of the other layers.
Note:
You cannot add new layers or change their names in the Service Editor. Remove your task from the Service Editor, add or rename layers in the table of contents, then click Add Result , and add the result you previously removed. You'll see the changes you made to the table of contents.
Default value
The default value is the value of the parameter used to create the result. In the above illustration, the default value is 'Fire Stations', which was the input value of Near Features used to create the result. If the tool accepts multiple layers, then the default value can also be a list of layers, each layer separated by a semicolon. If the client fails to specify a value for the parameter, the task executes using the default value.
Note:
You cannot change the default value in the Service Editor. To change the value, remove the task from the Service Editor, create a new result with the values you want to have as the default values, then click Add Result to add the new result.
Constant value
Use the Constant value mode when you want the task parameter to be fixed to a constant value.
For example, in the sample task above that uses the Generate Near Table tool, you could make the Find only closest feature parameter a constant so that only the nearest Fire Stations will be returned by the task.
- The value used for the Constant value is always the parameter value used to create the result. To change this value, you must create a new result with the desired value and publish the new result.
- Parameters with an input mode of Constant value do not become task parameters in the published task since clients cannot change their value.
- In this mode, the features become project data used by the task.