<div dir="ltr"><div>Does the example in v.rast.stats manual [1] work for you, Luis? Is your polygon vector map "healthy"? The error you get seems to be while converting the vector to raster, hence I wonder if boundaries of all areas in your vector are right. <br></div><div><br></div><div>my 0.02 cents</div><div>Vero</div><div><br></div><div>[1] <a href="https://grass.osgeo.org/grass78/manuals/v.rast.stats.html">https://grass.osgeo.org/grass78/manuals/v.rast.stats.html</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun, 1 feb 2021 a las 16:31, Luís Moreira de Sousa via grass-user (<<a href="mailto:grass-user@lists.osgeo.org">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"><div>Hi Micha, thank you for replying.<br></div><div><br></div><div>I recreated the PSU layer in another mapset with the default SQLite back-end, v.rast.stats fails with the exact same error. So this is not related to the back-end.<br></div><div><div><div><br></div><div>Below are the outputs you requested. Thank you.<br></div><div><br></div></div></div><div>> <a href="http://v.info" target="_blank">v.info</a> PSU<br></div><div>+----------------------------------------------------------------------------+<br></div><div>| Name: PSU |<br></div><div>| Mapset: MAL |<br></div><div>| Location: S4AHomolosine |<br></div><div>| Database: /home/duque004/Work/GRASSDATA |<br></div><div>| Title: |<br></div><div>| Map scale: 1:1 |<br></div><div>| Name of creator: duque004 |<br></div><div>| Organization: |<br></div><div>| Source date: Fri Jan 29 08:13:08 2021 |<br></div><div>| Timestamp (first layer): none |<br></div><div>|----------------------------------------------------------------------------|<br></div><div>| Map format: native |<br></div><div>|----------------------------------------------------------------------------|<br></div><div>| Type of map: vector (level: 2) |<br></div><div>| |<br></div><div>| Number of points: 0 Number of centroids: 19468516 |<br></div><div>| Number of lines: 0 Number of boundaries: 38945853 |<br></div><div>| Number of areas: 19468516 Number of islands: 1 |<br></div><div>| |<br></div><div>| Map is 3D: No |<br></div><div>| Number of dblinks: 1 |<br></div><div>| |<br></div><div>| Projection: unknown |<br></div><div>| |<br></div><div>| N: 4289569.27224353 S: -4452930.72775647 |<br></div><div>| E: 6679312.25515029 W: -2226387.74484971 |<br></div><div>| |<br></div><div>| Digitization threshold: 0 |<br></div><div>| Comment: |<br></div><div>| |<br></div><div>+----------------------------------------------------------------------------+<br></div><div><br></div><div>> <a href="http://r.info" target="_blank">r.info</a> MAL_Mode_5x5<br></div><div>+----------------------------------------------------------------------------+<br></div><div>| Map: MAL_Mode_5x5 Date: Thu Jan 28 09:08:14 2021 |<br></div><div>| Mapset: MAL Login of Creator: duque004 |<br></div><div>| Location: S4AHomolosine |<br></div><div>| DataBase: /home/duque004/Work/GRASSDATA |<br></div><div>| Title: 5x5 neighborhood: mode of MAL_AFRICA |<br></div><div>| Timestamp: none |<br></div><div>|----------------------------------------------------------------------------|<br></div><div>| |<br></div><div>| Type of Map: raster Number of Categories: 0 |<br></div><div>| Data Type: CELL |<br></div><div>| Rows: 87425 |<br></div><div>| Columns: 89057 |<br></div><div>| Total Cells: 7785808225 |<br></div><div>| Projection: unknown |<br></div><div>| N: 4289569.27224353 S: -4452930.72775647 Res: 100 |<br></div><div>| E: 6679312.25515029 W: -2226387.74484971 Res: 100 |<br></div><div>| Range of data: min = 0 max = 1 |<br></div><div>| |<br></div><div>| Data Description: |<br></div><div>| generated by r.neighbors |<br></div><div>| |<br></div><div>| Comments: |<br></div><div>| r.neighbors input="MAL_AFRICA" output="MAL_Mode_5x5" method="mode" s\ |<br></div><div>| ize=5 |<br></div><div>| |<br></div><div>+----------------------------------------------------------------------------+<br></div><div><br></div><div><div><div><br></div><div>-- <br></div><div>Luís<br></div><div><br></div></div><div>Sent with <a href="https://protonmail.com" target="_blank">ProtonMail</a> Secure Email.<br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On Friday, January 29, 2021 3:31 PM, Micha Silver <<a href="mailto:tsvibar@gmail.com" target="_blank">tsvibar@gmail.com</a>> wrote:<br></div><div> <br></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><br></div><div><br></div><div class="gmail_quote"><div dir="ltr">On Fri, Jan 29, 2021 at 3:53 PM Luís Moreira de Sousa via grass-user <<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Dear all,<br></div><div><br></div><div>I am getting the error "Unable to seek" with v.stats.error. There is not much information that could point the cause, just a warning saying that some data base files are not found. I checked the database connection and everything looks in order (see below). Any hints on what may be causing this error?<br></div><div><br></div><div>Thank you.<br></div><div><br></div><div>> v.rast.stats map=PSU raster=<span style="font-size:large"></span>MAL_Mode_5x5 method=number column_prefix=mal<br></div><div>ERROR: Unable to seek: Invalid argument<br></div><div>ERROR: An error occurred while converting vector to raster<br></div><div>WARNING: No data base element files found<br></div><div><br></div><div>> db.connect -p<br></div><div>driver: pg<br></div><div>database: s4a<br></div><div>schema: mal<br></div><div>group:<br></div><div><br></div><div>> psql -d s4a -p 5434<br></div><div>psql (12.5 (Ubuntu 12.5-0ubuntu0.20.04.1))<br></div><div>Type "help" for help.<br></div><div><br></div><div>s4a=# \dt mal.*<br></div><div> List of relations<br></div><div>Schema | Name | Type | Owner <br></div><div>--------+--------------------------+-------+----------<br></div><div>mal | psu | table | duque004<br></div><div>(1 rows)<br></div><div><br></div></blockquote><div><span style="font-size:large"></span><br></div><div><span style="font-size:large"></span><span style="font-size:large">Could it be <span style="font-size:large">simply </span>CAPS in the vector name vs small letters in the Postgres table?</span><br></div><div style="font-size:large">Can you post the outputs from:<br></div><div><span style="font-size:large"><a href="http://v.info" target="_blank">v.info</a> PSU</span><br></div><div><span style="font-size:large"><a href="http://r.info" target="_blank">r.info</a></span> <span style="font-size:large"></span><span style="font-size:large"></span><span style="font-size:18px">MAL_Mode_5x5</span><br></div><div><span style="font-size:18px"></span><br></div><div><span style="font-size:18px"></span><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br></div><div>s4a=# select count(*) from mal.psu;<br></div><div> count <br></div><div>----------<br></div><div>19468516<br></div><div>(1 row)<br></div><div><br></div><div><br></div><div><br></div><div><div><div><br></div><div>-- <br></div><div>Luís<br></div></div></div><div><br></div><div>_______________________________________________<br></div><div> grass-user mailing list<br></div><div> <a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br></div><div> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br></div></blockquote></div><div><br></div><div><br></div><div>-- <br></div><div dir="ltr"><div>Micha Silver<br></div><div>Ben Gurion Univ<br></div><div>Sde-Boker Remote Sensing Lab<br></div><div>cell: +972 (52) 3665918<br></div></div></div></blockquote><div><br></div>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</blockquote></div>