<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.gmail-il
{mso-style-name:gmail-il;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Ciao Margherita,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">This is strange. The area (I assume it is an area though your image just shows the boundary) should definitely get rasterized and thus analysed in v.strds.stats.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Can you post the output of:<o:p></o:p></span></p>
<p class="MsoNormal"><span class="gmail-il"><span lang="EN-US">v.category input=big_areas2@PERMANENT option=report</span></span><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">and<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">v.info test -t ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I double-checked, and the possibility to rasterize also centroids is unfortunately not handed down to v.rast.stats (and moduls build ontop of that, like v.strds.stats). This should be
done for GRASS version >= 7.6 (e.g. by adding centroids to the default selection of types to rasterize in v.to.rast) and is probably worth a ticket.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Stefan<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Margherita Di Leo <diregola@gmail.com>
<br>
<b>Sent:</b> fredag 9. august 2019 16:51<br>
<b>To:</b> Veronica Andreo <veroandreo@gmail.com><br>
<b>Cc:</b> Stefan Blumentrath <Stefan.Blumentrath@nina.no>; grass-user <grass-user@lists.osgeo.org><br>
<b>Subject:</b> Re: [GRASS-user] sample a strds at specific locations (areas)<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">excuse me if I return on this. I have again the same problem, of <span class="gmail-il">v</span>.<span class="gmail-il">strds</span>.<span class="gmail-il">stats skipping lots of polygons. Now I'm using a brand new dataset - strds of Sentinel
1 and a brand now vector of polygons - and the skipped polygons are not narrow, I'm sure that there are cells centroids in it. See for example screenshot attached, depicting a polygon that was skipped. I also tried to run v</span>.<span class="gmail-il">strds</span>.<span class="gmail-il">stats
on that polygon alone, like:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="gmail-il">v.strds.stats in=big_areas2@PERMANENT where="cat == '1'" strds=db_cross_pol@scaled out=test method=average </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span class="gmail-il"><a href="http://v.info">v.info</a> test</span><br>
<span class="gmail-il"> +----------------------------------------------------------------------------+</span><br>
<span class="gmail-il"> | Name: test |</span><br>
<span class="gmail-il"> | Mapset: stats |</span><br>
<span class="gmail-il"> | Location: S1 |</span><br>
<span class="gmail-il"> | Database: /media/madi/TOSHIBA EXT/S1/grassdata |</span><br>
<span class="gmail-il"> | Title: Output from v.patch |</span><br>
<span class="gmail-il"> | Map scale: 1:1 |</span><br>
<span class="gmail-il"> | Name of creator: madi |</span><br>
<span class="gmail-il"> | Organization: |</span><br>
<span class="gmail-il"> | Source date: Fri Aug 9 12:12:49 2019 |</span><br>
<span class="gmail-il"> | Timestamp (first layer): none |</span><br>
<span class="gmail-il"> |----------------------------------------------------------------------------|</span><br>
<span class="gmail-il"> | Map format: native |</span><br>
<span class="gmail-il"> |----------------------------------------------------------------------------|</span><br>
<span class="gmail-il"> | Type of map: vector (level: 2) |</span><br>
<span class="gmail-il"> | |</span><br>
<span class="gmail-il"> | Number of points: 0 Number of centroids: 0 |</span><br>
<span class="gmail-il"> | Number of lines: 0 Number of boundaries: 0 |</span><br>
<span class="gmail-il"> | Number of areas: 0 Number of islands: 0 |</span><br>
<span class="gmail-il"> | |</span><br>
<span class="gmail-il"> | Map is 3D: No |</span><br>
<span class="gmail-il"> | Number of dblinks: 0 |</span><br>
<span class="gmail-il"> | |</span><br>
<span class="gmail-il"> | Projection: UTM (zone 34) |</span><br>
<span class="gmail-il"> | |</span><br>
<span class="gmail-il"> | N: 0 S: 0 |</span><br>
<span class="gmail-il"> | E: 0 W: 0 |</span><br>
<span class="gmail-il"> | |</span><br>
<span class="gmail-il"> | Digitization threshold: 0 |</span><br>
<span class="gmail-il"> | Comment: |</span><br>
<span class="gmail-il"> | |</span><br>
<span class="gmail-il"> +----------------------------------------------------------------------------+</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I confess I hadn't look much further into it because I thought it was a problem with nodata, but this is not the case and I think it's worth of further investigation. Thanks for any pointers.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Feb 7, 2019 at 4:10 PM Margherita Di Leo <<a href="mailto:diregola@gmail.com">diregola@gmail.com</a>> wrote:<o:p></o:p></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>
<p class="MsoNormal">Thanks for testing, Vero. I assume it's due to a local problem then.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Feb 7, 2019 at 3:29 PM Veronica Andreo <<a href="mailto:veroandreo@gmail.com" target="_blank">veroandreo@gmail.com</a>> wrote:<o:p></o:p></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>
<div>
<p class="MsoNormal">Hi Stefan and Madi, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks Stefan for the explanations :) Indeed I agree that a flag to avoid the alignment to input rasters (and just use region settings) sounds good.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I tested what Madi said, but cannot reproduce in the climate NC location [0]. This is the command I used:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">v.strds.stats in=boundary_county where="cat == '261'" strds=tempmean t_where="start_time >= '2012-01-01'" out=test<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">to make it faster (it feels indeed kinda slow for the whole vector and full time series), I selected only one polygon and a range of dates. I get the table as expected while leaving methods by default.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">best, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Vero<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">[0] <a href="http://courses.ncsu.edu/mea592/common/media/02/nc_climate_spm_2000_2012.zip" target="_blank">
http://courses.ncsu.edu/mea592/common/media/02/nc_climate_spm_2000_2012.zip</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">El jue., 7 feb. 2019 a las 14:39, Margherita Di Leo (<<a href="mailto:diregola@gmail.com" target="_blank">diregola@gmail.com</a>>) escribió:<o:p></o:p></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>
<p class="MsoNormal">Thank you Stefan for your help! I figured what happens. v.strds.stats with default method produces in my case a corrupted output, topology is there but there's no table associated to it. If I specify method=average, I do obtain the table,
and the mystery is solved: some of the polygons fall into a nodata (due to cloud mask). If anyone else can reproduce the corrupted table issue, I can file a ticket for that.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for help!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Regards,<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Feb 7, 2019 at 12:33 PM Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>> wrote:<o:p></o:p></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>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi Madi,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">With this combination (polygon size vs. raster resolution), the shape of the polygons can be an issue (narrow areas that do not cover the center of any pixel).</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">Debugging should be simple with v.db.select or v.extract.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">Areas that did not get rasterized should be NULL in the column with statistics computed with v.rast.stats.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">In verbose mode v.rast.stats (or probably even v.to.rast) should probably give a more informative Warning message (e.g. listing categories not rasterized). It
also would help if you can rasterize the areas yourself and provide a raster with categories as (optional) input to v.rast.stats…</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">For high resolution data like yours, the speed improvement of multiple raster input might help quite a bit esp. with many maps in the time series. Will see if
I can come up with a patch rather soon…</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">Cheers</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">Stefan</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Margherita Di Leo <<a href="mailto:diregola@gmail.com" target="_blank">diregola@gmail.com</a>>
<br>
<b>Sent:</b> torsdag 7. februar 2019 10:37<br>
<b>To:</b> Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>><br>
<b>Cc:</b> Veronica Andreo <<a href="mailto:veroandreo@gmail.com" target="_blank">veroandreo@gmail.com</a>>; grass-user <<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [GRASS-user] sample a strds at specific locations (areas)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">thank you for your replies. To give a little more context: I selected my polygon areas to be > 0.5 ha each (this would be 50000 mq if I'm not mistaken) and I'm sampling NDVI maps
at 10m resolution (the region being the same as NDVI maps). So I think I need an idea on how to debug the areas that were excluded to check them individually to see what could be the problem...
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Regarding the alignment problem, if I understand it correctly: if the polygon doesn't include the *center* of the raster beneath it, can't retrieve the value and the polygon is
discarded? But a value exists, so it would be correct that it returned a value in any case. But I admit I don't have a full grasp of the problem.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Wed, Feb 6, 2019 at 10:52 PM Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;border-color:currentcolor currentcolor currentcolor rgb(204,204,204)">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi Vero,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">I think there is a little misunderstanding.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">v.rast.stats did not change it behaviour with regards to the computational region (at least not if only one raster map is used). The alignment to the input raster
(resolution) has been around since the module got ported to Python (like 10 years ago):</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"><a href="https://trac.osgeo.org/grass/browser/grass/trunk/scripts/v.rast.stats/v.rast.stats.py?rev=33522#L148" target="_blank">https://trac.osgeo.org/grass/browser/grass/trunk/scripts/v.rast.stats/v.rast.stats.py?rev=33522#L148</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">So, adding a flag for skipping the alignment was more an idea for an enhancement that allows the behaviour you seem to prefer (too).</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">Cheers</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">Stefan</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Veronica Andreo <<a href="mailto:veroandreo@gmail.com" target="_blank">veroandreo@gmail.com</a>>
<br>
<b>Sent:</b> onsdag 6. februar 2019 21:38<br>
<b>To:</b> Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>><br>
<b>Cc:</b> Margherita Di Leo <<a href="mailto:diregola@gmail.com" target="_blank">diregola@gmail.com</a>>; grass-user <<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [GRASS-user] sample a strds at specific locations (areas)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt: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" target="_blank">
http://osgeo-org.1560.x6.nabble.com/v-to-rast-for-polygons-not-overlapping-center-of-raster-cell-td5355686.html#a5355729</a>)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt: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)?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt: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<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Cheers,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Vero<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">El mié., 6 feb. 2019 16:54, Stefan Blumentrath <<a href="mailto:Stefan.Blumentrath@nina.no" target="_blank">Stefan.Blumentrath@nina.no</a>> escribió:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;border-color:currentcolor currentcolor currentcolor rgb(204,204,204)">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Ciao Madi, Vero,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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" target="_blank">
https://trac.osgeo.org/grass/ticket/3523</a> and <a href="https://trac.osgeo.org/grass/ticket/3598" target="_blank">
https://trac.osgeo.org/grass/ticket/3598</a> for discussion) Even if the first ticket is closed, comments are welcome.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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…</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">Cheers</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">Stefan</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> grass-user <<a href="mailto:grass-user-bounces@lists.osgeo.org" 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" target="_blank">diregola@gmail.com</a>><br>
<b>Cc:</b> GRASS user list <<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [GRASS-user] sample a strds at specific locations (areas)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi Madi<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">El mié., 6 feb. 2019 a las 16:31, Margherita Di Leo (<<a href="mailto:diregola@gmail.com" target="_blank">diregola@gmail.com</a>>) escribió:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt;border-color:currentcolor currentcolor currentcolor rgb(204,204,204)">
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I have a question regarding v.strds.stats. I get the following warning message:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">WARNING: Not all vector categories converted to raster. Converted 120 of 265.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">What could be the reason for that?<o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">HTH,
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Vero<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#666666">Margherita Di Leo</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#666666">Margherita Di Leo</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#666666">Margherita Di Leo</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="color:#666666">Margherita Di Leo</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>