I could not open/read the following .img file.

The document below says it is a raster file.


I tried to open it using many ways such as Q-Gis software, and Gdal translate, but could not.

Gdal translate reports error that unrecognized file..

That strange file is here:

http://edcftp.cr.usgs.gov/pub/data/avhrr/mask/wvsdn_mask_world.img.gz (3.54 MB). I extracted it using winrar and the extracted file is 662 MB.I tried to open the extracted one.

Is someone familiar with this file?

  • *.img suggests that it is in ERDAS IMAGINE format.
    – PolyGeo
    Oct 28 '14 at 3:45
  • @PolyGeo gdal translate would have to convert it, right?
    – Roman
    Oct 28 '14 at 3:46
  • This suggests so gdal.org/frmt_hfa.html - but its not an area I claim any skills in so I'll defer to others on this one.
    – PolyGeo
    Oct 28 '14 at 3:48
  • @PolyGeo Since you are an ArcGIS specialist: can that open the file?
    – AndreJ
    Oct 28 '14 at 9:19
  • @AndreJ I just tried using ArcGIS 10.2.2 for Desktop and it gave an error: Invalid raster dataset. Failed to create raster layer.
    – PolyGeo
    Oct 28 '14 at 9:25

GDAL does not recognize the file as ERDAS imagine, as promised by the extension .img. But it looks only at the file extension, and does no further investigation on the content of the file.


Comparing with other data from the site, they seem to provide unformatted raw binary. The mask should be 17347 lines by 40031 samples (columns)

So I created an ESRI hdr file for it with this content:

LAYOUT         BIL
NROWS          17347
NCOLS          40031
NBANDS         1
NBITS          8
ULXMAP         -20015000.
ULYMAP         8673000.
XDIM           1000
YDIM           1000
NODATA         -32768

(actually I took a SRTM file, exported it as hdr and changed the size definitions)

Renamed the .img to .bil, and created a .prj file for the used Goode Homolosine:

PROJCS["Interrupted_Goode_Homolosine",GEOGCS["GCS_Normal Sphere (r=6370997)",DATUM["D_unknown",SPHEROID["sphere",6370997,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Interrupted_Goode_Homolosine"],UNIT["Meter",1]]

And got an image that fits quite good to Natural Earths vector data in green: enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.