NeoGeographyToolkit / StereoPipeline

The NASA Ames Stereo Pipeline is a suite of automated geodesy & stereogrammetry tools designed for processing planetary imagery captured from orbiting and landed robotic explorers on other planets.
Apache License 2.0
479 stars 168 forks source link

Resource file mola_areoid.tif contains a non-normal georeference. #283

Open oleg-alexandrov opened 4 years ago

oleg-alexandrov commented 4 years ago

When adjusting a DEM to the MOLA areoid (using for example: dem_geoid temp-DEM.tif -o temp_areoid), the following warning gets printed:

Warning: read_gdal_georeference(): WARNING! Resource file StereoPipeline/share/geoids/mola_areoid.tif contains a non-normal georeference.

This is harmless, but will need fixing at some point. When I added the areoid the warning did not come up, it was added later. It is basically complaining that the areoid I put in is weird, because not only it covers the full planet, but even overlaps with itself a little at the poles and at the seam where lon is 360.

This was on purpose. We need to be able to do bicubic interpolation into this thing to get the geoid height above datum. At the North Pole latitude is 90, and if interpolating close to there bicubically into a table of values corresponding to lat in [-90, 90] and lon in [0, 360] need a table entry at latitude beyond that as bicubic interpolation uses three grid points.

In retrospect, I could have stored an honest table, going only up to lat of 90, and I could have just used bilinear interpolation close to the poles or some other clever trick.

I don't think we will revisit this any time soon as it would require very careful testing. The simplest thing one can do is to make dem_geoid silence that warning in this context. Hence I am taking here note of that.