<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hola Vero,</p>
<p>Thank you. There were a few repeated or shared categories but not
as many as skipped polygons. The problem was with the data like
many extremely small lakes and a too coarse raster resolution to
capture all of them them. This is solved now.<br>
</p>
<p>All well, thanks again<br>
</p>
<p>/Hernán<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Den 2023-10-31 kl. 23:47, skrev
Veronica Andreo:<br>
</div>
<blockquote type="cite"
cite="mid:CAAMki4FXzmthE_C0D1vyP0FRZLnTinDcRb3urSsybjX=A5WssA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hola Hernán,
<div><br>
</div>
<div>Do your polygons have repeated/shared cat values? That
might be one potential cause according to the Notes in the
manual: <a
href="https://grass.osgeo.org/grass83/manuals/v.rast.stats.html"
moz-do-not-send="true" class="moz-txt-link-freetext">https://grass.osgeo.org/grass83/manuals/v.rast.stats.html</a></div>
<div><br>
</div>
<div>just my 2 cents</div>
<div>Vero </div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">El mar, 31 oct 2023 a las
6:35, Hernán De Angelis via grass-user (<<a
href="mailto:grass-user@lists.osgeo.org"
moz-do-not-send="true" class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a>>)
escribió:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
all,<br>
<br>
I have a vector layer with 97015 polygons (lakes in real life)
many of <br>
which are complicated, with islands. The layer has been
cleaned using <br>
v.clean (during import, and after as well). I then run
v.stats.rast to <br>
pick statistics from a raster. This works well for about 3/4
of the <br>
categories while about 1/4 are skipped. Why?<br>
<br>
From v.stats.rast:<br>
WARNING: Not all vector categories converted to raster.
Converted 73078 of<br>
97837.<br>
Processing input data (73078 categories)...<br>
<br>
I see that v.to.rast has no problems converting polygons to
raster (only <br>
visually checked). A test running v.rast.stats using the
rasterized <br>
vector reports:<br>
WARNING: Not all vector categories converted to raster.
Converted 97015 of<br>
97837.<br>
Processing input data (97015 categories)...<br>
That is, it converts all polygons.<br>
<br>
I have cleaned, and rebuilt topology to no avail. Also calling
<br>
v.rast.stats using layer (1) and type (centroid) did not
change the results.<br>
<br>
Am I missing something here? Why is this happening and what
can be done <br>
to calculate raster statistics for all polygons?<br>
<br>
Thanks in advance!<br>
<br>
Hernán<br>
<br>
<br>
v.category report is:<br>
> v.category input=lakes option=report<br>
Layer/table: 1/lakes<br>
type count min max<br>
point 0 0 0<br>
line 0 0 0<br>
boundary 0 0 0<br>
centroid 97837 1 97015<br>
area 0 0 0<br>
face 0 0 0<br>
kernel 0 0 0<br>
all 97837 1 97015<br>
Layer: 2<br>
type count min max<br>
point 0 0 0<br>
line 0 0 0<br>
boundary 0 0 0<br>
centroid 21 2 2<br>
area 0 0 0<br>
face 0 0 0<br>
kernel 0 0 0<br>
all 21 2 2<br>
<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</blockquote>
</div>
</blockquote>
</body>
</html>