Commit 60d0685f authored by Kris Vanneste's avatar Kris Vanneste
Browse files

Added get_driver method to GdalRasterData.

git-svn-id: https://svn.seismo.oma.be/svn/seismo/mapping/layeredbasemap/trunk@7598 40b490c5-b4d9-47cb-8714-9bef99b524d5
parent 40515c87
......@@ -864,6 +864,17 @@ class GdalRasterData(MeshGridData):
#mysubdataset_name = subdatasets[1][0]
#mydata = gdal.Open(mysubdataset_name, gdal.GA_ReadOnly).ReadAsRaster()
def get_driver(self):
"""
Return GDAL driver used to read the grid file
"""
import gdal
ds = gdal.Open(self.filespec, gdal.GA_ReadOnly)
driver = ds.GetDriver()
ds = None
return driver
def get_subdataset_names(self):
import gdal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment