Select to view content in your preferred language

Disconnected Viewshed GPK with Radius Example

3356
5
Jump to solution
03-12-2013 11:57 AM
CarlosColón-Maldonado
Frequent Contributor
Greetings,

I would like to create a "disconnected" app, similar to the one provided in the Runtime SDK 10.1.1's Viewshed example, which includes a selected geometry point and a radius as parameters. The disconnected Viewshed example in Exercise 6A, "Develop a geoprocessing package", of the course book for the "Building Desktop Applications Using the ArcGIS Runtime SDK for Java" course is PERFECT, except it does not include the radius parameter. This is important to me because I must use data for a large area and want to limit processing time.

Can I get help on how to go about adding that parameter to the model in that example?

Thanks in advanced.
0 Kudos
1 Solution

Accepted Solutions
CarlosColón-Maldonado
Frequent Contributor
The Viewshed model with the radious parameter that is mentioned in the link does include a model that can be modified to point the data to be queried.

[ATTACH=CONFIG]22983[/ATTACH]

The model also uses the buffer tool to pass in that seems to be the area the Viewshed tool should only consider, which may be why it appears to execute much more quickly than the model that does not have the radius parameter. Can someone confirm this? If this is true, then I don't have to worry about the amount of data I pass in to it.

Thanks in advanced.

View solution in original post

0 Kudos
5 Replies
MarkBaird
Esri Regular Contributor
Hi Carlos,

Sorry I'm slacking in my forum duties at the moment, but I promise I'll look at this tomorrow.

Are you looking for instructions on how to generate this a viewshed with radious setting in ArcMap using model builder? 

Do you want instructions on how to generate the geoprocessing package too and then consume it in a runtime app?

Mark
0 Kudos
CarlosColón-Maldonado
Frequent Contributor
Hi, Mark,

No sweat; I know responding to posts is not all you do. I got enough training and practice on generating geoprocessing packages to consume it in a runtime app. The viewshed online does this, but my app will not be online. I need to figure out how to generate the viewshed model using model builder in ArcMap to also accept a radius so I would get back only that graphic representation result. I don't think it would be very efficient to draw all graphics coverting all of the DTED.

The exercise in the course book also uses a small DEM raster dataset from a gdb as parameter. My DTED data is large and contained in a mosaic dataset, covering many parts of world, in my gdb. There are instructions for converting mosaic datasets into raster datasets for use in Viewshed, but I don't think it would be very efficient, either.

I would like to be able to minimize work time by the model while keeping the app responsive when drawing the graphics. I figure that only adding graphics located within a radius to the graphics layer, or drawing only those within the radius, and only passing DTED data displayed on the current map extent into the model would do the trick.

Carlos
0 Kudos
MarkBaird
Esri Regular Contributor
HI Carlos,

I'm afraid I'm not a model builder expert, but one of my colleages pointed this out which looks promising:

http://www.arcgis.com/home/item.html?id=cede8ab5c0514f41a2cc69bedff67f48

If you download the tool, you can open in up in model builder and see how it works.  I belive it's doing what you are after.

Reducing the area of the DTED which you use in a viewshed is really important as as you correctly point out, you can end up generating a monster geoprocessing task that takes a long time to process.

Remember when you are executing geoprocessing tools you should use the gp.executeAsync(parameters, callback).  This way your application will not hang whilst you are awaiting a result from the geoprocessor.

Hope this helps

Mark
0 Kudos
CarlosColón-Maldonado
Frequent Contributor
Thanks, Mark. I'll download it, take it for a spin and see where it takes me. There is still the issue of figuring out how to pass-in only a portion of the viewable DTED raster data off a mosaic dataset, but I think I'll post the question to the Spatial Statistics Forum folks. I'll let you know how it goes here.
0 Kudos
CarlosColón-Maldonado
Frequent Contributor
The Viewshed model with the radious parameter that is mentioned in the link does include a model that can be modified to point the data to be queried.

[ATTACH=CONFIG]22983[/ATTACH]

The model also uses the buffer tool to pass in that seems to be the area the Viewshed tool should only consider, which may be why it appears to execute much more quickly than the model that does not have the radius parameter. Can someone confirm this? If this is true, then I don't have to worry about the amount of data I pass in to it.

Thanks in advanced.
0 Kudos