sat-utils/sat-api

Some Landsat items have invalid eo:sun_azimuth values.

Closed this issue · 2 comments

Several Landsat items have eo:sun_azimuth values outside the 0-360 range specified by the eo extension. A small subset can be viewed using this filter

{
  "limit":"50",
   "bbox:[-160.16510981230002,-82.89845237078366,133.0933213125033,83.49694036497146],
   "query": {"eo:sun_elevation":{"lt":1}},
   "time":"2019-01-13T23:07/2019-02-13T23:07"
}

The example query above uses eo:sun_elevation, but we see both eo:sun_azimuth and eo:sun_elevation can be negative in the Landsat data.

Landsat defines sun azimuth from -180 to 180 degrees rather than 0-360 like in STAC.

I'm still not sure of the sun elevation. The MTL gives SUN_ELEVATION which as near as I can tell is 90-<solar_zenith> and should range from 0-90. Will have to do some more digging.

The tricky part is how to update the existing records. For most updates I would update sat-stac-landsat so that new Items coming in are correct, then write an ES script to update existing records. But in this case you won't be able to tell if a record is new or not. This is a good case for versioning. I can add a version field representing Item version in sat-stac-landsat. Then I can update all Items that don't have version set, and correct the angles and set the version.