[GRASS-user] to define a region which is not rectangular

Hamish hamish_b at yahoo.com
Thu Feb 19 04:32:11 EST 2009


FAROUX STEPHANIE wrote:
> In my raster map sea pixels and missing data have the same
> null value. I'd like to separate the two but i don't
> have a sea/land mask. Missing data are concentrated in some areas.
> How can i do it?
> I thought to define regions in which missing data would be
> gathered but if i only use the zoom to do it, it will take a long time.
> Maybe using vectors?

depending on how fine a coastline you need, you might try importing the
GSHHS dataset with the v.in.gshhs module from the GRASS wiki addons page.

convert lines to areas with v.type + v.centroids, then vector areas to
raster MASK with v.to.rast. you can use r.mapcalc to invert the MASK
to create both land and sea MASKs.


good luck,
Hamish



      



More information about the grass-user mailing list