Select to view content in your preferred language

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

1337
1
03-12-2023 11:00 AM
Labels (3)
JohnEsch1
Occasional Contributor

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 

https://gis1.usgs.gov/arcgis/rest/services/padus3/Public_Access/MapServer/0

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:

https://gisagocss.state.mi.us/arcgis/rest/services/OpenData/michigan_geographic_framework/MapServer/...

 

Thanks

 

1 Reply
Teresa_Blader
Frequent Contributor

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