File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/providers/postgres/raster Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -869,7 +869,7 @@ bool QgsPostgresRasterProvider::init()
869
869
// Try to determine extent from raster
870
870
const QString extentSql { QStringLiteral ( " SELECT ST_Envelope( %1 ) "
871
871
" FROM %2 WHERE %3" )
872
- .arg ( quotedValue ( mRasterColumn ) )
872
+ .arg ( quotedIdentifier ( mRasterColumn ) )
873
873
.arg ( mQuery )
874
874
.arg ( mSqlWhereClause .isEmpty () ? " 't'" : mSqlWhereClause ) };
875
875
@@ -915,8 +915,8 @@ bool QgsPostgresRasterProvider::init()
915
915
}
916
916
917
917
// Compute raster size
918
- mHeight = static_cast <long >( mExtent .height () / std::abs ( mScaleY ) );
919
- mWidth = static_cast <long >( mExtent .width () / std::abs ( mScaleX ) );
918
+ mHeight = static_cast <long >( std::round ( mExtent .height () / std::abs ( mScaleY ) ) );
919
+ mWidth = static_cast <long >( std::round ( mExtent .width () / std::abs ( mScaleX ) ) );
920
920
// is tiled?
921
921
mIsTiled = ( mWidth != mTileWidth ) || ( mHeight != mTileHeight );
922
922
You can’t perform that action at this time.
0 commit comments