cogeotiff / rio-tiler

User friendly Rasterio plugin to read raster datasets.
https://cogeotiff.github.io/rio-tiler/
BSD 3-Clause "New" or "Revised" License
514 stars 107 forks source link

`NotGeoreferencedWarning` in `feature` #627

Closed JackDunnNZ closed 1 year ago

JackDunnNZ commented 1 year ago

When calling .feature I am sometimes seeing a rasterio.errors.NotGeoreferencedWarning arising from this call to rasterize:

https://github.com/cogeotiff/rio-tiler/blob/584ecdbc204f4c2870250e777e69db89a7f3157f/rio_tiler/io/rasterio.py#L566-L574

It seems like the warning could be safely filtered, as shape is not required to specify a CRS?

vincentsarago commented 1 year ago

I wonder if this is more a rasterio issue 🤷

Could you provide a code that reproduce the warning (because I can't reproduce)

Edit: ok, I can see those now. I'll add a filter 👍

JackDunnNZ commented 1 year ago

Great, thanks for the quick fix!