yeesian / ArchGDAL.jl

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

Make buffer for `read!` an AbstractArray #411

Closed felixcremer closed 4 months ago

felixcremer commented 4 months ago

This widens the dispatch of the read! and rasterio! functions so that the buffer can be an AbstractArray instead of a normal Array. This will allow to also read into for example views or other array wrapper types like PermuteDimsArrays.

This would close #410. It will also close https://github.com/rafaqz/Rasters.jl/issues/596

Should we also widen the buffer type for the write! functions?

felixcremer commented 4 months ago

The failure on Julia nightly is due to a change in Julia Base removing length from Iterators.Stateful which is already reported in DiskArrays see https://github.com/meggart/DiskArrays.jl/issues/142.