Hi John,
Thanks for the kind words!
Question 1: I implemented the Query widget for a couple of parcel feature layers we use. In Spatial filter, for "Geometries from a map," it will show the features which intersect the shape drawn (as documented). Is there a way to just return those >>within<< a shape drawn (e.g. rectangle or polygon)?
Answer: You are correct. The Query Widget will only return features that intersect your drawn shape.
You would like to see an enhancement to return features that are within your drawn shape.
Explanation: When you select Geometries from a map
Check Drawn graphic
It will only select features that intersect your drawn graphic.
The Query Widget will return all the Parcels that are intersected by the Rectangle.
You would like to add an option to return only the parcels that are within your Rectangle.
I would like to have this enhancement added as well!
I can use the Point Tool to add a point on the map.
This will return a single parcel which is intersected by the point.
Question 2:
Also, in "Selected features from data source" (n the Query widget), there is "Spatial relationship rules." I cannot find an example which clarifies the use of such, and how it would be helpful. Do you have anything to add to this, based on your experience?
Answer:
I agree with you. There are no examples to showcase the power of the advanced capabilities of the Query Widget.
What the Query Widget allows you to do is find features on your map that Intersect, Cross, Overlap, Touch another feature on the map.
For example:
- Find all the Parcels that lie within a selected Zip Code.
- Find all the Parcels that lie within 1000ft of a Zip Code
- Find all the Parcels that Touch a selected Zip Code
- Find all the Sections that cross a Zip Code
- Find all the Zip Codes that are within 0.5 miles of a selected City
This is classic Spatial Analysis.
The Query Widget that was recently added to the Experience Builder encapsulates the power of GIS in performing Spatial Searches.
Explanation:
Turn on Spatial Filter | Filter by | Selected features from data source
Add Filter Layer
Add all the layers you have in your Web Map
Select all the Layers
Open your Parcel Query
By default only 1 Spatial Relation Rule is enabled.
Expand the drop down and enable all 8 rules
Now you are ready to run your Spatial Analysis.
You can set your Spatial Filter to Selecting Features from a data source
Or, you can set your Spatial Filter to Drawn Graphic
Example 1:
Find all the Parcels Contained in Zip Code 85322
Select Zip Code 85322 from the List Widget
Set your Filter Layer = Zip Code
Set your Spatial Relationship = Contain
Apply
The Spatial Search returns 1108 parcels
The results are shown 100 per page.
You have to page through to see all the 1108 parcels.
Clicking on a result will zoom to the Parcel.
Example 2:
Find all parcels that Overlap the boundary of Zip Code 85322
Apply
There are 127 Parcels that Overlap Zip Code 85322
This is due to inaccuracies in the geometry of our Zip Code and Parcel Boundary Layers.
Zip Codes do not normally intersect Parcel Boundaries.
But you get the idea.
You will soon have an alternative solution to the Query widget
The Enhanced Search Widget by Robert Scheitlin.
Robert designed the Enhanced Search Widget for the Web AppBuilder Developer Edition that combines all the Attribute Search, Graphical Search and Spatial Search into a single widget that is simple and intuitive to use.
Here is a demo on how it works:
https://gis.maricopa.gov/GIO/HistoricalAerial/
Search for the example Parcel 211-67-062E
The map zooms to the selected Parcel
Example 1:
Let’s say you want to find all the Parcels within 300 ft of your selected Parcel.
Open the Spatial Tab
Click on the Buffer Tool
This draws a 300 ft green buffer around your selected Parcel
Click on the Intersected By Tool.
Choose Buffer
There are 15 Parcels within 300 ft of your selected Parcel
Example 2:
Find all the Parcels within 300 ft of a point on the map
Open the By Shape Tab
Engage the Point Tool.
Drop a point on a Street Intersection.
8 Parcels are found
Example 3:
Find all the Parcels that Touch these 8 Parcels
Open the By Spatial Tab
Click on the Touched By Tool
This time choose Selection
There are 14 Parcels that touch your original selection of 8 Parcels
Example 4:
Find all the Zip Codes that are within 0.5 miles of a City
Open the By Value Tab
Select City of Chandler
Search
Open the By Spatial Tab
Draw a 0.5 mile Buffer around the City of Chandler
Select Zip Code from the drop-down list.
Engage the Intersected By Tool
Select Buffer
There are 18 Zip Codes within 0.5 miles of the City of Chandler
For a more detailed explanation of the features and capabilities of Robert’s Enhanced Search Widget see this User Guide:
http://www.davidapps.net/docs/parcel/help/enhanced_search_widget.htm
Robert is in the process of migrating his Custom Widgets from the Web AppBuilder platform to the Experience Builder platform.
https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/roberts-custom-wab-widgets/td-...
The Enhanced Search Widget is the centerpiece of all our Web AppBuilder Apps.
We are anxiously waiting for this widget to be ported to the Experience Builder Developer Edition.
Until this happens, you can always develop your Web Apps using the Web AppBuilder Developer Edition and then embed that into an Experience Builder Website.
For example, here are 4 Web AppBuilder Apps within a multi-page Experience Builder website.
https://experience.arcgis.com/experience/c26b108e31444e45bdc2f24559fb03ec/
The Web AppBuilder and Experience Builder platforms offer an elegant solution for creating beautiful, interactive and responsive web apps and websites without writing a single line of code!
Best regards,
David Das