<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="MSHTML 8.00.6001.19088">
</head>
<body>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial">Thanks!
</font></span></div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial">I also got an answer from Sylvain (see under). I tested both methods, but the best (and safest) is v.to.rast and r.mask. Worked nicely!
</font></span></div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial">I was kind of hoping that was a function for this......well it is not to hard to do when scripting.</font></span></div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial">Thanks.</font></span></div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial">Martin</font></span></div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="551284613-01072011"><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span class="551284613-01072011">hi,<br>
<br>
2 ways to do that: <br>
- set the region extents to match the vector map (g.region vect=your_vector)<br>
- transform the vector into raster (v.to.rast), then use this new raster as a mask
<br>
<br>
<br>
Sylvain<br>
<br>
</span></div>
<br>
<div dir="ltr" lang="no" class="OutlookMessageHeader" align="left">
<hr tabindex="-1">
<font size="2" face="Tahoma"><b>Fra:</b> grass-user-bounces@lists.osgeo.org [mailto:grass-user-bounces@lists.osgeo.org]
<b>På vegne av</b> Nick Jachowski<br>
<b>Sendt:</b> 30. juni 2011 18:37<br>
<b>Til:</b> Daniel Lee<br>
<b>Kopi:</b> grass-user@lists.osgeo.org<br>
<b>Emne:</b> Re: [GRASS-user] Re: Limit d.raster with vector map<br>
</font><br>
</div>
<div></div>
I would do what Daniel said, but use the raster (use command v.to.rast) as a mask (use command r.mask) to limit the displayed area to the vector map area.<br>
<br>
<div class="gmail_quote">On Thu, Jun 30, 2011 at 9:40 PM, Daniel Lee <span dir="ltr">
<<a href="mailto:Lee@isi-solutions.org">Lee@isi-solutions.org</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
I would do the following, assuming you've got an area vector that's covering<br>
the raster data you want to show:<br>
<br>
1. Convert the vector to a raster with r.to.vect<br>
2. Reclassify it so that it's got only two values: 1 and NoData.<br>
3. Multiply the reclassified raster with the raster data that you want to<br>
limit to the area of the vector. The old values will be preserved in the<br>
resulting map because x * 1 = x, but everything that's not collocated with<br>
the vector map will be removed because it's multiplied with NoData.<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Limit-d-raster-with-vector-map-tp6533406p6533536.html" target="_blank">
http://osgeo-org.1803224.n2.nabble.com/Limit-d-raster-with-vector-map-tp6533406p6533536.html</a><br>
Sent from the Grass - Users mailing list archive at Nabble.com.<br>
</font>
<div>
<div></div>
<div class="h5">_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</body>
</html>