mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -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 QgsOgrProvider::crs() const
|
||||||
{
|
{
|
||||||
QgsCoordinateReferenceSystem srs;
|
QgsCoordinateReferenceSystem srs;
|
||||||
if ( !mValid )
|
if ( !mValid || ( mOGRGeomType == wkbNone ) )
|
||||||
return srs;
|
return srs;
|
||||||
|
|
||||||
if ( ogrDriver )
|
if ( ogrDriver )
|
||||||
@ -2953,7 +2953,7 @@ QgsCoordinateReferenceSystem QgsOgrProvider::crs() const
|
|||||||
// get the proj4 text
|
// get the proj4 text
|
||||||
char *pszProj4 = nullptr;
|
char *pszProj4 = nullptr;
|
||||||
OSRExportToProj4( mySpatialRefSys, &pszProj4 );
|
OSRExportToProj4( mySpatialRefSys, &pszProj4 );
|
||||||
QgsDebugMsg( pszProj4 );
|
QgsDebugMsgLevel( pszProj4, 4 );
|
||||||
CPLFree( pszProj4 );
|
CPLFree( pszProj4 );
|
||||||
|
|
||||||
char *pszWkt = nullptr;
|
char *pszWkt = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user