Skip to content

Commit 0aec8e9

Browse files
committed
Postgres simplification does not work with curved types
1 parent 7e9a0a7 commit 0aec8e9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/providers/postgres/qgspostgresfeatureiterator.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,13 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause, long
486486
geom );
487487
}
488488

489+
QGis::WkbType usedGeomType = mSource->mRequestedGeomType != QGis::WKBUnknown
490+
? mSource->mRequestedGeomType : mSource->mDetectedGeomType;
491+
489492
if ( !mRequest.simplifyMethod().forceLocalOptimization() &&
490493
mRequest.simplifyMethod().methodType() != QgsSimplifyMethod::NoSimplification &&
491-
QGis::flatType( QGis::singleType( mSource->mRequestedGeomType != QGis::WKBUnknown
492-
? mSource->mRequestedGeomType
493-
: mSource->mDetectedGeomType ) ) != QGis::WKBPoint )
494+
QGis::flatType( QGis::singleType( usedGeomType ) ) != QGis::WKBPoint &&
495+
!QgsWKBTypes::isCurvedType( QGis::fromOldWkbType( usedGeomType ) ) )
494496
{
495497
// PostGIS simplification method to use
496498
QString simplifyPostgisMethod;

0 commit comments

Comments
 (0)