Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ogr debug fix
  • Loading branch information
blazek committed Jun 7, 2013
1 parent 870ecf5 commit 5f6b4bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 5f6b4bf

Please sign in to comment.