[GRASSLIST:7170] crop of raster - once again
axel_orth at gmx.de
Wed Jun 15 09:57:33 EDT 2005
I had some success with cropping my raster maps with borders of
municipalities (available as vector - converted to raster) and thought I
figured out how it works.
But now I try do do the same with some other data and strange things happen:
import raster map "MAP" - import vector "V" - do raster conversation
with vector and get the raster map "V_rast"
set the region: g.region rast=V_rast zoom=V_rast
create the mask: g.copy V_rast,MASK
create new map based on the existing map while only the area of the mask
is taken into consideration: r.mapcalc MAP_crop=MAP
Problem: the resulting map MAP_crop is just a colored rectangle - the
size of the rectangle is equal to the bounding box of V_rast
By chance I made some errors and somehow got the result i wanted:
instead of the r.mapcalc command shown above I did:
MAP_crop=MAP end -> syntax error
MAP looks now exactly the way I wanted. When I leave GRASS, start again
then MAP looks like I had when imported it.
I have no clue what's this is all about and hope someone has a idea.
More information about the grass-user