Skip to content

Commit

Permalink
Added check for Contains to force a Join on the rtree table for large…
Browse files Browse the repository at this point in the history
… Spatiallite/Geopackage DB's and improves the lookup performance significantly.
  • Loading branch information
Rutjes, Dennis committed Oct 30, 2019
1 parent fb13d41 commit 2ceadc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mapogr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3497,7 +3497,7 @@ static int msOGRExtractTopSpatialFilter( msOGRFileInfo *info,
pSpatialFilterNode);
}

if( expr->m_nToken == MS_TOKEN_COMPARISON_INTERSECTS &&
if( (expr->m_nToken == MS_TOKEN_COMPARISON_INTERSECTS || expr->m_nToken == MS_TOKEN_COMPARISON_CONTAINS ) &&
expr->m_aoChildren.size() == 2 &&
expr->m_aoChildren[1]->m_nToken == MS_TOKEN_LITERAL_SHAPE )
{
Expand Down

0 comments on commit 2ceadc9

Please sign in to comment.