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.tif
I 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
By
June Wang ·