<html style="direction: ltr;">
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#FFFFFF"
text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 07/25/2015 08:08 PM, patrick s.
wrote:<br>
</div>
<blockquote cite="mid:55B3C277.5020800@gmx.net" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
Dear all<br>
<br>
Is there a function in GRASS70 to match multiple rasters as values
to a point-vector. Some of the rasters are of type integer, some
of type float and the columns should ideally respect the datatype.
It might be possible as a bash.loop on v.what.rast, but I do not
find a way to query the datatype of a raster and get warnings:<br>
</blockquote>
<br>
You can use r.info -g to get information about each rast, including
datatype.<br>
So:<br>
eval `r.info -g $i`<br>
will put all raster parameters into shell variables, among them
datatype.<br>
if ( $datatype == 'CELL' ) ...<br>
<blockquote cite="mid:55B3C277.5020800@gmx.net" type="cite"> <i><br>
for i in `g.list type=rast ` #ideally </i><i>only type integer
OR float<br>
</i><i>do </i><i><br>
</i><i> echo "adding layer '$i'" </i><i><br>
</i><i> v.db.addcolumn map=pt_grid column="$i double" #adapt
datatype of column according to raster type</i><i><br>
</i><i> v.what.rast map=pt_grid rast=$i col=$i</i><i><br>
</i><i>done;<br>
<br>
</i>Happy about any help and hint,<br>
Patrick<br>
<i><br>
</i><br>
<br>
<br>
This mail was received via Mail-SeCure System.<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
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>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<br>
</body>
</html>