opendatacube / datacube-dataset-config

Scripts for indexing data into ODC instances
22 stars 27 forks source link

Incorrect bounds computation in `index_from_s3.py` #4

Open Kirill888 opened 5 years ago

Kirill888 commented 5 years ago
  1. MTL document lists extents as they apply to pixel centers, but datacube expects extents that cover whole raster edge to edge

https://github.com/opendatacube/datacube-dataset-config/blob/5d20cf63db9cf02db1d12b45860cec216c835d38/scripts/index_from_s3_bucket.py#L78-L84

So recorded span is 15 meters (half a pixel) smaller than actual span.

  1. The usual error of incorrectly computing bounding box in Lon/Lat domain that assumes that projecting bounding box to Lon/Lat is the same as computing bounding box after projecting the whole shape into Lon/Lat with extra points added and then computing the bounding box

https://github.com/opendatacube/datacube-dataset-config/blob/5d20cf63db9cf02db1d12b45860cec216c835d38/scripts/index_from_s3_bucket.py#L87-L94