mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
Merge pull request #5110 from nyalldawson/ogr_crs
[ogr] Don't try to calculate CRS for geometryless layers
This commit is contained in:
commit
e464c76b64
@ -2920,7 +2920,7 @@ QGISEXTERN QList< QgsDataItemProvider * > *dataItemProviders()
|
||||
QgsCoordinateReferenceSystem QgsOgrProvider::crs() const
|
||||
{
|
||||
QgsCoordinateReferenceSystem srs;
|
||||
if ( !mValid )
|
||||
if ( !mValid || ( mOGRGeomType == wkbNone ) )
|
||||
return srs;
|
||||
|
||||
if ( ogrDriver )
|
||||
@ -2953,7 +2953,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user