[GRASS-SVN] r68440 - grass/branches/releasebranch_7_0/scripts/r.import

svn_grass at osgeo.org svn_grass at osgeo.org
Mon May 16 02:06:23 PDT 2016

Author: neteler
Date: 2016-05-16 02:06:23 -0700 (Mon, 16 May 2016)
New Revision: 68440

r.import manual: fix WorldClim import example

Modified: grass/branches/releasebranch_7_0/scripts/r.import/r.import.html
--- grass/branches/releasebranch_7_0/scripts/r.import/r.import.html	2016-05-16 09:05:55 UTC (rev 68439)
+++ grass/branches/releasebranch_7_0/scripts/r.import/r.import.html	2016-05-16 09:06:23 UTC (rev 68440)
@@ -86,24 +86,28 @@
 <h3>Import of WorldClim data</h3>
-Import of a subset from <a href="">Bioclim data set</a>, to be reprojected
-to current location projection (North Carolina sample dataset). While normally
-the full raster map is imported, we spatially subset using the <em>extent</em>
+Import of a subset from WorldClim <a href="http://worldclim.org/current">Bioclim data set</a>,
+to be reprojected to current location projection (North Carolina sample dataset).
+Different resolutions are available, in this example we use the 2.5 arc-minutes
+resolution data. During import, we spatially subset the world data to the 
+North Carolina region using the <em>extent</em> parameter:
 <div class="code"><pre>
-# download selected Bioclim data
+# download selected Bioclim data (2.5 arc-minutes resolution)
 wget http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_2-5m_bil.zip
 # extract BIO1 from package:
 unzip bio_2-5m_bil.zip bio1.bil bio1.hdr
+# prior to import, fix broken WorldClim extent using GDAL tool
+gdal_translate -a_ullr -180 90 180 -60 bio1.bil bio1_fixed.tif
 # set computational region to North Carolina, 4000 m target pixel resolution
 g.region -d res=4000 -ap
 # subset to current region and reproject on the fly to current location projection,
 # using -n since whole-world map is imported:
-r.import input=bio1.bil output=bioclim01 resample=bilinear \
+r.import input=bio1_fixed.tif output=bioclim01 resample=bilinear \
          extent=region resolution=region -n
 r.info bioclim01

More information about the grass-commit mailing list