Skip to content
Permalink
Browse files
[ogr] Don't try to calculate CRS for geometryless layers
Slight speedup when loading attribute table containing
joins to a geometryless OGR table
  • Loading branch information
nyalldawson committed Sep 3, 2017
1 parent e30f704 commit 7a2f148
Showing 1 changed file with 2 additions and 4 deletions.
@@ -2913,10 +2913,8 @@ QGISEXTERN QList< QgsDataItemProvider * > *dataItemProviders()

QgsCoordinateReferenceSystem QgsOgrProvider::crs() const
{
QgsDebugMsg( "Entering." );

QgsCoordinateReferenceSystem srs;
if ( !mValid )
if ( !mValid || ( mOGRGeomType == wkbNone ) )
return srs;

if ( ogrDriver )
@@ -2949,7 +2947,7 @@ QgsCoordinateReferenceSystem QgsOgrProvider::crs() const
// get the proj4 text
char *pszProj4 = nullptr;
OSRExportToProj4( mySpatialRefSys, &pszProj4 );
QgsDebugMsg( pszProj4 );
QgsDebugMsgLevel( pszProj4, 4 );
CPLFree( pszProj4 );

char *pszWkt = nullptr;

0 comments on commit 7a2f148

Please sign in to comment.