Geoprocessing Linear Unit
A linear unit input or output parameter. Corresponds to GPLinearUnit parameter type on the service.
Geoprocessing tasks support a set of linear units defined in the GeoprocessingLinearUnits.
When a GeoprocessingLinearUnit parameter is created with one of the supported GeoprocessingLinearUnits the value is sent to the service using defined linear unit type.
When a GeoprocessingLinearUnit parameter is created with a LinearUnit, the value is converted to meters if the type is not supported. For example if provided LinearUnit is international miles, the value is converted to meters since only the US Survey Miles unit is supported in geoprocessing. After GeoprocessingLinearUnit is created, the used linear unit type can be checked from GeoprocessingLinearUnit.getLinearUnit().
When GeoprocessingLinearUnit is created with a supported LinearUnit, then no conversion takes place and the value is sent to the service using the defined type.
When GeoprocessingLinearUnit is returned as an output parameter, you can get LinearUnit using GeoprocessingLinearUnit.getLinearUnit() method.
Since
200.1.0
See also
(Double, LinearUnit)
Constructors
Create a geoprocessing linear unit parameter.
Create a geoprocessing linear unit parameter with the given distance. The unit is assumed to be meters. Note that although this constructor defaults to meters, the unit can be changed by calling GeoprocessingLinearUnit.unit. If the unit is changed in this way, the value is not converted.
Create a geoprocessing linear unit parameter with the given distance and linear unit. The GeoprocessingLinearUnits used here represents the subset of linear units supported by geoprocessing.
Create a geoprocessing linear unit parameter with the given distance and linear unit. Note that if the given linear unit does not correspond to any of the values in GeoprocessingLinearUnits, the unit will be converted internally to meters. This means that the distance property will return a different value to that set.
Create a geoprocessing linear unit parameter with the given distance and linear unit WKID. Note that if the given linear unit WKID does not correspond to any of the values in GeoprocessingLinearUnits, the unit will be converted internally to meters. This means that the distance property will return a different value to that set.
Functions
Gets the geometry linear unit that corresponds to the unit of this parameter. This method gives a convenient means of using a geoprocessing linear unit with the geometry API. The returned LinearUnit can be used to convert the distance value of this parameter instance to any other linear unit supported by the geometry API.