Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set units metadata #23

Open
perrygeo opened this issue Aug 20, 2016 · 4 comments
Open

set units metadata #23

perrygeo opened this issue Aug 20, 2016 · 4 comments

Comments

@perrygeo
Copy link
Contributor

With support for recording per-band units and descriptions in Rasterio (see rasterio/rasterio#854) we should record the units for the outputs.

ex:

with rasterio.open(output, 'w', **profile) as dst:
    dst.set_units('K')
@sgillies
Copy link

@perrygeo it's set_units(bidx, units), so instead:

with rasterio.open(output, 'w', **profile) as dst:
    for bidx in dst.indexes:
        dst.set_units(bidx, 'degK')
        dst.set_description(bidx, "TOA brightness temperature")

@perrygeo perrygeo changed the title units set units metadata Aug 23, 2016
@perrygeo
Copy link
Contributor Author

Units on the TOA products would be "Reflectance" but only if we use raw units or provide a scaling factor to covert back.

@perrygeo perrygeo modified the milestone: 0.3 Aug 23, 2016
@perrygeo perrygeo self-assigned this Aug 23, 2016
@perrygeo
Copy link
Contributor Author

Note, let's also set the scaling factor in the metadata tags

@perrygeo
Copy link
Contributor Author

perrygeo commented Aug 24, 2016

Looking at this more closely, riomucho which has control of the destination dataset object so that will require some changes to that lib. Ticket here meanwhile bumping this from the 0.3 milestone.

One temporary workaround: reopen the dataset in r+ mode after it's all written and set the units. Seems like a hack though...

@perrygeo perrygeo removed this from the 0.3 milestone Aug 24, 2016
@perrygeo perrygeo removed their assignment Sep 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants