Jump to content
View in the app

A better way to browse. Learn more.

PDS Geosciences Node Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi!  I am attempting to display and plot information contained within .img files from the MOLA MEGDRs in an sdl/opengl application of my own design.  I'm getting curious results . . .

 

I'm able to distinguish some obvious land forms, the Tharsis bulge, hellas, valles marineris, etc so I know I'm mapping x, y coordinates correctly against long/lat.  However, when I attempt to plot topographical data, (the actual values in the .img file at a given location) those features are mired with noise.  As it stands, I'm able to switch between the various megt, mega, megr, and megc .img files, convert their values to color information, but they all display noise with varying amounts of landforms barely distinguishable.  I'm wondering if I'm suppose to be combining the data from these separate .img files in some way to extract a desired gradient of topographical data, or if I'm suppose to be applying some moduli or some other mathematical ritual?  I'm fairly sure my IO is encoding properly.  The .lbl files were helpful to a point, but haven't help me solve this!  Please help!

 

You do not need to combine the files. First, be sure you understand the difference between megt (topography), mega (areoid), megr (planetary radius) and megc (counts). The one you probably want is megt, topography; the others will not look like anything interesting. The label tells you the data are stored as 16-bit most-significant-byte-first (big-endian) integers. They are signed integers, by the way. Hmm, if you were treating them as unsigned, that might account for the noise you're seeing. Another idea: if you're on a Windows machine you're probably reading them as least-sig-byte-first integers, so you need to swap the bytes. You don't need to apply any math. The values are already in meters, ranging from -8208 to 21249 for the whole data set (it will be slightly different for individual tiles).

  • Author

It works now!  I was indeed encoding as unsigned.  I feel so silly now . . . Thanks a ton!  you're the best!

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.