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

Maptrim fails on global mosaic for mode=both #4646

Closed
lwellerastro opened this issue Sep 30, 2021 · 0 comments · Fixed by #4682
Closed

Maptrim fails on global mosaic for mode=both #4646

lwellerastro opened this issue Sep 30, 2021 · 0 comments · Fixed by #4682
Assignees
Labels
Products Issues which are impacting the products group
Milestone

Comments

@lwellerastro
Copy link
Contributor

lwellerastro commented Sep 30, 2021

ISIS version(s) affected: 5.0.2

Description
When running on a mosaic using mode=both (trim and crop), I get the following error messages:

  Group = Error
    Program = maptrim
    Code    = 1
    Message = "Unable to initialize cube projection from file
               [TEMPORARYcroppedJ76294.cub]"
    File    = ProjectionFactory.cpp
    Line    = 1119
  End_Group

  Group = Error
    Program = maptrim
    Class   = "I/O ERROR"
    Code    = 4
    Message = "Unable to initialize Projection information from group
               [Mapping]"
    File    = ProjectionFactory.cpp
    Line    = 93
  End_Group

  Group = Error
    Program = maptrim
    Code    = 1
    Message = "Projection failed.  Invalid label group [Mapping]"
    File    = TProjection.cpp
    Line    = 242
  End_Group

  Group = Error
    Program = maptrim
    Code    = 1
    Message = "Projection failed. [MinimumLongitude,MaximumLongitude] of
               [359.99806836665,0.0019316333539336] are not properly ordered"
    File    = TProjection.cpp
    Line    = 205
  End_Group

Note that the temporary file produced by this run (TEMPORARYcroppedJ76294.cub) does indeed have the min/max longitude's swapped. The input mosaic mapping information is fine. I am maintaining the longitudes for my input mosaic and trimming away latitudes =/-57 poleward.

How to reproduce
See data under /work/users/lweller/Isis3Tests/MapTrim/

maptrim from=Europa_GalileoSSI_Voyager_2020_global_mosaic_500m_PosWest_Equi_unstretched.cub to=Both.cub mode=both minlat=-57 maxlat=57 minlon=0 maxlon=360

The input mosaic covers latitudes -90 to 90 and longitudes 0 to 360.
The temporary file is the problem.

I can run the program setting mode=trim successfully, but then there are NULLs from +/-57 to the poles which is not desired. I worked around this by running map2map, but the trimming and cropping via maptrim is the better way to do what I want.

Additional context

There is the possibility that this related to post #2430. Not necessarily the same problem, but the developer notes (quite a bit too!) mention TProjection.cpp and ProjectionFactory.cpp repeatedly, so it might be worth at least being aware of some things noted at the time. I would just search on that in the post to see if anything interesting pops up. My original problem is too different from this issue to bother reading other aspects of the post.

Perhaps useful to know and part of the problem - my mosaic has LongitudeDomain=360 and LongitudeDirection=PositiveWest. Just wondering if the latter is not being taken into consideration when the temporary file is being created.

@lwellerastro lwellerastro added the Products Issues which are impacting the products group label Sep 30, 2021
@AustinSanders AustinSanders added this to the 6.2.0 milestone Oct 20, 2021
@amystamile-usgs amystamile-usgs self-assigned this Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Products Issues which are impacting the products group
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants