yeesian / ArchGDAL.jl

A high level API for GDAL - Geospatial Data Abstraction Library
https://yeesian.github.io/ArchGDAL.jl/stable/
Other
141 stars 27 forks source link

Set default layer number as 0 in `AG.getlayer(::AbstractDataset, ::Integer)` #256

Closed mathieu17g closed 2 years ago

mathieu17g commented 2 years ago

I often have dataset with only one layer, shouldn't we set 0 as the default value of AG.getlayer(::AbstractDataset, ::Integer) to simplify the call to this function when dealing with one layer datasets ?

visr commented 2 years ago

Sounds good to me! I would throw an error on AG.getlayer(ds) if there is more than one layer present, as I suggested here: https://github.com/evetion/GeoDataFrames.jl/issues/15.

mathieu17g commented 2 years ago

Ok, I’ll make a PR