map2map error when missing Scale keyword
No negative impact is expected as a result of this solution.
When map2map with matchmap=yes or pixres=map is run with an input map missing the Scale keyword, map2map throws an error:
ERROR PVL Keyword [Scale] does not exist in [Group = Mapping]
Since PixelResolution and Scale are both legitimate measures of resolution on their own, map2map shouldn't throw an error about this. Especially since, if you have exactly the same inputs, and change from pixres=map to pixres=mpp and copy-and-paste the value from the PixelResolution mapping label into map2map, it works fine.
Run: map2map from=output.cub map=outputMap.pvl to=outputOcentric.cub matchmap=yes interp=bilinear
or: map2map from=output.cub map=outputMap.pvl to=outputOcentric.cub pixres=map interp=bilinear
These will both throw errors.
map2map from=output.cub map=outputMap.pvl to=outputOcentric.cub pixres=mpp resolution=1.0 interp=bilinear
This is effectively the same thing, but runs without error.
#7 Updated by David Miller about 3 years ago
Apparent bug identified on map2map.cpp line 121: possible unintentional semicolon removes boolean statement from controlling a scoped statement. Unable to reproduce error from reporter's test area to verify solution. Halting work temporarily. Will resume when reporter can recreate the problem. Will attempt to verify solution when able to recreate problem.
#12 Updated by Kristin Berry about 3 years ago
In the future, before resolving, could you "make install" the application you modified? It makes it a little easier to test, because then you can just setisis /work/projects/isis/latest/m02151 and then run map2map instead of using the full path to your modified application /work/projects/isis/latest/m02151/isis/src/base/apps/map2map/map2map