mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-19 00:02:48 -04:00
postgres provider: also cast geography to geometry when using && (fixes #8572)
This commit is contained in:
parent
16ad2f82d4
commit
90b3efb93d
@ -289,14 +289,14 @@ QString QgsPostgresFeatureIterator::whereClauseRect()
|
||||
.arg( mSource->mRequestedSrid.isEmpty() ? mSource->mDetectedSrid : mSource->mRequestedSrid );
|
||||
}
|
||||
|
||||
QString whereClause = QString( "%1%2 && %3" )
|
||||
.arg( QgsPostgresConn::quotedIdentifier( mSource->mGeometryColumn ) )
|
||||
.arg( mSource->mSpatialColType == sctPcPatch ? "::geometry" : "" )
|
||||
.arg( qBox );
|
||||
|
||||
bool castToGeometry = mSource->mSpatialColType == sctGeography ||
|
||||
mSource->mSpatialColType == sctPcPatch;
|
||||
|
||||
QString whereClause = QString( "%1%2 && %3" )
|
||||
.arg( QgsPostgresConn::quotedIdentifier( mSource->mGeometryColumn ) )
|
||||
.arg( castToGeometry ? "::geometry" : "" )
|
||||
.arg( qBox );
|
||||
|
||||
if ( mRequest.flags() & QgsFeatureRequest::ExactIntersect )
|
||||
{
|
||||
QString curveToLineFn; // in postgis < 1.5 the st_curvetoline function does not exist
|
||||
|
Loading…
x
Reference in New Issue
Block a user