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

map2map does not downsample correctly. #631

Closed
rbeyer opened this issue Dec 5, 2018 · 8 comments · Fixed by #4379
Closed

map2map does not downsample correctly. #631

rbeyer opened this issue Dec 5, 2018 · 8 comments · Fixed by #4379
Assignees
Labels
bug Something isn't working Missions Issues which are a priority for missions

Comments

@rbeyer
Copy link
Contributor

rbeyer commented Dec 5, 2018

I have a 4-band ISIS cube in a PointPerspective projection (at 10 km/pixel).

If I map2map it to an Orthographic projection, map2map works fine, but if I try degrading the resolution (via setting the PixelResolution in the map file, and doing pixres= map or matchmap=true, or setting it manually via pixres= mpp and resolution= ), a little bit of downsampling works as expected, but somewhere between 19 and 19.5 km/pixel (not sure of just shy of 2x degradation is relevant) the resulting cube is just full of NULLs in all of its bands.

Changing the INTERP method makes no difference. This bug is in ISIS 3.5.2 and 3.6.0.

@jlaura
Copy link
Collaborator

jlaura commented Dec 10, 2018

@scsides @USGSsakins Can you all verify this and get a response on here even just saying that we are able to reproduce? Then we can slot for a support fix at an appropriate time.

@scsides
Copy link
Contributor

scsides commented Dec 12, 2018

I tried different approaches to reproduce what you are seeing, but was not successful. Can you make the data, map files, and command line available to us?

@rbeyer
Copy link
Contributor Author

rbeyer commented Dec 12, 2018

Sure.

PointPerspective projected cube: http://byss.arc.nasa.gov/rbeyer/mvic_0299104952_0x545_sci_ch.cub
Orthographic Map file: http://byss.arc.nasa.gov/rbeyer/charon_0299105209.map

Example command is: map2map fr=mvic_0299104952_0x545_sci_ch.cub to=mvic_0299104952_0x545_sci_ch_map2map.cub map=charon_0299105209.map pixres=map

@scsides
Copy link
Contributor

scsides commented Dec 12, 2018

I can reproduce this using those files.

@rbeyer
Copy link
Contributor Author

rbeyer commented Dec 12, 2018

Whoa, so its something specific about these files. That's a little frightening.

@jessemapel jessemapel added the bug Something isn't working label Dec 21, 2018
@ascbot
Copy link
Contributor

ascbot commented Sep 1, 2020

I am a bot that cleans up old issues that do not have activity.

Happy Birthday to this issue! 🎂

Unfortunately, this issue has not received much attention in the last 12 months. Therefore, I am going to close it. Please feel free to reopen this issue or open a new issue sometime in the future. If this issue is a bug report, please check that the issue still exists in our newest version before reopening.

@ascbot ascbot added the automatically_closed Issue closed by a bot due to inactivity label Sep 1, 2020
@ascbot ascbot closed this as completed Sep 1, 2020
@rbeyer
Copy link
Contributor Author

rbeyer commented Oct 14, 2020

Whoops, while there has been no activity, this remains an Issue.

I just used those files, and the commands included above with ISIS 4.2.0, and have the same behavior: the output of map2map is a multi-band cube with nothing but NULL values.

@rbeyer rbeyer reopened this Oct 14, 2020
@rbeyer rbeyer removed the automatically_closed Issue closed by a bot due to inactivity label Oct 14, 2020
@jlaura jlaura added the Missions Issues which are a priority for missions label Dec 3, 2020
@jessemapel jessemapel modified the milestone: 4.3.1 Dec 14, 2020
@Kelvinrr Kelvinrr self-assigned this Mar 22, 2021
@Kelvinrr
Copy link
Collaborator

@scsides @rbeyer The issue seems to be that when the image is too small it fails to use the slower interpolation method, and the faster interpolation fails when there are far more quads than pixels and also have null data around the edges. Putting in a simple check comparing the sizes seems to have fixed it.

Pumped it up to 100 KM per pixel and it seems to be okay. PR Incoming.

Screen Shot 2021-03-24 at 10 18 12 AM

Kelvinrr pushed a commit that referenced this issue Mar 25, 2021
* Added check to make small images use slowgeom instead

* comment

* Changelog add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Missions Issues which are a priority for missions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants