func (ds *DataSource) Layer() (*Layer, error) { layer := C.OGR_DS_GetLayer(ds.v, 0) if layer == nil { return nil, lastOgrError("failed to get layer 0") } return &Layer{layer}, nil }
// Fetch a layer of this data source by index func (ds DataSource) LayerByIndex(index int) Layer { layer := C.OGR_DS_GetLayer(ds.cval, C.int(index)) return Layer{layer} }
func (dataset Dataset) LayerByIndex(index int) Layer { layer := C.OGR_DS_GetLayer(dataset.cval, C.int(index)) return Layer{layer} }