<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<font face="Helvetica, Arial, sans-serif">Hi Hamish,<br>
I like your r.reclass solution. Just wondering, you say it is a
"virtual" map, and easy to remove. How is it virtual? When I use it I
get a new map in my raster list that doesn't seem to go away so it
seems permanent to me. Although I don't understand the underlying
storage structure so maybe it is still virtual in that sense?<br>
<br>
Thanks,<br>
Ken<br>
<br>
</font><br>
On 06/17/2010 07:52 PM, Hamish wrote:
<blockquote cite="mid:92079.16717.qm@web110009.mail.gq1.yahoo.com"
type="cite">
<pre wrap="">Marcello wrote:
</pre>
<blockquote type="cite">
<pre wrap="">There is probably a better way to do that (and I would like to
"hear" it very much, specially if there is a single command
to do this), but for now, I think the code below does the job:
g.region vect=your_vector
v.extract input=your_vector output=selected_polygon type=area
where="cat=desired_cat"
v.to.rast input=selected_polygon output=polygon_rasterized use=val type=area
r.mask input=polygon_rasterized
</pre>
</blockquote>
<pre wrap="">
another way (probably there are many),
v.to.rast
then a loop using r.reclass to make a temporary MASK map of each
category, then
g.region rast=rasterized_vect
g.region zoom=rasterized_vect
r.reclass are tiny virtual maps (ie very quick to create+remove),
g.region zoom= starts at the current region and shrinks inward
until it hits a non-NULL cell.
Hamish
_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
</pre>
</blockquote>
</body>
</html>