Skip to content
Permalink
Browse files
wms identify: report error if features types were guessed from GML bu…
…t no features parsed
  • Loading branch information
blazek committed Feb 13, 2014
1 parent 8f82975 commit ee236d2d6c257fa2b82b47d524671ed18137ada8
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/providers/wms/qgswmsprovider.cpp
@@ -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 ) );
}
}

0 comments on commit ee236d2

Please sign in to comment.