<div dir="ltr"><span style="border-collapse:collapse;font-size:13px;font-family:arial,sans-serif"><div><span style="border-collapse:collapse;font-size:13px;font-family:arial,sans-serif">What do you mean exactly with creating a raster from a coordinate pair?</span></div>
<div><span style="border-collapse:collapse;font-size:13px;font-family:arial,sans-serif"><br></span></div><div><span style="border-collapse:collapse;font-size:13px;font-family:arial,sans-serif">If you want to align a raster to your coordinates you might have a look into g.region</span></div>
<div><span style="border-collapse:collapse;font-size:13px;font-family:arial,sans-serif">and set appropriate resolution and extend coordinates.</span></div><div><br></div><div><span style="border-collapse:collapse;font-size:13px;font-family:arial,sans-serif">To create a raster based on coordinates, eg. set a raster value at a specific coordinate</span></div>
<div><span style="border-collapse:collapse;font-size:13px;font-family:arial,sans-serif">pair to a specific value you could use r.mapcalc:</span></div><div><br></div><div>E.g. Set the value 1 at the cell x=52, y=10</div>
r.mapcalc "newmap = if(abs(x()-52.0)<0.001 && abs(y()-10.00)<0.001, 1)"<br><br>If you know the specific row and column and resolution you could also use:<br>r.mapcalc "newmap = if(row()-1 == int(($n-10.0)/$nsres) && col()-1 == int((52.0-$w)/$ewres), 1)"<br>
</span><div><font color="#000000" face="arial, sans-serif"><span style="border-collapse:collapse"><br></span></font></div><div><font color="#000000" face="arial, sans-serif"><span style="border-collapse:collapse">Thanks to Glynn who taught me these things some time ago on the mailing list :)</span></font></div>
<div><font color="#000000" face="arial, sans-serif"><span style="border-collapse:collapse"><br></span></font></div><div><font color="#000000" face="arial, sans-serif"><span style="border-collapse:collapse">/Johannes</span></font></div>
<div><font class="Apple-style-span" color="#000000" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br></span></font></div>
<div><font color="#000000" face="arial, sans-serif"><span style="border-collapse:collapse"><br></span></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 1:02 PM, aborruso <span dir="ltr"><<a href="mailto:aborruso@gmail.com" target="_blank">aborruso@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
is there some grass raster command to create a raster starting from a<br>
coordinate pair?<br>
<br>
Something like r.createraster input=x,y output=myraster<br>
<br>
Thank you,<br>
<br>
Andrea<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Create-a-raster-starting-from-a-coordinate-pair-tp5093513.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Create-a-raster-starting-from-a-coordinate-pair-tp5093513.html</a><br>
Sent from the Grass - Users mailing list archive at Nabble.com.<br>
_______________________________________________<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>
</blockquote></div><br></div>