Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9127099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:12:16+00:00 2026-06-17T07:12:16+00:00

I am tring to read the following GIS datafile into R: Some Data Specifications

  • 0

I am tring to read the following GIS datafile into R:

Some Data Specifications are here:

Image Type: Generic Flat Binary, Byte Interleave By Line (BIL)

Projection: Interrupted Goode Homolosine

I tried to use the R package “raster”, but failed.

library(raster)
r <- raster(file.choose())

Error in .local(.Object, ...) : 
  `C:\global_forest_cover.img' not recognised as a supported file format.

Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer",  : 
  Cannot create a RasterLayer object from this file.

So, how should I load this GIS data into R? Also, convert the projection “Interrupted Goode Homolosine” to LongLat ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:12:18+00:00Added an answer on June 17, 2026 at 7:12 am

    Create a file called global_forest_cover.hdr and stick the header info from http://edc2.usgs.gov/glcc/fao/header_file.php into it:

    BYTEORDER   M
    LAYOUT  BIL
    NROWS   15059
    NCOLS   36543
    NBANDS  1
    NBITS   8
    BANDROWBYTES    36543
    TOTALROWBYTES       36543
    ULXMAP  -17359000
    ULYMAP  8673000
    XDIM    1000
    YDIM    1000
    

    then read the .img file:

    > forest = raster("global_forest_cover.img")
    Geospatial Data Abstraction Library extensions to R successfully loaded
    Loaded GDAL runtime: GDAL 1.6.3, released 2009/11/19
    Path to GDAL shared files: /usr/share/gdal16
    Loaded PROJ.4 runtime: Rel. 4.7.1, 23 September 2009, [PJ_VERSION: 470]
    Path to PROJ.4 shared files: (autodetected)
    > forest
    class       : RasterLayer 
    dimensions  : 15059, 36543, 550301037  (nrow, ncol, ncell)
    resolution  : 1000, 1000  (x, y)
    extent      : -17359500, 19183500, -6385500, 8673500  (xmin, xmax, ymin, ymax)
    coord. ref. : NA 
    data source : /home/nobackup/rowlings/Downloads/global_forest_cover.img 
    names       : global_forest_cover 
    values      : 0, 255  (min, max)
    

    GDAL sees the .hdr file and uses that to work out the structure of the 15059*36543 bytes in the .img file.

    However it does not have the projection information. But even if it did, warping an IGH projection back to lat-long might be somewhat problematic. If you look at other IGH projected maps you’ll see they involve tearing down the oceans to help flatten the globe. To get back to lat-long you need to reverse all these flattenings and tears. It should be possible, and I think the latest PROJ4 libraries have support for IGH projections, but maybe only in one direction. BUT unless you use exactly the same code that was used to create the data you have but in reverse you might not get the right answer out.

    Given that the .hdr file wasn’t included in the zip, and that the projection isn’t really a good one for further analysis, I’d go looking for another source of the data. This data is clearly only meant for display purposes. And its also poor because it doesn’t seem to have missing data values where the IGH projection has split the earth – compare the pictures on the http://edc2.usgs.gov/glcc/fao/index.php page with other IGH projections http://en.wikipedia.org/wiki/Goode_homolosine_projection

    I thought the data here might be more appropriate: http://www.fao.org/forestry/32203/en/

    > r=raster("./fceurope/europe/w001001.adf")
    > r
    class       : RasterLayer 
    dimensions  : 20000, 40000, 8e+08  (nrow, ncol, ncell)
    resolution  : 0.009, 0.009  (x, y)
    extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
    coord. ref. : +proj=longlat +ellps=clrk66 +no_defs 
    data source : /home/nobackup/rowlings/Downloads/fceurope/europe/w001001.adf 
    names       : w001001 
    values      : 1, 6  (min, max)
    Raster Attribute Table
         fields : ID   COUNT
            min :  1  129626
            max :  6 4963775
    

    But I’m slightly confused between the ‘europe’ in the name and the global extent. Its also a very very large raster. Ah, its got Europe in the middle of nowhere. Note the projection is now lat-long. You may want to thin the grids out before putting them together to create a global raster from all the files given there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use the following code of java to read image data on
I am trying to read some data from a network socket using the following
I am trying to read a binary file with the following binary configuration 00
I'm trying to read a binary file that is in the following format: number
Trying to read into an object the following XML file (can be changed) into
I recently ran into a problem caused by using fstream::eof(). I read the following
I'm trying to read Stanford ecorner XML: open(http://ecorner.stanford.edu/RecentlyAdded.xml) but am running into the following
I'm trying to read my stock portfolio into a script. The following works with
I am trying to read(append incoming data into a local String) from a PrintStram
I'm trying to read the following binary (01100001) from a file and convert it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.