Results 1 to 2 of 2

Thread: Lunar DEMs

  1. #1
    Software Dev/Rep Guild Sponsor waldronate's Avatar
    Join Date
    Mar 2007
    The High Desert

    Default Lunar DEMs

    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. 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.

    Click image for larger version. 

Name:	Open.png 
Views:	60 
Size:	11.9 KB 
ID:	38386

    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.

    Click image for larger version. 

Name:	Import.png 
Views:	58 
Size:	5.9 KB 
ID:	38387

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

    Click image for larger version. 

Name:	Opened.jpg 
Views:	74 
Size:	81.4 KB 
ID:	38388
    Last edited by waldronate; 09-08-2011 at 11:05 AM.

  2. #2
    Professional Artist Facebook Connected Coyotemax's Avatar
    Join Date
    Jul 2009


    that's nifty, opens up all sorts of possibilities

    My finished maps
    "...sometimes the most efficient way to make something look drawn by hand is to simply draw it by hand..."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts