Ticket #1885 (closed defect: fixed)
OGR Features don't have a 'keys()', 'items()' interface
| Reported by: | crschmidt | Owned by: | hobu |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5.0 |
| Component: | SWIG (all bindings) | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: | warmardam |
Description
It would be nice to be able to do:
for key, value in feature.items():
print key, value
in Python.
for key in feature.keys() would be handy as well.
If neither of these is possible, a method to return a list of the keys which can be passed to getattr:
getattr(feature, key)
ould be good.
Change History
Note: See
TracTickets for help on using
tickets.
