Opened 16 years ago
Closed 16 years ago
#2222 closed defect (fixed)
GetSubDatasets() sugar missing in NG python bindings
Reported by: | warmerdam | Owned by: | hobu |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.1 |
Component: | PythonBindings | Version: | 1.5.0 |
Severity: | normal | Keywords: | |
Cc: | hobu |
Description
The old generation bindings had a "syntactic sugar" method on GDALDataset like this:
def GetSubDatasets(self): sd_list = [] sd = self.GetMetadata('SUBDATASETS') if sd is None: return sd_list i = 1 while sd.has_key('SUBDATASET_'+str(i)+'_NAME'): sd_list.append( ( sd['SUBDATASET_'+str(i)+'_NAME'], sd['SUBDATASET_'+str(i)+'_DESC'] ) ) i = i + 1 return sd_list
This was not ported to the NG bindings. I'll do so...
Note:
See TracTickets
for help on using tickets.
This has been introduced into the NG bindings in trunk (r13769) and 1.5 branch (r13770).
It was tested interactively once, but there are no tests for this method in the test suite.