[GRASS-user] v.rast.stats skipping polygons. Why?

Hernán De Angelis variablestarlight at gmail.com
Tue Oct 31 02:35:19 PDT 2023


Hi all,

I have a vector layer with 97015 polygons (lakes in real life) many of 
which are complicated, with islands. The layer has been cleaned using 
v.clean (during import, and after as well). I then run v.stats.rast to 
pick statistics from a raster. This works well for about 3/4 of the 
categories while about 1/4 are skipped. Why?

 From v.stats.rast:
WARNING: Not all vector categories converted to raster. Converted 73078 of
          97837.
Processing input data (73078 categories)...

I see that v.to.rast has no problems converting polygons to raster (only 
visually checked). A test running v.rast.stats using the rasterized 
vector reports:
WARNING: Not all vector categories converted to raster. Converted 97015 of
          97837.
Processing input data (97015 categories)...
That is, it converts all polygons.

I have cleaned, and rebuilt topology to no avail. Also calling 
v.rast.stats using layer (1) and type (centroid) did not change the results.

Am I missing something here? Why is this happening and what can be done 
to calculate raster statistics for all polygons?

Thanks in advance!

Hernán


v.category report is:
 > v.category input=lakes option=report
Layer/table: 1/lakes
type       count        min        max
point          0          0          0
line           0          0          0
boundary       0          0          0
centroid   97837          1      97015
area           0          0          0
face           0          0          0
kernel         0          0          0
all        97837          1      97015
Layer: 2
type       count        min        max
point          0          0          0
line           0          0          0
boundary       0          0          0
centroid      21          2          2
area           0          0          0
face           0          0          0
kernel         0          0          0
all           21          2          2




More information about the grass-user mailing list