Skip to content
Prev 29300 / 29559 Next

NASA's Black Marble monthly data: Reprojection isn't accurate

My gdal 3.4.1 doesn't get the extent.

I answered this (badly) on gis.stackexchange - its a 10degree tile where
the origin is related to the h and v elements of the path (and also stored
as attributes in the netcdf structure).

I think I messed up the vertical offset, which was because I only bothered
making it work on one tile. The tile position is going to be A+Bh, C+Dv
where A,B,C,D are constants, and B and D are either plus or minus 10
depending on if the origin is top or bottom or left or right, and A and C
are the origins of the 0-th tiles. Once you have the origin, add 10 to get
the extent. This gives the correct resolution (15 minutes of arc).

Maybe tomorrow I'll get a few more tiles and write up my answer in an edit
on stackex, and check all the extents etc are correct, and put my code in a
function. I didn't have time to do all that previously but hoped there was
enough there for understanding of the problem and anyone with a bit of
maths could fix it up.

Barry
On Sat, Sep 9, 2023 at 9:28?PM Michael Sumner <mdsumner at gmail.com> wrote: