Geodesic Viewshed

URL:
https://<root>/<serviceName>/RasterAnalysisTools/GPServer/GeodesicViewshed
Methods:
GET
Version Introduced:
11.3

Description

The GeodesicViewshed task determines the raster surface locations visible to a set of observer features using geodesic methods.

Request parameters

ParameterDetails

inputElevationSurface

(Required)

The elevation surface to use for calculating the viewshed.

Examples:

Use dark colors for code blocksCopy
1
2
3
4
5
//Input surface raster as portal item
"inputElevationSurface": {"itemId": <portal item id>}

//Input surface raster as URL
"inputElevationSurface": {"url": <image service layer url>}

inputObserverFeatures

(Required)

The point features that represent the observer locations when calculating the viewsheds.

Examples:

Use dark colors for code blocksCopy
1
2
3
4
5
//Feature layer URL
"inputObserverFeatures": {"url": <feature service layer url>, "filter": <where clause>}

//Feature collection
"inputObserverFeatures": {"layerDefinition": {}, "featureSet", {}, "filter": <where clause>}

outputName

(Required)

The name of the output viewshed image service that will be created.

You can specify the name, or you can create an empty service using Portal Admin Sharing API and use the return JSON object as input to this parameter.

Syntax: A JSON object describes the name of the output or the output raster.

Output name example:

Use dark colors for code blocksCopy
1
"outputName":{"serviceProperties":{"name":"testrasteranalysis"}}

Output raster examples:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
//Output portal item:
"outputName":{"itemId": <portal item id>}

//Output url:
"outputName":{"url": <image service url>}

//Output raster layer service:
"outputName":{"serviceProperties":
  {"name":"testrasteranalysis",
    "serviceUrl":"https://<server name>/server/rest/services/Hosted/testrasteranalysis/ImageServer"},
  "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b","folderId":"sdfwerfbd3ec25584d0d8f4"}
}

optimizeFor

(Optional)

The optimization method to use for calculating the viewshed.

The options are as follows:

  • SPEED—This method optimizes the processing speed, trading some accuracy in the result for higher performance.
  • ACCURACY—This method is optimized for accuracy in the results, at the expense of a longer processing time. This is the default.

Syntax: A string describing the optimization method.

Example:

Use dark colors for code blocksCopy
1
"optimizeFor": "ACCURACY"

analysisType

(Optional)

The type of visibility analysis you wish to perform, either determining how visible each cell is to the observers, or identifying for each surface location which observers are visible.

The options are as follows:

  • FREQUENCY—The output records the number of times that each cell location in the input surface raster can be seen by the input observation locations (as points or as vertices for polyline observer features). This is the default.
  • OBSERVERS—The output identifies exactly which observer points are visible from each raster surface location. The allowed maximum number of input observers is 32 with this analysis type.

Syntax: A string describing the optimization method.

Example:

Use dark colors for code blocksCopy
1
"analysisType ": "FREQUENCY"

verticalError

(Optional)

The amount of uncertainty (the root mean square error, or RMS error) in the surface elevation values. It is a linear unit value representing the expected error of the input elevation values.

Syntax: A linear unit specifying the vertical error.

Example:

Use dark colors for code blocksCopy
1
"verticalError": {"distance":2, "units": "METERS"}

refractivityCoefficient

(Optional)

The coefficient of the refraction of visible light in air.

Syntax: A numerical value specifying the refractivity coefficient.

Example:

Use dark colors for code blocksCopy
1
"refractivityCoefficient": 0.13

maximumViewingDistance

(Optional)

The cutoff distance where the computation of visible areas stops. Beyond this distance, it is unknown whether the analysis points and the other objects can see each other.

Syntax: A linear unit specifying the distance and units, or a numerical or string field in the inputObserverFeatures data.

Linear unit example:

Use dark colors for code blocksCopy
1
"maximumViewingDistance": {"distance": 6, "units": "MILES"}

Field example:

Use dark colors for code blocksCopy
1
"maximumViewingDistance": {"name": "outerrad", "type": "esriFieldTypeInteger"}

minimumViewingDistance

(Optional)

The distance where the computation of visible areas begins.

