Skip to content
Permalink
Browse files
[GDAL provider] Use GDALAutoCreateWarpedVRT() when the dataset has on…
…ly RPC
  • Loading branch information
rouault committed May 3, 2016
1 parent 6173539 commit 75cfb32
Showing 1 changed file with 12 additions and 2 deletions.
@@ -2503,7 +2503,8 @@ void QgsGdalProvider::initBaseDataset()
|| mGeoTransform[2] != 0.0
|| mGeoTransform[4] != 0.0
|| mGeoTransform[5] > 0.0 ) )
|| GDALGetGCPCount( mGdalBaseDataset ) > 0 )
|| GDALGetGCPCount( mGdalBaseDataset ) > 0
|| GDALGetMetadata( mGdalBaseDataset, "RPC" ) )
{
QgsLogger::warning( "Creating Warped VRT." );

@@ -2580,7 +2581,16 @@ void QgsGdalProvider::initBaseDataset()
if ( !crsFromWkt( GDALGetProjectionRef( mGdalDataset ) ) &&
!crsFromWkt( GDALGetGCPProjection( mGdalDataset ) ) )
{
QgsDebugMsg( "No valid CRS identified" );
if ( mGdalBaseDataset != mGdalDataset &&
GDALGetMetadata( mGdalBaseDataset, "RPC" ) )
{
// Warped VRT of RPC is in EPSG:4326
mCrs.createFromOgcWmsCrs( "EPSG:4326" );
}
else
{
QgsDebugMsg( "No valid CRS identified" );
}
}

//set up the coordinat transform - in the case of raster this is mainly used to convert

0 comments on commit 75cfb32

Please sign in to comment.