Closed simod closed 2 years ago
Can you show me how you are reading the data from the TIFF?
I think, there will be a default value assumed, for reading outside of the image, resulting in wrong colors.
@constantinius thanks for the quick reply. An example here on the cog explorer. https://geotiffjs.github.io/cog-explorer/#long=48.336&lat=-17.517&zoom=9&scene=https://cems-rm-viewer.s3.eu-central-1.amazonaws.com/EMSR424/AOI02/DEL/COG/EMSR424_AOI02_DEL_PRODUCT_SENTINEL2_20200131_0704_ORTHO.tif&bands=&pipeline=
Ah, I see. We actually had this in a couple of other images in COG-Explorer. This may be due to overviews. I'll investigate.
Indeed is related to ovrs. I tried to generate them at 512 size and, at small zoom levels, the green is much bigger. I still have the feeling is due to the cog generation, but I'm fighting for days now without success... :)
thanks
@constantinius I tried to generate the image without the overviews, the margin is a lot less but some is still there, like the filling of the tiles is also using the value 0. I'd suppose the overviews are just filled using the same approach. But I'm not sure where to look in the code to find where that happens.
@constantinius hi, I was wondering if you had the chance to look at this, or could you please point me to the code part that handles it? Thanks a lot!
Hi @simod
Sorry, was on vacation last week. I'll have a look as soon as possible (working through backlog now)
@constantinius sorry to come back to this again. Though I'd like to find a way to avoid the margin in my application as is very ugly... for what I could get it seems that whatever is outside of the image in tiles and overviews is put to 0, while it should probably put to the no-data value of the image. I can try to dive into the code if you are busy but I'd appreciate some pointer :) or maybe is something that I can fix at COG generation level that I don't see...
Thanks a lot in advance. ps, here a link to my app that has the same symptoms of the cog explorer. https://activations.emergency.copernicus.eu/#EMSR424.
I'm guessing this may be fixed by #248.
@simod, let me know if you are able to test your application with the changes in my branch.
@simod @tschaub
I think with #248 we can close this issue, right?
@constantinius I couldn't test it but looking at the description and the code I think is a great work that will solve it. I'm +1 for closing, in case I'll come back.
Thanks @tschaub !
I'm generating 256 colors palette COGs but they display a very wide margin outside the extent of them. The color of the margin is taken from the value of the first element of the palette (0) and it appears outside beyond the noData, where there is no information. Seems like the part of the tiles where there's no image are set to 0 and colored accordingly. Do you have any hint? Thanks in advance