Ticket #79 (defect)
Opened 2 years ago
Last modified 2 years ago
compare filter bounding box to all feature geometries
Status: assigned
| Reported by: | seang | Assigned to: | seang (accepted) |
|---|---|---|---|
| Priority: | major | Milestone: | PCL 0.12 |
| Component: | Data Stores and Sources | Version: | |
| Keywords: | Cc: | cph | |
In postgis.py feature_sql we are only comparing the first feature geometry to a filter bbox, which can lead to erroneous results for the multiple geometry case.
I think there are two solutions
1) OR together query clauses for all feature geometries like
the_centroid && SetSRID('BOX3D...') OR the_geom && SetSRID('BOX3D...')
which is not terribly efficient, but probably also not too costly.
2) we could consider checking the database for a hint about the full feature bounds. Say the table has a "bounds" column of the BOX3D type. We could use this column instead of checking each feature geometry. This would be more efficient, but would require some agreement on what to name this special column. DB admins would also need to be careful to implement rules in their database to keep the bounds accurate.
Change History
07/14/06 19:12:53: Modified by seang
- status changed from new to assigned.
11/03/06 15:19:28: Modified by seang
- milestone changed from 0.11 to 0.12.
Put this off to 0.12. Multi-geometry features are still a fairly minor use case.

A solution is committed in r455. To specify the geometry to which a bbox will be compared
(from TableAccessTest?.test_targeted_bbox in testpgfeatures.py)
I'll close this ticket after collecting more feedback.