Ticket #2454 (closed defect: fixed)
OGRLayer::FilterGeometry is selecting more features than expected when the filter geometry is an envelope
| Reported by: | rouault | Owned by: | 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
Note: See
TracTickets for help on using
tickets.
