Need a Widget for Zonal Statistics as a Table for WebApp

232
1
01-29-2021 12:29 AM
Labels (1)
SharolynAnderson1
New Contributor II

Hello Everyone,

I am old school GIS and spatial analyst.  With the move to providing tools via WebMaps giving me headaches as the department (I work for government) wants to create tools for our users.  Thus,  

We have a portal with an image server that I have two image services (ModelResult1 and ModelResult2).  I then have a boundary file (BND_py).   Users would like to select a polygon (ultimately draw there own polygon) and get the statistics for that polygon - I use Zonal Statistics as Table with statistic type=ALL.   

This is easy to do in ArcGIS Pro or ArcMAP but my users don't have these product and want to just use a map that I put on the web for them.   

I thought that I could find a widget for zonalstats as a table but have had no luck.   I did review the calculate population sample in a hand drawn polygon (Geoprocessing - Population zonal statistics | ArcGIS API for JavaScript 3.35)   This is limited but I believe could be adapted maybe?

Problems: I am not a javascript coder nor do I work with REST  often.   Obvisously, I was hoping there was a custom widget that could do this.   If not, does anyone have one that I could adapt to my problem.   Lastly, is there better help (how-to) to get the javascipt API code into a widget for WebApp Builder.     

Thanks,

Sharolyn

 

0 Kudos
1 Reply
jcarlson
MVP Notable Contributor

Another way to accomplish this without becoming a JS developer is to publish the geoprocessing tool as a service.

Once your tool is successfully published, you can add it to WAB via the Geoprocessing widget by searching your portal for the item, or by entering the URL to the GP service.

jCarlson_0-1611927989357.png

This method does take some careful configuring and testing, but the end result is a widget that runs the same GP tool you're used to from the desktop software, and you don't have to touch any JS to do it.

- Josh Carlson
Kendall County GIS