Select to view content in your preferred language

How to apply a spatial filter to a layer based on the boundary or another layer

03-12-2023 11:00 AM
Labels (3)
New Contributor III

A common need is to limit the extents of an ArcGIS REST services based in polygon boundary of another layer. Many nationwide ArcGIS REST services have a state field or other geography field, to it is easy to add a filter of State is 'Michigan' to just get the data for a given area if defined in an attribute field. In other cases the nationwide data set does not a State of other geography field to filter on. A good example is the layer

Layer: Protected Areas Database of the United States (PAD-US) v3.0 (ID: 0)

Name: Protected Areas Database of the United States (PAD-US) v3.0

This is very large layer and often takes a while to display in a web map/web app. This layer does not have a State or other geography field to filter on. I would like to be able to have a spatial filter to just consume the data within Michigan using  a standard Michigan county boundary polygon file like:




0 Kudos
1 Reply
Occasional Contributor III

You could create an item in AGOL based on the rest end point url, then on the visualization tab ), set a filter where object ID (or another field) includes (select all the ones that are within Michigan). Or then create a view and set the filter on the view.

Otherwise it would be nice if there was a "clip" feature or "mask" feature like there is in ArcGIS Pro. 

Teresa Blader
Olmsted County GIS Specialist
0 Kudos