File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -2503,7 +2503,8 @@ void QgsGdalProvider::initBaseDataset()
2503
2503
|| mGeoTransform [2 ] != 0.0
2504
2504
|| mGeoTransform [4 ] != 0.0
2505
2505
|| mGeoTransform [5 ] > 0.0 ) )
2506
- || GDALGetGCPCount ( mGdalBaseDataset ) > 0 )
2506
+ || GDALGetGCPCount ( mGdalBaseDataset ) > 0
2507
+ || GDALGetMetadata ( mGdalBaseDataset , " RPC" ) )
2507
2508
{
2508
2509
QgsLogger::warning ( " Creating Warped VRT." );
2509
2510
@@ -2580,7 +2581,16 @@ void QgsGdalProvider::initBaseDataset()
2580
2581
if ( !crsFromWkt ( GDALGetProjectionRef ( mGdalDataset ) ) &&
2581
2582
!crsFromWkt ( GDALGetGCPProjection ( mGdalDataset ) ) )
2582
2583
{
2583
- QgsDebugMsg ( " No valid CRS identified" );
2584
+ if ( mGdalBaseDataset != mGdalDataset &&
2585
+ GDALGetMetadata ( mGdalBaseDataset , " RPC" ) )
2586
+ {
2587
+ // Warped VRT of RPC is in EPSG:4326
2588
+ mCrs .createFromOgcWmsCrs ( " EPSG:4326" );
2589
+ }
2590
+ else
2591
+ {
2592
+ QgsDebugMsg ( " No valid CRS identified" );
2593
+ }
2584
2594
}
2585
2595
2586
2596
// set up the coordinat transform - in the case of raster this is mainly used to convert
You can’t perform that action at this time.
0 commit comments