Opened 14 years ago
Closed 14 years ago
#3211 closed defect (fixed)
Query by features or shape not working properly against projected layers...
Reported by: | sdlime | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 5.6 release |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | dmorissette, aboudreault |
Description
A bug was recently uncovered on mapserver-users where layer tolerances seemingly had little or no effect on projected layers. I tracked the problem to the search rect used for the initial bbox filter (via msLayerWhichItems()). In these cases the search rect is the bbox of a search shape (either user supplied or from a selection layer). The problem is that the code is currently applying a tolerance (in map units) after the search rect is projected back to the projection of the layer being searched. The tolerance should be applied beforehand when the rect is in map coordinates (and units).
The effects of the problem really depend on the units and projections. It may just cause oversampling due to a much larger search rect than necessary resulting in lousy performance or the exact opposite, an incorrect query when tolerances are used.
Steve
Attachments (1)
Change History (7)
by , 14 years ago
Attachment: | patch.3211 added |
---|
comment:1 by , 14 years ago
Cc: | added |
---|---|
Status: | new → assigned |
Guys, if you could validate my logic I'd appreciate it. I hate fixing stuff like this late in a release process. I've tested with a test case supplied by a user (with a feature query) and things worked better. The shape query used the same process.
The testing uncovered other flaws relative to feature queries when the map is in epsg:4326 but the two layers are in the same projection we still are forced back through the map projection (and decimal degrees), but that's a 6.0 optimization...
Steve
comment:2 by , 14 years ago
Your proposed change makes complete sense, based on my understanding of the code. If your test case demonstrated the problem and confirmed the fix then I'd say go ahead.
comment:3 by , 14 years ago
Cool, I'll commit. The other ticket (in case you're interested is #3212).
Steve
comment:5 by , 14 years ago
Committed in r9561... Will close for now and re-open if necessary.
Steve
comment:6 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Initial patch for the problem