Skip to content

Commit

Permalink
Mark some transforms as approximate
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 17, 2020
1 parent 8bb1c47 commit 890fe57
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/core/qgsmapsettings.cpp
Expand Up @@ -439,6 +439,7 @@ QgsRectangle QgsMapSettings::layerExtentToOutputExtent( const QgsMapLayer *layer
QgsDebugMsgLevel( QStringLiteral( "sourceCrs = %1" ).arg( ct.sourceCrs().authid() ), 3 );
QgsDebugMsgLevel( QStringLiteral( "destCRS = %1" ).arg( ct.destinationCrs().authid() ), 3 );
QgsDebugMsgLevel( QStringLiteral( "extent %1" ).arg( extent.toString() ), 3 );
ct.setBallparkTransformsAreAppropriate( true );
extent = ct.transformBoundingBox( extent );
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/core/raster/qgsrasterlayerrenderer.cpp
Expand Up @@ -102,7 +102,9 @@ QgsRasterLayerRenderer::QgsRasterLayerRenderer( QgsRasterLayer *layer, QgsRender
{
try
{
myProjectedViewExtent = rendererContext.coordinateTransform().transformBoundingBox( rendererContext.extent() );
QgsCoordinateTransform ct = rendererContext.coordinateTransform();
ct.setBallparkTransformsAreAppropriate( true );
myProjectedViewExtent = ct.transformBoundingBox( rendererContext.extent() );
}
catch ( QgsCsException &cs )
{
Expand All @@ -113,7 +115,9 @@ QgsRasterLayerRenderer::QgsRasterLayerRenderer( QgsRasterLayer *layer, QgsRender

try
{
myProjectedLayerExtent = rendererContext.coordinateTransform().transformBoundingBox( layer->extent() );
QgsCoordinateTransform ct = rendererContext.coordinateTransform();
ct.setBallparkTransformsAreAppropriate( true );
myProjectedLayerExtent = ct.transformBoundingBox( layer->extent() );
}
catch ( QgsCsException &cs )
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgscoordinateoperationwidget.cpp
Expand Up @@ -106,7 +106,7 @@ void QgsCoordinateOperationWidget::setMapCanvas( QgsMapCanvas *canvas )
// reproject extent
QgsCoordinateTransform ct( QgsProject::instance()->crs(),
QgsCoordinateReferenceSystem::fromEpsgId( 4326 ), QgsProject::instance() );

ct.setBallparkTransformsAreAppropriate( true );
g = g.densifyByCount( 5 );
try
{
Expand Down

0 comments on commit 890fe57

Please sign in to comment.