Select to view content in your preferred language

Is it possible to restrict access to layers in a service based on a shape?

1216
7
05-09-2023 06:38 PM
MarkChilcott
Frequent Contributor

Hi All,

Is it possible to restrict access to layers in a service, based on a spatial filter?  Can I define a shape / geometry where only requests that inside the shape will be displayer, identified, and generally returned to the users?

Cheers,

Mark

0 Kudos
7 Replies
Scott_Tansley
MVP Regular Contributor
0 Kudos
TanuHoque
Esri Regular Contributor

you can use SOI and map service's clip/spatial filter capabilities to accomplish that.

https://developers.arcgis.com/enterprise-sdk/guide/net/what-is-an-soi-net/

look for clipping and spatialFilters parameters in map service export operation help. https://developers.arcgis.com/rest/services-reference/enterprise/export-map.htm

The same options area available for Identify operation. For query you would need to use geometry parameter.

0 Kudos
MarkChilcott
Frequent Contributor

I was hoping it would be a simple solution.  Perhaps a definition query on the shape field with st_geometry?

 

Scott_Tansley
MVP Regular Contributor

That would be nice.  🙂  

Scott Tansley
https://www.linkedin.com/in/scotttansley/
0 Kudos
TanuHoque
Esri Regular Contributor

you are right, that should just work if your data are in enterprise database. Sorry I was thinking of some complicated workflows.

0 Kudos
MarkChilcott
Frequent Contributor

I wonder if I can create a spatial view of the feature class, containing the shape.  Might have to look at that ...

 

0 Kudos
Scott_Tansley
MVP Regular Contributor

do you need different views for different users/groups?  If so then you'll be looking at a different service for each with the system overheads that can introduce.  

Scott Tansley
https://www.linkedin.com/in/scotttansley/
0 Kudos