ArcGIS API Viewshed with specific coordinates

822
4
Jump to solution
01-04-2021 05:35 AM
MatthiasRedl
New Contributor

Hello everyone,

I came across the ArcGIS viewshed sandbox today. 

https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=geoprocessing-...

So I wanted to perform a viewshed analysis from specific coordinates (47.42120626,10.98630681), as you can do it with ArcGIS Pro/Online. The problem is, I don't know at which part of the script I can implement my own coordinates or how I need to change the script in order to start the analysis from that point.

It would be much appreciated if anyone could help me out here 🙂

Tags (2)
2 Solutions

Accepted Solutions
JohnGrayson
Esri Regular Contributor

Here's a codepen showing a modified version of that sample that performs the analysis at a specific location:

https://codepen.io/john-grayson/pen/yLajLqP 

I hope this helps.

View solution in original post

JohnGrayson
Esri Regular Contributor

Limits are defined by the service authors.  In the case of the service used in the sample above since it's just used just for demonstration purposes having a limit on the radius is understandable.  To learn more about elevation services that are available on ArcGIS Online in general and viewshed parameters and limitations  check out some of these resources:

get started with elevation services 

Viewshed

View solution in original post

4 Replies
by Anonymous User
Not applicable

Congratulations I just saw here on my PC suffered and also showed my son how we were amazed by the presentation. Thank you very much.

0 Kudos
JohnGrayson
Esri Regular Contributor

Here's a codepen showing a modified version of that sample that performs the analysis at a specific location:

https://codepen.io/john-grayson/pen/yLajLqP 

I hope this helps.

MatthiasRedl
New Contributor

Thanks so much for the response. That helps a lot!

I opened the new script in the Sandbox and was trying to go above 20.000 meters for the radius but somehow it doesn't work. Do you know if there is a limitation for this geoprocess at 20 kilometers?

JohnGrayson
Esri Regular Contributor

Limits are defined by the service authors.  In the case of the service used in the sample above since it's just used just for demonstration purposes having a limit on the radius is understandable.  To learn more about elevation services that are available on ArcGIS Online in general and viewshed parameters and limitations  check out some of these resources:

get started with elevation services 

Viewshed