mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
wms identify: report error if features types were guessed from GML but no features parsed
This commit is contained in:
parent
8f829750a2
commit
ee236d2d6c
@ -4578,6 +4578,16 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
|
||||
featureStoreList.append( featureStore );
|
||||
delete coordinateTransform;
|
||||
}
|
||||
// It is suspicious if we guessed feature types from GML but could not get
|
||||
// features from it. Either we geuessed wrong schema or parsing features failed.
|
||||
// Report it as error so that user can switch to another format in results dialog.
|
||||
if ( xsdPart < 0 && !featureTypeNames.isEmpty() && featureStoreList.isEmpty() )
|
||||
{
|
||||
QgsError err = ERROR( tr( "Cannot identify" ) );
|
||||
err.append( tr( "Result parsing failed. %1 feature types were guessed from gml (%2) but no features were parsed." ).arg( featureTypeNames.size() ).arg( featureTypeNames.join( "," ) ) );
|
||||
QgsDebugMsg( "parsing GML error: " + err.message() );
|
||||
return QgsRasterIdentifyResult( err );
|
||||
}
|
||||
results.insert( count, qVariantFromValue( featureStoreList ) );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user