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
492 stars 173 forks source link

Proj4 Errors with point2dem #326

Open jlaura opened 3 years ago

jlaura commented 3 years ago

Describe the bug Proj4 errors in point2dem

To Reproduce Steps to reproduce the behavior:

  1. Pre-process using ISIS as per the manual, bundle adjust using ASP's capabilities.
  2. Generate a CTX PC. We used images: F21_043907_1652_XN_14S184W and F21_043841_1654_XN_14S184W.
  3. Run point2dem asking for an orthographic projection: point2dem --threads 14 --dem-spacing 20 --datum MOLA --orthographic --nodata -32767 results_ba/F21_043907_1652_XN_14S184W__F21_043841_1654_XN_14S184W-PC.tif -o results_ba/F21_043907_1652_XN_14S184W__F21_043841_1654_XN_14S184W
  4. We then see the following output:
    2020-12-09 13:53:02 {0} [ console ] :   --> Re-referencing altitude values using datum: D_MARS.
    2020-12-09 13:53:02 {0} [ console ] :       Axes [3.396e+06 3.396e+06] meters.
    2020-12-09 13:53:40 {0} [ console ] : Bad projection in GeoReference.cc. Proj.4 error: tolerance condition error.
    Location is Vector2(175.268,-15.1453).

Expected behavior With other pairs is working without an issue. This does not look like a longitude issue (we are not defining center lat or center lon) as we have other pairs on either side working as expected.

Question: Do we need to be defining the center lat and center lon? If not, what do you all default to? 0,0 or 0,180?

If we swap the projection to something like mercator, this works as expected. Also, setting the center lat/ center lon also seems to have solved our issue. So I think this might be a question of - what defaults are being used?

Error Logs, Terminal Captures, Screenshots

Your Environment (please complete the following information):

Additional context Add any other context about the problem here.

oleg-alexandrov commented 3 years ago

Thank you for the report. I must say I never used the orthographic projection, that probably explains your issue.

Would the stereographic projection work for you? Then you would need to specify --proj-lon and --proj-lat with --stereographic.