nasa-jpl / its_live_production

A NASA MEaSUREs project to provide automated, low latency, global glacier flow and elevation change datasets
MIT License
17 stars 6 forks source link

Fix GeoTransform in datacubes #3

Closed mliukis closed 3 years ago

mliukis commented 3 years ago

Datacube is copying first granule's mapping which results in wrong X and Y origin in GeoTransform. Datacube should populate GeoTransform attribute of mapping with tile information: [min(x)-120/2, 120, 0, max(y)+120/2, 0, -120]

where fields are GT(0) x-coordinate of the upper-left corner of the upper-left pixel. GT(1) w-e pixel resolution / pixel width. GT(2) row rotation (typically zero). GT(3) y-coordinate of the upper-left corner of the upper-left pixel. GT(4) column rotation (typically zero). GT(5) n-s pixel resolution / pixel height (negative value for a north-up image).