[GRASS-user] r.mapcalculator / r.mapcalc not producing raster
jaydub
justcallmejay at gmail.com
Fri Feb 18 13:29:48 EST 2011
Hi all, I'm trying to combine two raster using the r.mapcalc/r.mapcalculator
but am getting no where. I'm using python.
# I did this previously... so "dem" and "rain" exist as rasters
grass.run_command("r.in.gdal",input="<location>/dem.tif",output="dem")
grass.run_command("r.in.gdal",input="<location>/rain.tif",output="rain")
# Then I try this...
grass.run_command("r.mapcalculator",amap="dem",bmap="rain",formula="A *
B",outfile="test_combo")
The output from that gives me...
r.mapcalc "test_combo" = "( "dem" * "rain" )"
100%
Done.
When I try to add "test_combo" to the display in GRASS, nothing shows, even
when I try to zoom to the layer in GRASS.
r.info gives me the following:
+----------------------------------------------------------------------------+
| Layer: test_combo2 Date: Fri Feb 18 13:19:52 2011
|
| Mapset: PERMANENT Login of Creator: jay
|
| Location: newLocation
|
| DataBase: ......... |
| Title: ( test_combo )
|
| Timestamp: none
|
|----------------------------------------------------------------------------|
|
|
| Type of Map: raster Number of Categories: 255
|
| Data Type: FCELL
|
| Rows: 20
|
| Columns: 20
|
| Total Cells: 400
|
| Projection: Lambert Conformal Conic
|
| N: 707999.97864227 S: 628766.19610209 Res: 3961.68912701
|
| E: 827306.35554785 W: 607862.24148022 Res: 10972.20570338
|
| Range of data: min = 0.000000 max = 4241302.000000
|
|
|
| Data Description:
|
| generated by r.mapcalc
|
|
|
| Comments:
|
| dem * rain
|
|
|
+----------------------------------------------------------------------------+
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-mapcalculator-r-mapcalc-not-producing-raster-tp6041018p6041018.html
Sent from the Grass - Users mailing list archive at Nabble.com.
More information about the grass-user
mailing list