stac-utils / stactools

Command line utility and Python library for STAC
https://stactools.readthedocs.io/
Other
103 stars 28 forks source link

eo:band object w/ common names in for Planetscope data #77

Closed cholmes closed 3 years ago

cholmes commented 3 years ago

With #40 we got band info for sksyat.

We were going to wait on full band information (center wavelength and fmhw) for Planet scope, but let's not let great be the enemy good. It'd be very valuable to have band objects for Planetscope, and they just need to have 'common name', to report bgrn for analytic stuff and rgb for the visual assets.

(in the future it may be pretty easy to add dove-r and superdove bands, but I'll do that in its own issue).

cholmes commented 3 years ago

Ah, just found superdove bands at https://developers.planet.com/docs/apis/data/sensors/#the-psbsd-instrument

So if instrument = PSB.SD then use the values there:

Blue - center wavelength: 490 fwhm: 50 Green - center wavelength: 565 fwhm: 36 Red - center wavelength: 665 fwhm: 31 Red edge - center wavelength: 705 fwhm: 15 NIR - center wavelength: 865 fwhm: 40

If the instrument is PS2 or PS.SD then just do the common names.

volaya commented 3 years ago

I have added this to https://github.com/stac-utils/stactools/pull/73

The Planet documentation includes those wavelenghts in the PSB.SD section, but it mentions that the green, red, blue and nir bands are identical in the PS2 and PS.SD instruments, so I guess we can use those values for all three instruments (with PSB having one additional band, Red edge). Assuming that is correct, I have added the support for adding band names for visual, analytic and analytic_5b images

@cholmes Check the changes to verify that the implementation is correct, since you know the Planet stuff better than me and I might have overlooked something...

cholmes commented 3 years ago

It says PS.SD, but not PS2. "The new PSB.SD instrument is comprised of the next-generation "PSBlue" telescope with a larger 47 megapixel sensor and the same filter response as PS2.SD above, in the Red, Green, Blue and NIR bands."

That I believe, that was the whole idea of dove-r - to try out the new filters (I was looking for that to be the same, but just missed that line, thanks for catching it). But it does not say PS2, and I'm quite certain the spectral response of those is not the same, and indeed isn't even entirely consistent within all sensors marked PS2.

visual, analytic and analytic_5b images

I think you can also add it for surface reflectance images.