Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local DEM Intersection Failing #5401

Open
acpaquette opened this issue Jan 9, 2024 · 2 comments
Open

Local DEM Intersection Failing #5401

acpaquette opened this issue Jan 9, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@acpaquette
Copy link
Collaborator

ISIS version(s) affected: 3.7.0+

Description
While working with MSL data (landed data) and a small local DEM in cam2map or campt I get the following:

Group = Error
  Program = campt
  Code    = 1
  Message = "Requested position does not project in camera model; no surface
             intersection"
  File    = CameraPointInfo.cpp
  Line    = 343
End_Group
End

Here is the mapping group from the DEM:

  Group = Mapping
    ProjectionName     = SimpleCylindrical
    CenterLongitude    = 180.0000000
    TargetName         = Mars
    EquatorialRadius   = 3396190.0 <meters>
    PolarRadius        = 3376200.0 <meters>
    LatitudeType       = Planetocentric
    LongitudeDirection = PositiveEast
    LongitudeDomain    = 360
    MinimumLatitude    = -4.6389730888564582
    MaximumLatitude    = -4.63806672312831658
    MinimumLongitude   = 137.40195404577
    MaximumLongitude   = 137.40240241741
    UpperLeftCornerX   = -2524986.2923247 <meters>
    UpperLeftCornerY   = -274919.99213044 <meters>
    PixelResolution    = 0.010006435906321 <meters/pixel>
    Scale              = 5923657.3419577 <pixels/degree>
  End_Group

It seems this issue arises with a very small DEM, basically 0.001 degree by 0.001 degree along with very oblique angles (as we are looking toward the horizon from the surface).

Rather than intersect a mesh or other surface simulation, the algorithm starts by intersecting the sphere/ellipsoid, gets the lat lon from the intersection, then tries to get the radii value in the DEM at the intersection lat lon. If pixel value in the DEM at that point is NULL, we fail to intersect and thus end the traverse to our DEM intersection. See intersectSurface in DemShape.cpp

With the above conditions, it seems like the DemShape intersectSurface algorithm falls apart and cannot accurately walk the intersection back towards the rover/point of origin like one would expect. Instead, failing to get the local radius of the DEM since the initial point of intersection lands outside of the small DEM.

This is tagged as a bug, but may be a fundamental limitation in the DemShape model.

How to reproduce
I have attached a zip file that contains the necessary files to produce the error. Inside of the zip is a README with further details
min_example.zip

Possible Solution
If this is a fundamental limitation of the DemShape intersection code, then using a different method may be necessary. Other shape models exist in ISIS such as embree and bullet, both with more robust/accurate intersection algorithms. So a solution may be to convert the DEM into a different file format for those other shape models to use.

Another alternative would be to rewrite the DEM intersection algorithm to be more robust, potentially using point clouds. EmbreeShapeModel seems to already use point clouds and can read in generic point cloud files so rewriting the DEM intersection seems redundant if converting the DEM to a point cloud file is possible.

@acpaquette acpaquette added the bug Something isn't working label Jan 9, 2024
@acpaquette
Copy link
Collaborator Author

#5408 Has a potential solution to this issue

Copy link

Thank you for your contribution!

Unfortunately, this issue hasn't received much attention lately, so it is labeled as 'stale.'

If no additional action is taken, this issue will be automatically closed in 180 days.

If you want to participate in our support prioritization meetings or be notified when support sprints are happening, you can sign up the support sprint notification emails here.

Read more about our support processs here

@github-actions github-actions bot added the inactive Issue that has been inactive for at least 6 months label Sep 16, 2024
@chkim-usgs chkim-usgs removed the inactive Issue that has been inactive for at least 6 months label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants