Skip to content

Commit eabfa48

Browse files
committedNov 13, 2013
spatialite: update more infinite where clauses (followup 371f9ba)
1 parent e890e14 commit eabfa48

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎src/providers/spatialite/qgsspatialitefeatureiterator.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ QString QgsSpatiaLiteFeatureIterator::whereClauseRect()
221221
// handling a VirtualShape layer
222222
whereClause += QString( "MbrIntersects(%1, BuildMbr(%2))" ).arg( P->quotedIdentifier( P->mGeometryColumn ) ).arg( mbr( rect ) );
223223
}
224-
else
224+
else if ( rect.isFinite() )
225225
{
226-
if ( P->spatialIndexRTree && rect.isFinite() )
226+
if ( P->spatialIndexRTree )
227227
{
228228
// using the RTree spatial index
229229
QString mbrFilter = QString( "xmin <= %1 AND " ).arg( qgsDoubleToString( rect.xMaximum() ) );
@@ -251,6 +251,10 @@ QString QgsSpatiaLiteFeatureIterator::whereClauseRect()
251251
whereClause += QString( "MbrIntersects(%1, BuildMbr(%2))" ).arg( P->quotedIdentifier( P->mGeometryColumn ) ).arg( mbr( rect ) );
252252
}
253253
}
254+
else
255+
{
256+
whereClause = "1";
257+
}
254258
return whereClause;
255259
}
256260

0 commit comments

Comments
 (0)
Please sign in to comment.