-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clip allowed area filter #163
Comments
According to https://github.com/geoserver/geofence/wiki/Rule-matching, constraints are merged inside GeoFence. There are 2 main points where area are merged:
In this latter case we may have different areas with different spatialFIlterTypes, but the filterType returned to GeoServer needs be only one.
A design decision has to be taken about this. |
I see you point @etj, thinking out loud, the ideal solution would be, obviously, that if a rule define a clip, than a clip is performed, if the rule defines an intersection then and intersection is performed. If my memory serves me well, the clipping is always done on the GeoServer side, Java code. Hence, why not:
Does this makes sense? @etj I have asked help from @taba90 to double check if this is possible to implement, and how much would it cost, he will ask you for guidance and support If the above is not possible, then I would go whit falling back to the more restrictive one, hence clipping. |
@nmco what is returned to GeoServer is not the content of a single rule, pls see https://github.com/geoserver/geofence/wiki/Rule-matching |
This implementation would cause undesired results, and users may think something is broken when they are added to other groups. Pls check the case "Convert all to CLIP:" in my previous comment. |
A proposal may be:
Areas returning from groups, with spatialFilterType=CLIP will be unioned in the clipArea, while These 2 areas will be returned to GeoServer in order to select 2 sets of features:
|
Intersection is filtering, clipping is manipulation, they are two logically separate steps:
@nmco in GeoFence one can have two (or more) limit rules, one using a intersects filter, the other using a geometry clip. That's where the headaches start. Mixing the two is messy:
The clipper should be smart enough to clip on the clipping geometry if the feature geometry is intersecting it, but don't do it, if the feature geometry is also overlapping with the "intersects" geometry? Bit weird IMHO, but would respect the logic of "using the looser of the two rules". It would mean bringing around clip and intersect geometries as two separate bits, and be able to also expose them as separate in the GeoServer rule... which is not difficult, since a read filter field is already available, just add a clipping geometry one. |
Meeting minutes 21-12-2020:
|
Merged in 3.4.x: #164 |
When defining a spatial filter the user will be able to define whether the filter should be applied as an Intersects filter or as a clip filter thus cutting filtered features.
A new combo box will be available in UI on layerDetails tab and ruleLimits tab to select the spatialFilterType.
A new field will be added to RuleLimits and LayerDetails to hold the value of the spatialFilterType.
The text was updated successfully, but these errors were encountered: