[GRASS-SVN] r41127 - grass/branches/develbranch_6/raster/r.proj.seg

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 20 02:48:54 EST 2010


Author: hamish
Date: 2010-02-20 02:48:54 -0500 (Sat, 20 Feb 2010)
New Revision: 41127

Modified:
   grass/branches/develbranch_6/raster/r.proj.seg/description.html
Log:
copy examples from trunk, mention m.proj

Modified: grass/branches/develbranch_6/raster/r.proj.seg/description.html
===================================================================
--- grass/branches/develbranch_6/raster/r.proj.seg/description.html	2010-02-20 07:41:41 UTC (rev 41126)
+++ grass/branches/develbranch_6/raster/r.proj.seg/description.html	2010-02-20 07:48:54 UTC (rev 41127)
@@ -34,7 +34,7 @@
 of projecting coordinates from a geographic reference frame
 (latitude-longitude) into a projected cartesian reference frame (eg metres)
 is governed by these equations.  Inverse projections can also be achieved. 
-The public-domain Unix software package <i>PROJ</i> [1] has been designed to
+The public-domain Unix software package <i>PROJ.4</i> [1] has been designed to
 perform these transformations, and the user's manual contains a detailed
 description of over 100 useful projections.  This also includes a
 programmers library of the projection methods to support other software
@@ -69,7 +69,9 @@
 <i><a href="http://proj.maptools.org/">cs2cs</a></i> [1]. This is an easy
 method for converting an ASCII file containing a list of coordinate points,
 since there is no topology to be preserved and <i>cs2cs</i> can be used to
-process simple lists using a one-line command.
+process simple lists using a one-line command. The <em>m.proj</em> module
+provides a handy front end to <tt>cs2cs</tt>.
+
 <p>
 The format of files containing vector maps with <b>lines</b> and <b>arcs</b> is
 generally more complex, as parts of the data stored in the files will describe
@@ -171,6 +173,91 @@
 may be odd with trimming.
 
 
+<h2>EXAMPLES</h2>
+
+<h4>Inline method</h4>
+With GRASS running in the destination location use the <b>-g</b> flag to
+show the input map's bounds once reprojected into the current map projection,
+then use that to set the region bounds before performing the reprojection:
+
+<div class="code"><pre>
+# calculate where output map will be
+GRASS> r.proj input=elevation location=ll_wgs84 mapset=user1 -p
+Source cols: 8162
+Source rows: 12277
+Local north: -4265502.30382993
+Local south: -4473453.15255565
+Local west: 14271663.19157564
+Local east: 14409956.2693866
+
+# same calculation, but in a form which can be cut and pasted into a g.region call
+GRASS> r.proj input=elevation location=ll_wgs84 mapset=user1 -g
+n=-4265502.30382993 s=-4473453.15255565 w=14271663.19157564 e=14409956.2693866 rows=12277 col
+s=8162
+
+GRASS> g.region n=-4265502.30382993 s=-4473453.15255565 \
+  w=14271663.19157564 e=14409956.2693866 rows=12277 cols=8162 -p
+projection: 99 (Mercator)
+zone:       0
+datum:      wgs84
+ellipsoid:  wgs84
+north:      -4265502.30382993
+south:      -4473453.15255565
+west:       14271663.19157564
+east:       14409956.2693866
+nsres:      16.93824621
+ewres:      16.94352828
+rows:       12277
+cols:       8162
+cells:      100204874
+
+# round resolution to something cleaner
+GRASS> g.region res=17 -a -p
+projection: 99 (Mercator)
+zone:       0
+datum:      wgs84
+ellipsoid:  wgs84
+north:      -4265487
+south:      -4473465
+west:       14271653
+east:       14409965
+nsres:      17
+ewres:      17
+rows:       12234
+cols:       8136
+cells:      99535824
+
+# finally, perform the reprojection
+GRASS> r.proj input=elevation location=ll_wgs84 mapset=user1 memory=800
+</pre></div>
+
+
+<h4>v.in.region method</h4>
+<div class="code"><pre>
+
+# In the source location, use v.in.region to generate a bounding box around the
+# region of interest:
+
+v.in.region output=bounds type=area
+
+# Now switch to the target location and import the vector bounding box 
+# (you can run v.proj -l to get a list of vector maps in the source location):
+
+v.proj input=bounds location=source_location_name output=bounds_reprojected
+
+# Set the region in the target location with that of the newly-imported vector
+# bounds map, and align the resolution to the desired cell resolution of the 
+# final, reprojected raster map:
+
+g.region vect=bounds_reprojected res=5 -a
+
+# Now reproject the raster into the target location
+
+r.proj input=elevation.dem output=elevation.dem.reproj \
+location=source_location_name mapset=PERMANENT res=5 method=cubic
+</pre></div>
+
+
 <h2>REFERENCES</h2>
 
 [1] Evenden, G.I.  (1990) <a href="http://proj.osgeo.org">Cartographic projection procedures for
@@ -190,6 +277,7 @@
 <li> <a href="http://www.crs-geo.eu">Information and Service System for European Coordinate Reference Systems - CRS</a>
 </ul>
 
+
 <h2>SEE ALSO</h2>
 
 <em>
@@ -197,6 +285,7 @@
 <a href="g.proj.html">g.proj</a>,
 <a href="g.setproj.html">g.setproj</a>,
 <a href="i.rectify.html">i.rectify</a>,
+<a href="m.proj.html">m.proj</a>,
 <a href="r.support.html">r.support</a>,
 <a href="r.stats.html">r.stats</a>,
 <a href="v.proj.html">v.proj</a>,



More information about the grass-commit mailing list