#2454 closed defect (fixed)
OGRLayer::FilterGeometry is selecting more features than expected when the filter geometry is an envelope
Reported by: | Even Rouault | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.3 |
Component: | OGR_SF | Version: | |
Severity: | normal | Keywords: | ogr filter geometry |
Cc: |
Description
This is due to the following code which assumes that if the filter is an envelope, we don't have further tests to do. The current code keeps features that should be discarded
/* -------------------------------------------------------------------- */ /* Fallback to full intersect test (using GEOS) if we still */ /* don't know for sure. */ /* -------------------------------------------------------------------- */ if( m_bFilterIsEnvelope ) return TRUE; else { if( OGRGeometryFactory::haveGEOS() ) return m_poFilterGeom->Intersects( poGeometry ); else return TRUE; }
Current state of ogr_shape_9 test is a consequence of this wrong test.
############################################################################### # Test that we don't return a polygon if we are "inside" but non-overlapping. # For now we actually do return this shape, but eventually we won't. def ogr_shape_9():
Change History (4)
comment:1 by , 16 years ago
Owner: | changed from | to
---|
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Milestone: | → 1.5.3 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in branches/1.5 in r14830.
comment:4 by , 16 years ago
Note:
See TracTickets
for help on using tickets.
Fixed in trunk in r14828 and in r14829.