Anyone knows if there is a way to set a spatial filter in a mapfile to use with normal requests, not only WMS or WFS? I need this spatial filter to be any kind of polygon, not just rectangles, because these filters on our system are dynamic: users are allowed to draw polygons or select them from the polygon layers. It's a system where users use a legacy desktop application with no map capabilities, only requests Mapserver for images, so I have to do these filtering on the Mapserver side
To put it simply, here goes an example: users have layers with data like street names (labeled points) and districts (polygons). One of them may want to see only those streets that fall within district number two, so I want Mapserver to generate images hiding the rest of the streets. Of course, in the streets layer there is no information about in which district is located the street
Some things to help you ask this question:
- Requests are cgi, not WMS but I could change that if it helps
- I'm not using Mapscript nor any client like OpenLayers or uDig
- Layers don't have and won't have attribute relations
- I know about FILTER parameter in LAYER section but it's only for attribute filtering
- I read about "Filter encoding" (included in SLD) but can't make it work, and it seems only for WFS
- I've seen CQL but it's not supported in Mapserver directly, only through SLD
How do you do spatial filtering for image generation in Mapserver?
Thanks