cogeotiff / rio-cogeo

Cloud Optimized GeoTIFF creation and validation plugin for rasterio
https://cogeotiff.github.io/rio-cogeo/
BSD 3-Clause "New" or "Revised" License
308 stars 42 forks source link

Creating a COG in place rather than generating a new file? #240

Closed rowanwins closed 2 years ago

rowanwins commented 2 years ago

Thanks for making and sharing rio-cogeo - it is so good!

How feasible would it be possible to convert an existing file into a COG in place, rather than generating a new output file? Would it be possible if an existing GeoTIFF met a minimum set of requirements?

Cheers Rowan

vincentsarago commented 2 years ago

@rowanwins 🙏 👋

My understanding is that is not possible because each time we have to perform a full read/write of the file.

Because we put the new COG in memory or in a tmp file before writing you should still be able to use the output file to be your input file, but I don't think that's what you were looking for