Syntax: A linear unit specifying the distance and units, or a numerical or string field in the inputObserverFeatures data.

Linear unit example:

Use dark colors for code blocksCopy
1
"minimumViewingDistance": {"distance": 2, "units": "MILES"}

Field example:

Use dark colors for code blocksCopy
1
"minimumViewingDistance": {"name": "innerrad", "type": "esriFieldTypeInteger"}

viewingDistancesAre3D

(Optional)

Specifies whether the minimumViewingDistance and maximumViewingDistance input parameters will be measured in a three-dimensional or two-dimensional way.

Syntax: A Boolean value as either true or false.

  • true—The viewing distances will be measured in 3D.
  • false—The viewing distances will be measured in 2D. This is the default.

Example:

Use dark colors for code blocksCopy
1
"viewingDistancesAre3D": true

observersElevation

(Optional)

The elevation of the observer locations.

Syntax: A linear unit specifying the elevation and units, or a numerical or string field in the inputObserverFeatures data.

Linear unit example:

Use dark colors for code blocksCopy
1
"observersElevation": {"distance": 3600, "units": "FEET"}

Field example:

Use dark colors for code blocksCopy
1
"observersElevation": {"name": "elevation", "type": "esriFieldTypeInteger"}

observersHeight

(Optional)

The height above ground of the observer locations. During the viewshed calculation, this value is added to the observer elevation if it is specified; otherwise, it is added to the interpolated surface z-value.

Syntax: A linear unit specifying the height and units, or a numerical or string field in the inputObserverFeatures data.

Linear unit example:

Use dark colors for code blocksCopy
1
"observersHeight": {"distance": 20, "units": "FEET"}

Field example:

Use dark colors for code blocksCopy
1
"observersHeight": {"name": "obsoff", "type": "esriFieldTypeInteger"}

targetHeight

(Optional)

The height of structures, or people on the ground, that will be used to establish visibility.

Syntax: A linear unit specifying the height and units, or a numerical or string field in the inputObserverFeatures data.

Linear unit example:

Use dark colors for code blocksCopy
1
"targetHeight": {"distance": 6, "units": "FEET"}

Field example:

Use dark colors for code blocksCopy
1
"targetHeight": {"name": "targetoff", "type": "esriFieldTypeInteger"}

horizontalStartAngle

(Optional)

The start angle of the horizontal scan range. The value is specified in degrees from 0 to 360, either as integer or floating point, with 0 oriented to north.

Syntax: A numerical value, or a numerical field in the inputObserverFeatures data.

Value example:

Use dark colors for code blocksCopy
1
"horizontalStartAngle": 30

Field example:

Use dark colors for code blocksCopy
1
"horizontalStartAngle": {"name": "horizst", "type": "esriFieldTypeInteger"}

horizontalEndAngle

(Optional)

The end angle of the horizontal scan range. The value is specified in degrees from 0 to 360, either as integer or floating point, with 0 oriented to north.

Syntax: A numerical value, or a numerical field in the inputObserverFeatures data.

Value example:

Use dark colors for code blocksCopy
1
"horizontalEndAngle": 270

Field example:

Use dark colors for code blocksCopy
1
"horizontalEndAngle": {"name": "horizend", "type": "esriFieldTypeInteger"}

verticalUpperAngle

(Optional)

The upper vertical angle limit of the scan relative to the horizontal plane. The value is specified in degrees and can be integer or floating point. The allowed range is from above -90 up to and including 90.

Syntax: A numerical value, or a numerical field in the inputObserverFeatures data.

Value example:

Use dark colors for code blocksCopy
1
"verticalUpperAngle": 15

Field example:

Use dark colors for code blocksCopy
1
"verticalUpperAngle": {"name": "vertupper", "type": "esriFieldTypeInteger"}

verticalLowerAngle

(Optional)

The lower vertical angle limit of the scan relative to the horizontal plane. The value is specified in degrees and can be integer or floating point. The allowed range is from above -90 up to and including 90.

Syntax: A numerical value, or a numerical field in the inputObserverFeatures data.

Value example:

Use dark colors for code blocksCopy
1
"verticalLowerAngle": -15

Field example:

Use dark colors for code blocksCopy
1
"verticalLowerAngle": {"name": "vertlower", "type": "esriFieldTypeInteger"}

