<div dir="ltr">






<p>
</p>I used QGIS with the gdalwarp tool to reproject the layer from  Lambert Azimuthal Equal Area Projection (one of the two possible projection you can download) to latlon WGS84 (EPGS 4326), using the steps given below. This was the Africa Land Cover Characteristics Data Base Version 2.0, you'll need to adapt the hdr file in step 2 for the south America layer and similar change the proj4 string in step 3 and 4.<br>
<div><ol start="1" type="1"><li>The original layer was downloaded in Lambert Azimuthal Equal Area Projection (laea) and saved as afslcr2_0l.img.</li><li>The header file <a title="./afslcr2_0l.hdr" class="">afslcr2_0l.hdr</a> was created (see attached), based on the information provided on <a href="http://edc2.usgs.gov/glcc/afdoc2_0.php#lamb">http://edc2.usgs.gov/glcc/afdoc2_0.php#lamb</a>. I placed that file in the same folder as the img file. You can now open the file in QGIS</li>
<li>Create a custom CRS (under menu 'settings') based on the proj4 definition: +proj=laea +lat_0=5 +lon_0=20 +x_0=0 +y_0=0 +no_defs +a=6370997 +rf=298.257223563 +towgs84=0.000,0.000,0.000 +to_meter=1 (for the south america layer, you will need to set lat_0=15 and lon_0=60 instead I think). <br>
</li><li>If you want to get the layer in e.g., latlon rather then laea, go to step 5. If you want to have the layer in the same projection as provided, go to step 6<br></li><li>Used the gdalwarp tool (under raster menu) to reproject the layer in latlon EPGS 4326 as geotif layer. Use the custom CRS you just created to define the layers CRS. Use EPGS 4326 (or any other CRS definition) for the output layer. <br>
</li><li>Use the assign projection tool (also under raster menu) and use the custom CRS you created in step 3 to set the desired CRS</li></ol><p>Note that the tools in step 5 and 6 are both front-ends for gdalwarp, which you can also use directly on the command line. E.g., <br>
</p><p>step 5 corresponds (in my case) to: gdalwarp -s_srs "+proj=laea +lat_0=5 +lon_0=20 +x_0=0 +y_0=0 +no_defs 
+a=6370997 +rf=298.257223563 +towgs84=0.000,0.000,0.000 +to_meter=1" 
-t_srs EPSG:4326 -of GTiff /home/afslcr2_0l.img /home/Afslcr2.tif</p><p style="margin:0px;text-indent:0px">Step 6 corresponds (again, in my case) to:gdalwarp -t_srs "+proj=laea +lat_0=5 +lon_0=20 +x_0=0 +y_0=0 +no_defs +a=6370997 +rf=298.257223563 +towgs84=0.000,0.000,0.000 +to_meter=1" /home/paulo/Desktop/afslcr2_0l.img /home/paulo/Desktop/afslcr2_0l.tif</p>
<p>The resulting geotif files can be imported in GRASS in the appropriate location. If you don't have a location in the corresponding projection, you should be able to use the just produced geotif as source for the projection information.</p>
<p>By the way, I did not import it directly in GRASS because for some reason I could not create a new location based on the proj4 string as given in step 3 above. I got some error messages, which I can't really remember, and as the steps above are easy anyway I haven't really tried to figure out what the problem was.<br>
</p></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 14, 2013 at 4:10 PM, Darren Slevin <span dir="ltr"><<a href="mailto:d.slevin@ed.ac.uk" target="_blank">d.slevin@ed.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
Im trying to import the USGS Global Land Cover Characterization dataset (<a href="http://edc2.usgs.gov/glcc/globe_int.php" target="_blank">http://edc2.usgs.gov/glcc/<u></u>globe_int.php</a>). Ive tried to create a header as described below but am having no luck. Im not too sure how to append the header information to the img file. I was wondering if anyone had already done this?<br>

Thanks,<br>
Darren<br>
<br>
2013/2/14 Michael Spencer <michael_spencer at <a href="http://live.co.uk" target="_blank">live.co.uk</a>>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Has anyone used the USGS Global Land Cover Characterization data available<br>
here?<br>
<br>
<a href="http://edc2.usgs.gov/glcc/globe_int.php" target="_blank">http://edc2.usgs.gov/glcc/<u></u>globe_int.php</a><br>
<br>
Indication is that the file format is Erdas Imagine .img, but GRASS is<br>
coming back with a file type unknown error. Help/readme file suggests data<br>
is byte type, which leaves me none the wiser!<br>
<br>
Happy for any pointers.<br>
<br>
Ta,<br>
Michael<br>
</blockquote>
<br>
Hi Michael,<br>
<br>
Some time ago I had the same problem when using R for reading the<br>
files. From the USGS I was told that the problem is the lack of header<br>
(as mentioned in the metadata that I did not read :( )<br>
<br>
You need to make a projection header file as per the FAQ at:<br>
<a href="http://landcover.usgs.gov/faq.php#three" target="_blank">http://landcover.usgs.gov/faq.<u></u>php#three</a><br>
<br>
The details of the LAEA projection to generate the header file can be found on:<br>
<a href="http://edc2.usgs.gov/glcc/sadoc2_0.php" target="_blank">http://edc2.usgs.gov/glcc/<u></u>sadoc2_0.php</a><br>
<br>
IHTH,<br>
<br>
Mauricio<br>
<br>
--<br>
Darren Slevin<br>
Postgraduate Research Student<br>
The University of Edinburgh<br>
Grant Institute<br>
The King's Buildings<br>
West Mains Road<br>
Edinburgh<br>
EH9 3JW<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
The University of Edinburgh is a charitable body, registered in<br>
Scotland, with registration number SC005336.<br>
<br>
<br>
______________________________<u></u>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/grass-user</a><br>
</font></span></blockquote></div><br></div>