106
108
"Allows use of the index [] operator to get a layer at the index."
107
109
if isinstance(index, six.string_types):
108
110
l = capi.get_layer_by_name(self.ptr, force_bytes(index))
110
113
elif isinstance(index, int):
111
114
if index < 0 or index >= self.layer_count:
112
115
raise OGRIndexError('index out of range')