Re: Silencing NotGeoreferencedWarning
Sean Gillies
Hi Guillaume, Rasterio logs, mostly at DEBUG level, so that you can run programs and see what the state was before a failure. You don't see them unless you turn the warning level down to DEBUG. A program can't easily react to log messages, they go out to the environment and are inspected (or discarded) after the program terminates. Rasterio warns in a few places instead of using logging because at these places a user may want their program to react to the warning and use different logic, retry, add missing georeferencing, fix the alpha band shadowing, or whatever. An exception would be too strong in the georeferencing case, I think. But we can, with a couple lines of code, turn any NotGeoreferencedWarning into an exception that can be handled appropriately. Certainly rasterio is lagging in the RPC/GCP realm and we should think about not warning after we add the missing capabilities to the package.
On Thu, Jan 23, 2020 at 7:49 AM Guillaume Lostis <g.lostis@...> wrote:
--
Sean Gillies
|
|