Hi GRASSers
I 've got two questions (which I hope not to be to silly
)
-1-
Is it possible to use r.mapcalc to calculate the minimum, maximum and /
or the average of raster layers with using UNIX wild cards ("*" in my
case) such as:
r.mapcalc max970124=max(a12*970124*)
to calculate a raster layer called max970124 of the maximum of all
raster layers matching "a12*970124".
-2-
Could anyone give me a pointer to an introduction to MAPGEN, please?
I 've found
User's Manual for MAPGEN (UNIX version): a method of
transforming digital cartographic data to a map,",
G.I. Evenden, J.M. Botbol, USGS Open-File Report
85-706, 58p.
as a reference, but not as a PS (like some other USGS OF Reports...)
Regards,
Stephan
--
------------------------------------------------------------------------
Stephan Eickschen Tel. : +49 (0)251 83-34704
Westfaelische Wilhelms-Universitaet Fax. : +49 (0)251 83-36100
Institute for Geophysics
Research Unit of Physical Glaciology email: eicksch@uni-muenster.de
Corrensstrasse 24
48149 Muenster
Germany
------------------------------------------------------------------------
Try getting out of r.mapcalc and doing this as a shell script.
The syntax will vary.
This syntax works in BASH.
I am writing this off the top of my head, so you may need to play
with it a bit.
=========== start script ====================
bigmap=,
for map in $LOCATION/$MAPSET/a12*970124 ; do
map2=`echo ${map} | sed "s/$LOCATION\/$MAPSET/,/"`
bigmap=`echo ${bigmap}${map2}`
done
map3=`echo ${bigmap} | sed "s/,/ /" `
r.mapcalc max970124=max(${map3})
=========== end script =====================
This script assembles a comma-separated list of maps in ${bigmap},
trims the leading pair of commas from the list, and then runs
r.mapcalc with them.
Good Luck!
Angus Carr.
Hi GRASSers
I 've got two questions (which I hope not to be to silly
)
-1-
Is it possible to use r.mapcalc to calculate the minimum, maximum and /
or the average of raster layers with using UNIX wild cards ("*" in my
case) such as:
r.mapcalc max970124=max(a12*970124*)
to calculate a raster layer called max970124 of the maximum of all
raster layers matching "a12*970124".
On Tue, 21 Oct 1997, Stephan Eickschen wrote:
Hi GRASSers
I 've got two questions (which I hope not to be to silly
)
-1-
Is it possible to use r.mapcalc to calculate the minimum, maximum and /
or the average of raster layers with using UNIX wild cards ("*" in my
case) such as:
r.mapcalc max970124=max(a12*970124*)
to calculate a raster layer called max970124 of the maximum of all
raster layers matching "a12*970124".
No, "*" means "multiply" in r.mapcalc. As far as I know, no wildcards are
supported in r.mapcalc, so you'll have to manually enter all of those map
names. Now, if you're clever, you could write a shell script that _would_
use a wild card to create your r.mapcalc statement and then run it. Don't
forget that there is a limit to the number of files you can have open; it
seems to me that it is something around 27.
-Malcolm Williamson
-2-
Could anyone give me a pointer to an introduction to MAPGEN, please?
I 've found
> User's Manual for MAPGEN (UNIX version): a method of
> transforming digital cartographic data to a map,",
> G.I. Evenden, J.M. Botbol, USGS Open-File Report
> 85-706, 58p.
as a reference, but not as a PS (like some other USGS OF Reports...)
Regards,
Stephan
--
------------------------------------------------------------------------
Stephan Eickschen Tel. : +49 (0)251 83-34704
Westfaelische Wilhelms-Universitaet Fax. : +49 (0)251 83-36100
Institute for Geophysics
Research Unit of Physical Glaciology email: eicksch@uni-muenster.de
Corrensstrasse 24
48149 Muenster
Germany
------------------------------------------------------------------------
Help please,
here is the simple r.mapcalc I'd like to run:
snoele12_37 = 228*exp(1.2,elevation/1000)
It runs, however the 'elevation/1000' doesn't seem to hold a floating
point during the evaluation. Therefore the only values in my map are 228,
274 which equals 228*exp(1.2,1) and 328 which equals 228*exp(1.2,2). I
would really like all values in between. Any suggestions?
Jason Carey
Snow Hydrology
University of Utah
Try simply inserting a decimal point in the value "1000": "1000.0". This
should force floating point calculations.
--
Malcolm D. Williamson - GIS Specialist E-mail: malcolm@cast.uark.edu
Center for Advanced Spatial Technologies Telephone: (501) 575-6159
Ozark Rm. 12 Fax: (501) 575-5218
University of Arkansas
Fayetteville, AR 72701 http://www.cast.uark.edu
On Thu, 23 Oct 1997 grass@genie.saff.utah.edu wrote:
Help please,
here is the simple r.mapcalc I'd like to run:
snoele12_37 = 228*exp(1.2,elevation/1000)
It runs, however the 'elevation/1000' doesn't seem to hold a floating
point during the evaluation. Therefore the only values in my map are 228,
274 which equals 228*exp(1.2,1) and 328 which equals 228*exp(1.2,2). I
would really like all values in between. Any suggestions?
Jason Carey
Snow Hydrology
University of Utah