GeoprocessingLinearUnit

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 com.arcgismaps.geometry.LinearUnit, the value is converted to meters if the type is not supported. For example if provided com.arcgismaps.geometry.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 com.arcgismaps.geometry.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 com.arcgismaps.geometry.LinearUnit using GeoprocessingLinearUnit.getLinearUnit method.

Since

200.1.0

See also

GeoprocessingLinearUnit.GeoprocessingLinearUnit

(Double, LinearUnit)

Constructors

Link copied to clipboard
constructor()

Create a geoprocessing linear unit parameter.

constructor(distance: Double)

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.

constructor(distance: Double, geoprocessingLinearUnits: GeoprocessingLinearUnits)

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.

constructor(distance: Double, linearUnit: LinearUnit)

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.

constructor(distance: Double, linearUnitID: LinearUnitId)

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.

Properties

Link copied to clipboard

The distance value of this parameter. Note that if this geoprocessing linear unit instance was created with a unit type unsupported by geoprocessing, this value will differ from that set as it will have been converted to meters.

Link copied to clipboard

The geoprocessing unit of this parameter.

Functions

Link copied to clipboard

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 com.arcgismaps.geometry.LinearUnit can be used to convert the distance value of this parameter instance to any other linear unit supported by the geometry API.