Re: Serializing and deserializing rasterio object

Sean Gillies


On Mon, Sep 16, 2019 at 5:36 AM Juliano <juliano.ecc@...> wrote:
Hi all
Is there an easy way to serialize and deserialize rasterio object?

Do you mean a dataset object returned by We have left them not pickleable for the same reason Python file objects aren't pickleable: in the implementation there is an OS file descriptor (or several) that isn't serializable.

As an approximation, you could could save the dataset's filename or URL (its .name attribute) and the creation or opening options (in its .options attribute) and then call when you want to "deserialize".
Sean Gillies

Join to automatically receive all group messages.