Skip to content
Permalink
Browse files
[spatialite] Fix broken extent filter feature request against a spati…
…alite view
  • Loading branch information
nirvn authored and nyalldawson committed Nov 5, 2021
1 parent eb3d505 commit 14da7f189e007e1541044ac8b740d08b3f83c6ab
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/spatialite/qgsspatialitefeatureiterator.cpp
@@ -455,7 +455,7 @@ QString QgsSpatiaLiteFeatureIterator::whereClauseRect()
mbrFilter += QStringLiteral( "ymax >= %1" ).arg( qgsDoubleToString( mFilterRect.yMinimum() ) );
QString idxName = QStringLiteral( "idx_%1_%2" ).arg( mSource->mIndexTable, mSource->mIndexGeometry );
whereClause += QStringLiteral( "%1 IN (SELECT pkid FROM %2 WHERE %3)" )
.arg( QStringLiteral( "ROWID" ),
.arg( mSource->mViewBased ? quotedPrimaryKey() : QStringLiteral( "ROWID" ),
QgsSqliteUtils::quotedIdentifier( idxName ),
mbrFilter );
}
@@ -464,7 +464,7 @@ QString QgsSpatiaLiteFeatureIterator::whereClauseRect()
// using the MbrCache spatial index
QString idxName = QStringLiteral( "cache_%1_%2" ).arg( mSource->mIndexTable, mSource->mIndexGeometry );
whereClause += QStringLiteral( "%1 IN (SELECT rowid FROM %2 WHERE mbr = FilterMbrIntersects(%3))" )
.arg( QStringLiteral( "ROWID" ),
.arg( mSource->mViewBased ? quotedPrimaryKey() : QStringLiteral( "ROWID" ),
QgsSqliteUtils::quotedIdentifier( idxName ),
mbr( mFilterRect ) );
}

0 comments on commit 14da7f1

Please sign in to comment.