Closed alexgleith closed 5 months ago
🚀 Deployed on https://66330e492587185dac79173b--odc-geo-docs.netlify.app
So, I checked, and all these tags and special metadata items are written to the GDAL section in the tif metadata:
GDAL Metadata: <GDALMetadata>
<Item name="random_tag">random_value</Item>
<Item name="OFFSET" sample="0" role="offset">0.989999999999999991</Item>
<Item name="SCALE" sample="0" role="scale">100</Item>
<Item name="UNITTYPE" sample="0" role="unittype">microwaves</Item>
</GDALMetadata>
This is all fine, I do have issue with the name tags
: since this is TIFF making function, my first assumption is that tags
refers to TIFF tags and not to "GDAL" tags, aka gdal metadata items, or general "annotation" of some sort. On the other hand that's the nomenclature used by rioxarray
also, so...
@alexgleith do you want to rebase this into one clean commit and maybe add a note to docs clarifying that tags refer to "GDAL tags/metadata". As a person who actually read TIFF spec I'm probably biased in my interpretation of tags
, but it won't hurt being more precise about it.
Thanks, @Kirill888. I've refactored to simplify the multi-band case a bit.
Can you please check my logic looks like it'll work? I think it's ok...
Added a simple test.
Open to feedback on a better method, but I think this works ok and hopefully handles all cases!