<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi John and Mark,<div><br></div><div>I am getting a syntax error when I type in either of your statements. To be clear, I am using Mac Snow Leopard in the Terminal program (bash). </div><div><br></div><div>Cheers,</div><div><br></div><div>Andrew</div><div><br><div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Andrew Lewin</div><div><a href="mailto:andrew.lewin@sympatico.ca">andrew.lewin@sympatico.ca</a></div><div><br></div><div>President </div><div>Coastal/Marine Spatial Ecologist</div><div><a href="http://www.spatialconserve.com">Spatial-Conserve Incorporated</a></div><div><br></div><div>Associate </div><div><a href="http://www.c-foam.management.uottawa.ca/index.html">C-FOAM</a> (Canadian Fisheries, Oceans and Aquaculture Management Group)</div><div>Telfer School of Management, University of Ottawa</div><div><br></div><div><font class="Apple-style-span" color="#808080" face="Arial"><span class="Apple-style-span" style="font-size: x-small; "><i><br></i></span></font></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On 2010-09-16, at 12:22 PM, John C. Tull wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Correct me if I am wrong, but for step 3, you can simply use an equality statement, i.e., echo clippedRaster=NA_temperature | r.mapcalc'. This shortens things a little further.<br><br>Regards,<br>John<br><br>On Sep 16, 2010, at 8:41 AM, Mark Seibel wrote:<br><br><blockquote type="cite">Surely there is a more elegant way...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">1) Convert the vector you wish to use as a clipper to a raster.<br></blockquote><blockquote type="cite">2) Set the raster mask to be the raster clipper (the converted vector).<br></blockquote><blockquote type="cite">3) Use map calculator to perform some non-data altering operation, but<br></blockquote><blockquote type="cite">get the mask to do its thing (eg. echo 'clippedRaster=NA_temperature +<br></blockquote><blockquote type="cite">0 | r.mapcalc').<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Mark<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Thu, Sep 16, 2010 at 10:52 AM, Andrew Lewin<br></blockquote><blockquote type="cite"><<a href="mailto:andrew.lewin@sympatico.ca">andrew.lewin@sympatico.ca</a>> wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">Dear Listers,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I would like to clip or extract a raster using a vector file; however, I<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">can't seem to find the command to do this in GRASS 6.4 ORC6. The raster<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">file is an interpolated file of temperature for North America. The raster<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">file extends beyond the North America boundaries. I would like to clip the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">raster file to the North American boundaries, but I cannot find the command<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">to do so.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I would appreciate any help possible.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thank You,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Andrew<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Andrew Lewin<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:andrew.lewin@sympatico.ca">andrew.lewin@sympatico.ca</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">President<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Coastal/Marine Spatial Ecologist<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Spatial-Conserve Incorporated<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Associate<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">C-FOAM (Canadian Fisheries, Oceans and Aquaculture Management Group)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Telfer School of Management, University of Ottawa<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">grass-user mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">grass-user mailing list<br></blockquote><blockquote type="cite"><a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br></blockquote><blockquote type="cite"><a href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote><br><br></div></blockquote></div><br></div></div></body></html>