View Full Version : Lunar DEMs

09-07-2011, 10:36 AM
In a discussion with a fellow on the Wilbur mailing list, he pointed out a set of new Lunar DEMs that I had not seen before. http://imbrium.mit.edu/DATA/LOLA_GDR/CYLINDRICAL/IMG/ has files dated from August of this year in various resolutions. The pretty DEMs are the LDEM* files, not the LDEC* files.

He wanted to open these files in Wilbur, so I explained the process for opening the files directly instead of using a PNG (it seems Wilbur doesn't like the large 16-bit PNGs he was using). The process is:

Download the LDEM_.IMG file and its associated LDEM_.LBL file. We'll use the LDEM_16.IMG file because it's a reasonable size and not overly large. Don't want to swamp the servers, now do we?

Open up the .LBL file in something like Notepad and find the lines that read LINES and LINE_SAMPLES. These are the height and width of the image, respectively. The SAMPLE_TYPE and SAMPLE_BITS will tell you the endianness and size of each sample. You may also wish to locate the MAXIMUM_LATITUDE, MINIMUM_LATITUDE, WESTERNMOST_LONGITUDE, and EASTERNMOST_LONGITUDE entries as these represent the extents of the map. The LDEM_16 file is a whole-sphere file, but the higher-resolution data takes several files to cover the globe.

Use File>>Open and select "Binary Surface (*.bin)" as the type, enter "*.img" in the file name part, and pick your desired IMG file.


In the Import File dialog, enter the LINES value in both places that read "Width" and the LINE_SAMPLES value in both places that read "Height". Set the type to 2 byte if SAMPLE_BITS is 16, 1 byte is SAMPLE_BITS is 8, or 4 byte is SAMPLE_BITS is 32. Check the "LSB First (Intel)" box if SAMPLE_TYPE reads "LSB_INTEGER". Set Header Length, X Start, and Y Start to 0. The Map Edges Top, Left, Right, and Bottom should correspond to the .LBL files MAXIMUM_LATITUDE, MINIMUM_LATITUDE, WESTERNMOST_LONGITUDE, and EASTERNMOST_LONGITUDE, respectively.


Then click OK and the full-resolution data should appear in Wilbur, ready for whatever you'd like to do to it.


09-07-2011, 10:42 AM
that's nifty, opens up all sorts of possibilities :)