Custom search tool: return a selection of items by intersecting their defined extent to input polygon

278
0
12-13-2018 12:30 AM
HugoBouckaert1
New Contributor III

Hi 

Items in ArcGIS Online can have their extent defined. What would be very useful is a tool that uses a polygon as input, looks for the extents of all items in a particular folder of ArcGIS Online, and returns the items if their extent intersects with the input polygon.

This would be very useful for non-spatial items in AGOL such as PDFs, Excel spreadsheets and the like, because then these documents can be searched for based on the geographical area they are relevant to. For example a PDF about a national park can have its extent defined within the park area, so that it only will be returned when the input polygon is coincident with the park area.    

Of course in a map you can search for items "only within the map area" but that means that for every search you have to create a map with a particular extent.  In addition the items returned are limited to those that can be added to the map such as feature layers. In a web application there are widgets that return items found within a drawn polygon, but these are limited to items already in the map that is sourced by the application, not PDFs for example.  

I am wondering if it is possible to write a python script to select items that way. What I am not sure about is how to get the extents of items. And of course ideally the input polygon would be drawn on an AGOL map, which requires a JavaScript widget. At the momemt I cannot make widgets published in AGS available to AGOL, so for now perhaps something written using the arcgis.gis API would be useful i.e. something that can be used in Jupyter. Anybody has attempted something like this? Any hints how to go about it?

Thanks

Hugo  

0 Kudos
0 Replies