<div dir="auto"><div dir="auto">I had a similar problem some time ago, just that it was not raster resolution, but region resolution that I changed to solve my problem (see this thread and MM's answer: <a href="http://osgeo-org.1560.x6.nabble.com/v-to-rast-for-polygons-not-overlapping-center-of-raster-cell-td5355686.html#a5355729" rel="noreferrer noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/v-to-rast-for-polygons-not-overlapping-center-of-raster-cell-td5355686.html#a5355729</a>)</div><div dir="auto"><br></div><div dir="auto">IIUC, MM's proposed solution to my case then does not work anymore because v.to.rast call inside v.rast.stats is affected by the region alignment to the raster to be queried. So, the solution is indeed now, to change raster resolution... ? Then the region would be aligned to it (them)?</div><div dir="auto"><br></div><div dir="auto">If one has large areas or long time series and has to resample all rasters to get smallish polygons rasterized, I do not see the advantage of this new behavior... but maybe I'm missing something</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto">Vero</div></div><br><div class="gmail_quote"><div dir="ltr">El mié., 6 feb. 2019 16:54, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no" rel="noreferrer noreferrer" target="_blank">Stefan.Blumentrath@nina.no</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="NO-BOK" link="blue" vlink="purple">
<div class="m_-6754550830499574627m_-6150239242825554819m_-6331379549135813582WordSection1">
<p class="MsoNormal"><span>Ciao Madi, Vero,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Starting with GRASS 7.6, also centroids are used to get the raster representation of your area vector map. That increases the likelihood of smaller areas to be rasterized.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Increasing the resolution of the current region alone does not help, because v.rast.stats temporarily changes the computational region to align with the input raster map(s) (see also:
<a href="https://trac.osgeo.org/grass/ticket/3523" rel="noreferrer noreferrer noreferrer" target="_blank">https://trac.osgeo.org/grass/ticket/3523</a> and
<a href="https://trac.osgeo.org/grass/ticket/3598" rel="noreferrer noreferrer noreferrer" target="_blank">https://trac.osgeo.org/grass/ticket/3598</a> for discussion) Even if the first ticket is closed, comments are welcome.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">It might make sense to add a flag to v.rast.stats like in r.slope.aspect to not align the computational region.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Furthermore, with regards to efficiency, v.strds.stats could gain some speed if multi-raster support in v.rast.stats - added in G 7.6 - would be handed down to the addon. Might almost
 double the speed for larger STRDS…<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Cheers<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Stefan<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> grass-user <<a href="mailto:grass-user-bounces@lists.osgeo.org" rel="noreferrer noreferrer noreferrer" target="_blank">grass-user-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>Veronica Andreo<br>
<b>Sent:</b> onsdag 6. februar 2019 17:20<br>
<b>To:</b> Margherita Di Leo <<a href="mailto:diregola@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">diregola@gmail.com</a>><br>
<b>Cc:</b> GRASS user list <<a href="mailto:grass-user@lists.osgeo.org" rel="noreferrer noreferrer noreferrer" target="_blank">grass-user@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [GRASS-user] sample a strds at specific locations (areas)<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi Madi<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">El mié., 6 feb. 2019 a las 16:31, Margherita Di Leo (<<a href="mailto:diregola@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">diregola@gmail.com</a>>) escribió:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal">I have a question regarding v.strds.stats. I get the following warning message:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">WARNING: Not all vector categories converted to raster. Converted 120 of 265.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What could be the reason for that?<u></u><u></u></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Some vector areas might not be converted because they are too small with respect to the pixel size that you try to query. Others will tell better but I think the polygon must overlap the center of the pixel in order to be converted into
 raster. One solution could be to resample your rasters to a higher resolution.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">HTH, <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Vero<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>

</blockquote></div>