error with mapproject tool when setting the extension of output files as .cub

31 views
Skip to first unread message

Gianluca Chiarolanza

unread,
Mar 4, 2024, 5:27:21 AMMar 4
to Ames Stereo Pipeline Support
Hi everyone,

I recently updated ASP to 3.3.0 (via conda) and 3.4.0 ( via precompiled binaries).
I attempted to mapproject a Galileo .cub image to a DEM using the mapproject tool and setting the extension of the output file as .cub, to keep it readable by ISIS. Unfortunately, map-projection keeps failing, regardless of which of the two aforementioned versions of ASP I use. The message I get is the following:

--> Setting number of processing threads to: 4
The output file is a camera. Check your inputs.
Traceback (most recent call last):
  File "/home/gianluca/Programmes/StereoPipeline-3.4.0-alpha-2024-03-01-x86_64-Linux/libexec/mapproject", line 564, in <module>
    sys.exit(main(sys.argv[1:]))
             ^^^^^^^^^^^^^^^^^^
  File "/home/gianluca/Programmes/StereoPipeline-3.4.0-alpha-2024-03-01-x86_64-Linux/libexec/mapproject", line 319, in main
    settings = asp_system_utils.run_and_parse_output(progName, args + ['--parse-options'],
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gianluca/Programmes/StereoPipeline-3.4.0-alpha-2024-03-01-x86_64-Linux/libexec/asp_system_utils.py", line 298, in run_and_parse_output
    raise Exception('Failed executing: ' + " ".join(call))
Exception: Failed executing: /home/gianluca/Programmes/StereoPipeline-3.4.0-alpha-2024-03-01-x86_64-Linux/libexec/mapproject_single -t isis --tr 221.99 /home/gianluca/DEM-mosaic-A_02-01-04-03-05_tr-lr_PBL-15_projwin-hiresmos_blur-2.tif /home/gianluca/4413r-4414r_lev2.cub /home/gianluca/4413r-4414r_proj2dem_tr-221.99.cub --parse-options


Instead, when using ASP 3.0.0, I can successfully run mapproject setting the extension of the output file as .cub.

I am using same input files (same lev-1 cube and DEM) everytime I run maproject using different ASP versions, so I suspect there might be an issue with the tool since the latest updates. I haven't checked if the error occurs with ASP versions 3.2.0 and 3.1.0 too.

Could you please verify if there is effectively an issue with the mapproject tool since the latest ASP versions?

Thank you.

Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]

unread,
Mar 4, 2024, 12:29:07 PMMar 4
to Gianluca Chiarolanza, Ames Stereo Pipeline Support
ASP cannot create .cub files using mapproject. I am not sure what it was doing before, but likely it was not the right thing.

You can create a .cub file from a .tif file later with gdal_translate. Here's a cheat sheet I got from Trent Hare:

For any GDAL run, you have to list the output format explicitly. GDAL doesn't care about extension

gdal_translate -of ISIS3 filled_dem.tif filled_dem.cub

bonus tips:
There are many command-line options for a ISIS3 write you can see them here:
gdal_translate --format ISIS3

for example to force a more "standard" cube, you might want to (-co means "conversion option").
gdal_translate -of ISIS3 -co FORCE_360=YES -co TARGET_NAME=Mars filled_dem.tif filled_dem.cub

Want to keep it as GeoTIFF and make it ISIS compatible? Note the use of the *.lbl (which will be used in ISIS). The filename needs to be different, since there will be a create geotiff "filled_dem_new.tif" once run. GDAL will check for the output name also.
gdal_translate -of ISIS3 -co TARGET_NAME=Mars -co DATA_LOCATION=GEOTIFF filled_dem.tif filled_dem_new.lbl
--now use the detached ISIS3 label in ISIS (which internally points into the new GeoTIFF for pixels


From: ames-stereo-pi...@googlegroups.com <ames-stereo-pi...@googlegroups.com> on behalf of Gianluca Chiarolanza <gianluca.ch...@gmail.com>
Sent: Monday, March 4, 2024 2:27 AM
To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: [EXTERNAL] [BULK] error with mapproject tool when setting the extension of output files as .cub
 
CAUTION: This email originated from outside of NASA.  Please take care when clicking links or opening attachments.  Use the "Report Message" button to report suspicious messages to the NASA SOC.



--
You received this message because you are subscribed to the Google Groups "Ames Stereo Pipeline Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ames-stereo-pipeline...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/a5a0d0bf-d23a-426e-af5b-5b6690e86332n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages