July 21Jul 21 Hello all, I am working with LROC NAC EDR/CDR images and processing them using GDAL (not ISIS). I use LROC QuickMap only as a visual reference to verify the orientation of the images; I understand that the NAC is a pushbroom (line-scan) camera and that the EDR/CDR products are stored in camera space, while QuickMap uses SPICE kernels to generate map-projected images.I observed that some NAC images require only a horizontal flip, while others require a 180° rotation. I would like to understand what determines the correct orientation.More interestingly, I found that even images acquired during the same descending pass (same flight direction) can have different orientations.My questions are:1.Which metadata or parameters(ie. Orbit number, North Azimuth, season) determine whether a raw NAC image requires a horizontal flip, vertical flip, or 180° rotation?2.Can this be determined directly from the PDS label/metadata of NAC product without using ISIS?3.Is there a recommended GDAL-based workflow to automatically orient raw NAC images correctly?Any guidance would be greatly appreciated. Thank you.
July 21Jul 21 Hi Rathinam,The LROC NAC flip or rotate has been discussed in the forum thread: https://geoweb.rsl.wustl.edu/community/index.php?/topic/858-why-is-there-a-flip-in-lroc-images/#comment-1781. (1) As Nick Estes from the LROC team explained, two independent spacecraft-geometry parameters combine to set the raw-image orientation: flight direction along the orbit (ascending vs. descending pass), which determines whether Line 1 corresponds to the north or south end of the imaged swath, and the spacecraft yaw state, which determines whether Sample 1 corresponds to the west or east side of the ground track. (2) The product labels don’t contain enough information to determine the flip/rotation on their own, without ISIS. You can refer to the index/cumindex tables to find the matching row and pull the corner coordinates for orientation purposes. However, as Nick mentioned, these corner coordinates are calculated on a sphere. Actual sample coordinates will vary based on terrain. They are fine for gross orientation/visual checks, but not for precise pixel-level geolocation. For that, you'd still want ISIS + SPICE. (3) You can use GDAL with the example commands below without worrying about “flip or rotate". But as noted in (2), this is a lightweight "get the orientation and rough footprint right" solution for people who don't want to install ISIS. It's good for visual/orientation purposes, but not rigorous, terrain-corrected geolocation.gdal_translate -a_srs IAU_MOON -gcp 0 0 <UL_lon> <UL_lat> -gcp <width> 0 <UR_lon> <UR_lat> -gcp 0 <height> <LL_lon> <LL_lat> -gcp <width> <height> <LR_lon> <LR_lat> raw.img raw_gcp.tif gdalwarp -r bilinear -t_srs IAU_MOON raw_gcp.tif raw_warped.tifI might be wrong or missing some important information here. Feel free to contact Nick Estes from the LROC team, nestes@intuitivemachines.com, for more details.Thanks,June
Create an account or sign in to comment