Skip to content
Permalink
Browse files

ogr debug fix

  • Loading branch information
blazek committed Jun 7, 2013
1 parent 870ecf5 commit 5f6b4bfac2d058d65dc9016d389a518ac48fe199
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -528,17 +528,19 @@ QStringList QgsOgrProvider::subLayers() const
QString theLayerName = FROM8( OGR_FD_GetName( fdef ) );
OGRwkbGeometryType layerGeomType = OGR_FD_GetGeomType( fdef );

QgsDebugMsg( QString("layerGeomType = %1").arg( layerGeomType ) );

if ( layerGeomType != wkbUnknown )
{
int theLayerFeatureCount = OGR_L_GetFeatureCount( layer, 0 );

QString geom = ogrWkbGeometryTypeName( layerGeomType );

mSubLayerList << QString( "%1:%2:%3:%4" ).arg( i ).arg( theLayerName ).arg( theLayerFeatureCount == -1 ? tr( "Unknown" ) : QString::number( theLayerFeatureCount ) ).arg( geom );
QgsDebugMsg( "Unknown geometry type, count features for each geometry type" );
}
else
{
QgsDebugMsg( "Unknown geometry type, count features for each geometry type" );
// Add virtual sublayers for supported geometry types if layer type is unknown
// Count features for geometry types
QMap<OGRwkbGeometryType, int> fCount;

0 comments on commit 5f6b4bf

Please sign in to comment.
You can’t perform that action at this time.