outputAboveGroundLevelRasterName

(Optional)

The optional above ground level output image service name.

You can specify the name, or you can create an empty service using Portal Admin Sharing API and use the return JSON object as input to this parameter.

Syntax: A JSON object describes the name of the output or the output raster.

Output name example:

Use dark colors for code blocksCopy
1
"outputAboveGroundLevelRasterName":{"serviceProperties":{"name":"testagl"}}

Output raster examples:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
//Output Portal item
"outputAboveGroundLevelRasterName":{"itemId": <portal item id>}

//Output URL
"outputAboveGroundLevelRasterName":{"url": <image service url>}

//Output raster layer service
"outputAboveGroundLevelRasterName":{"serviceProperties":
  {"name":"testagl",
  "serviceUrl":"https://<server name>/server/rest/services/Hosted/testrasteranalysis/ImageServer"},
  "itemProperties":{"itemID":"8cfbd3ec25584d0d8f4ed23b8ff7c43b","folderId":"sdfwerfbd3ec25584d0d8f4"}
}

outputObserverRegionRelationshipTableName

(Optional)

The optional output table for identifying the regions that are visible to each observer. This output is only created when the analysisType parameter value is OBSERVERS.

You can specify the name, or you can create an empty service using Portal Admin Sharing API and use the return JSON object as input to this parameter.

Syntax: A JSON object describes the name of the output table.

Output name example:

Use dark colors for code blocksCopy
1
"outputObserverRegionRelationshipTableName":{"serviceProperties":{"name":"testrasteranalysis"}}

Output table examples:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
//Output portal item:
"outputObserverRegionRelationshipTableName":{"itemId": <portal item id>}

//Output url:
"outputObserverRegionRelationshipTableName":{"url": <feature service url>}

//Output table layer service:
"outputObserverRegionRelationshipTableName":{"serviceProperties":
  {"name":"testrasteranalysis",
    "serviceUrl":"https://<server name>/server/rest/services/Hosted/testrasteranalysis/FeatureServer/0"},
  "itemProperties":{"itemId":"351fe8441a1a436d8001124487b02550","folderId":"sdfwerfbd3ec25584d0d8f4"}
}

context

(Optional)

Contains additional settings that affect task processing. This task has the following settings:

  • Extent (extent )—A bounding box that defines the analysis area.

  • Output Spatial Reference (outSR )—The output raster will be projected into the output spatial reference.

  • Snap Raster (snapRaster )—The output raster will have its cells aligned with the specified snap raster.

  • Cell Size (cellSize )—The output raster will have the resolution specified by cell size.

  • Mask (mask)—Only cells that fall within the analysis mask will be considered in the operation.

f

The response format. The default response format is html .

Values: html | json | pjson

Response

When you submit a request, the task assigns a unique job ID for the transaction.

Use dark colors for code blocksCopy
1
2
3
4
{
  "jobId": "<unique job identifier>",
  "jobStatus": "<job status>"
}

After the initial request is submitted, you can use the jobId to periodically check the status of the job and messages as described in Checking job status. Once the job has successfully completed, you use the jobId to retrieve the results. To track the status, you can make a request of the following form:

Use dark colors for code blocksCopy
1
https://<raster analysis tools url>/GeodesicViewshed/jobs/<jobId>

When the status of the job request is esriJobSucceeded , you can access the results of the analysis by making a request of the following form:

Use dark colors for code blocksCopy
1
https://<raster analysis tools url>/GeodesicViewshed/jobs/<jobId>/results/<output parameters>

Example usage

The following is a sample request URL for GeodesicViewshed :

Use dark colors for code blocksCopy
1
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/GeodesicViewshed/submitJob

JSON Response syntax

The response returns the outputRaster output parameter, which has properties for parameter name, data type, and value. The content of value is always the output raster dataset itemId and the image service URL.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "paramName": <parameter name>,
  "dataType": "GPString",
  "value": {
    "itemId": <item Id>,
    "url": <URL>
  }
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "paramName": "outRaster",
  "dataType": "GPString",
  "value": {
    "itemId": "f121390b85ef419790479fc75b493efd",
    "url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.