File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,20 @@ QString QgsMdalProvider::description() const
44
44
45
45
QgsCoordinateReferenceSystem QgsMdalProvider::crs () const
46
46
{
47
- return QgsCoordinateReferenceSystem () ;
47
+ return mCrs ;
48
48
}
49
49
50
50
QgsMdalProvider::QgsMdalProvider ( const QString &uri, const ProviderOptions &options )
51
51
: QgsMeshDataProvider( uri, options )
52
52
{
53
53
QByteArray curi = uri.toAscii ();
54
54
mMeshH = MDAL_LoadMesh ( curi.constData () );
55
+ if ( mMeshH )
56
+ {
57
+ const QString proj = MDAL_M_projection ( mMeshH );
58
+ if ( !proj.isEmpty () )
59
+ mCrs .createFromString ( proj );
60
+ }
55
61
}
56
62
57
63
QgsMdalProvider::~QgsMdalProvider ()
Original file line number Diff line number Diff line change 26
26
27
27
class QMutex ;
28
28
class QgsCoordinateTransform ;
29
+ class QgsCoordinateReferenceSystem ;
29
30
30
31
/* *
31
32
\brief Data provider for MDAL layers.
@@ -69,6 +70,7 @@ class QgsMdalProvider : public QgsMeshDataProvider
69
70
private:
70
71
MeshH mMeshH ;
71
72
QStringList mExtraDatasetUris ;
73
+ QgsCoordinateReferenceSystem mCrs ;
72
74
};
73
75
74
76
#endif // QGSMDALPROVIDER_H
You can’t perform that action at this time.
0 commit comments