Jump to content
PDS Geosciences Node Community
Jairo Amaral

Opening file formats

Recommended Posts

Hi, I downloaded the image files I wanted, but I'm having trouble opening them. The IMG files are supposed to be mounted, but they are always said to be "damaged". Is there a section describing how to deal with all the formats found in ODE?

Thank you.

Share this post


Link to post
Share on other sites

Hi Jairo,

Thank you for emailing us with your question.

You are receiving the “corrupted file” response because your computer does not have a native application for opening the PDS IMG files. Also, sometimes a cd/dvd image file is called an IMG, so an application used for mounting disk images tries to open the file in a different expected format.

A typical PDS image is stored as a simple binary array. It is described by a PDS label (a set of ASCII-text keyword=value statements), which can be either attached or detached. An attached label is embedded at the beginning of the image file; a detached label is in a separate file with the same name, extension LBL. The label tells you everything you need to know to read the image -- the number of lines, number of pixels (samples) per line, the size and data type of a sample, and map projection information if the image is a map. (PDS deliberately does not rely on any commercial or proprietary formats to archive image data, in order to ensure the long-term viability of the data.)

Typically IMG files are opened with programs including ENVI, NASA View, or GDAL. ArcMap might support IMG files, but I don’t remember. The IMG files can also be parsed and manipulated with code (Python, IDL, Matlab, C++, C#).

In the future, I hope to add functionality into ODE to allow a user to request the files in various formats, but it is not on the near list. In the meantime, GDAL is a standard application for changing formats.
http://www.gdal.org/ (general information and the link to download)
http://www.gdal.org/gdal_translate.html   (basic GDAL commands)

Here is an example commands that can be used to convert an img to tif:
Gdal_translate -of GTiff D:\test\data\MGN\fmap\fl13s309.img D:\test\data\MGN\fmap\fl13s309.tif

NASA View is better for just viewing images:
https://pds.nasa.gov/tools/about/pds3-tools/nasa-view.shtml

Let us know if you have any further questions.
Thanks,
Dan

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...