[GRASS-user] Problems using v.surf.idw

Hi all,

I have been trying to use v.surf.idw the past few days without success.

The image attached is a screen capture from the Map Display. There is a category

raster (green regions) with a gap (lake Chad) that must be filled with the

nearest neighbour category. The strategy is to create a points vector from the raster

and then apply v.surf.idw with npoints=1.

If the density of points is too high (> 10 000) the module fails with the

message “Killed”. With fewer points the module fails with the message

“ERROR: No points found”. Below is a log with an example. I have

tried many different combinations of resolution and number of points, I also tried different mapsets, SQLite and Postgres back-ends, but the result is always the same.

What can be going wrong?

P.S.: there is previous thread with similar symptoms, but seems to have been a different issue: http://osgeo-org.1560.x6.nabble.com/v-surf-idw-Not-Working-td5457170.html

Thank you.

Luís

GRASS 7.8.2 (S4AHomolosine):~ > g.region nsres=20000 ewres=20000 w=1474000 n=1626000 e=1760000 s=1383000

GRASS 7.8.2 (S4AHomolosine):~ > r.to.vect type=point input=soil_map_rcl_no_water output=soil_map_rcl_no_water --overwrite

WARNING: Vector map <soil_map_rcl_no_water> already exists and will be

overwritten

Extracting points…

100%

Building topology for vector map soil_map_rcl_no_water@MAL

Registering primitives…

r.to.vect complete.

GRASS 7.8.2 (S4AHomolosine):~ > v.info soil_map_rcl_no_water

(attachments)

LakeChadFilling.png

···

Luís

Sent with ProtonMail Secure Email.

Hi Luis,

could be because you haven’t provided the attribute column. It should probably fail with a message in this case…

Anna

On Fri, Apr 16, 2021 at 5:08 AM Luí­s Moreira de Sousa via grass-user <grass-user@lists.osgeo.org> wrote:

Hi all,

I have been trying to use v.surf.idw the past few days without success.

The image attached is a screen capture from the Map Display. There is a category

raster (green regions) with a gap (lake Chad) that must be filled with the

nearest neighbour category. The strategy is to create a points vector from the raster

and then apply v.surf.idw with npoints=1.

If the density of points is too high (> 10 000) the module fails with the

message “Killed”. With fewer points the module fails with the message

“ERROR: No points found”. Below is a log with an example. I have

tried many different combinations of resolution and number of points, I also tried different mapsets, SQLite and Postgres back-ends, but the result is always the same.

What can be going wrong?

P.S.: there is previous thread with similar symptoms, but seems to have been a different issue: http://osgeo-org.1560.x6.nabble.com/v-surf-idw-Not-Working-td5457170.html

Thank you.

Luís

GRASS 7.8.2 (S4AHomolosine):~ > g.region nsres=20000 ewres=20000 w=1474000 n=1626000 e=1760000 s=1383000

GRASS 7.8.2 (S4AHomolosine):~ > r.to.vect type=point input=soil_map_rcl_no_water output=soil_map_rcl_no_water --overwrite

WARNING: Vector map <soil_map_rcl_no_water> already exists and will be

overwritten

Extracting points…

100%

Building topology for vector map soil_map_rcl_no_water@MAL

Registering primitives…

r.to.vect complete.

GRASS 7.8.2 (S4AHomolosine):~ > v.info soil_map_rcl_no_water

±---------------------------------------------------------------------------+

| Name: soil_map_rcl_no_water |

| Mapset: MAL |

| Location: S4AHomolosine |

| Database: /home/duque004/Work/GRASSDATA |

| Title: |

| Map scale: 1:1 |

| Name of creator: duque004 |

| Organization: |

| Source date: Fri Apr 16 10:10:31 2021 |

| Timestamp (first layer): none |

|----------------------------------------------------------------------------|

| Map format: native |

|----------------------------------------------------------------------------|

| Type of map: vector (level: 2) |

| |

| Number of points: 114 Number of centroids: 0 |

| Number of lines: 0 Number of boundaries: 0 |

| Number of areas: 0 Number of islands: 0 |

| |

| Map is 3D: No |

| Number of dblinks: 1 |

| |

| Projection: unknown |

| |

| N: 1615875 S: 1393125 |

| E: 1749785.71428571 W: 1484214.28571429 |

| |

| Digitization threshold: 0 |

| Comment: |

| |

±---------------------------------------------------------------------------+

GRASS 7.8.2 (S4AHomolosine):~ > g.region nsres=100 ewres=100 w=1474000 n=1626000 e=1760000 s=1383000

GRASS 7.8.2 (S4AHomolosine):~ > v.surf.idw npoints=1 input=soil_map_rcl_no_water output=soil_map_rcl_water_fill --overwrite

Input vector map soil_map_rcl_no_water@MAL is 2D - using categories to

interpolate

WARNING: No record for point (cat = 1)

WARNING: No record for point (cat = 2)

WARNING: No record for point (cat = 3)

WARNING: No record for point (cat = 4)

WARNING: No record for point (cat = 5)

WARNING: No record for point (cat = 6)

WARNING: No record for point (cat = 7)

WARNING: No record for point (cat = 8)

WARNING: No record for point (cat = 9)

WARNING: No record for point (cat = 10)

WARNING: No record for point (cat = 11)

WARNING: No record for point (cat = 12)

WARNING: No record for point (cat = 13)

WARNING: No record for point (cat = 14)

WARNING: No record for point (cat = 15)

WARNING: No record for point (cat = 16)

WARNING: No record for point (cat = 17)

WARNING: No record for point (cat = 18)

WARNING: No record for point (cat = 19)

WARNING: No record for point (cat = 20)

WARNING: No record for point (cat = 21)

WARNING: No record for point (cat = 22)

WARNING: No record for point (cat = 23)

WARNING: No record for point (cat = 24)

WARNING: No record for point (cat = 25)

WARNING: No record for point (cat = 26)

WARNING: No record for point (cat = 27)

WARNING: No record for point (cat = 28)

WARNING: No record for point (cat = 29)

WARNING: No record for point (cat = 30)

WARNING: No record for point (cat = 31)

WARNING: No record for point (cat = 32)

WARNING: No record for point (cat = 33)

WARNING: No record for point (cat = 34)

WARNING: No record for point (cat = 35)

WARNING: No record for point (cat = 36)

WARNING: No record for point (cat = 37)

WARNING: No record for point (cat = 38)

WARNING: No record for point (cat = 39)

WARNING: No record for point (cat = 40)

WARNING: No record for point (cat = 41)

WARNING: No record for point (cat = 42)

WARNING: No record for point (cat = 43)

WARNING: No record for point (cat = 44)

WARNING: No record for point (cat = 45)

WARNING: No record for point (cat = 46)

WARNING: No record for point (cat = 47)

WARNING: No record for point (cat = 48)

WARNING: No record for point (cat = 49)

WARNING: No record for point (cat = 50)

WARNING: No record for point (cat = 51)

WARNING: No record for point (cat = 52)

WARNING: No record for point (cat = 53)

WARNING: No record for point (cat = 54)

WARNING: No record for point (cat = 55)

WARNING: No record for point (cat = 56)

WARNING: No record for point (cat = 57)

WARNING: No record for point (cat = 58)

WARNING: No record for point (cat = 59)

WARNING: No record for point (cat = 60)

WARNING: No record for point (cat = 61)

WARNING: No record for point (cat = 62)

WARNING: No record for point (cat = 63)

WARNING: No record for point (cat = 64)

WARNING: No record for point (cat = 65)

WARNING: No record for point (cat = 66)

WARNING: No record for point (cat = 67)

WARNING: No record for point (cat = 68)

WARNING: No record for point (cat = 69)

WARNING: No record for point (cat = 70)

WARNING: No record for point (cat = 71)

WARNING: No record for point (cat = 72)

WARNING: No record for point (cat = 73)

WARNING: No record for point (cat = 74)

WARNING: No record for point (cat = 75)

WARNING: No record for point (cat = 76)

WARNING: No record for point (cat = 77)

WARNING: No record for point (cat = 78)

WARNING: No record for point (cat = 79)

WARNING: No record for point (cat = 80)

WARNING: No record for point (cat = 81)

WARNING: No record for point (cat = 82)

WARNING: No record for point (cat = 83)

WARNING: No record for point (cat = 84)

WARNING: No record for point (cat = 85)

WARNING: No record for point (cat = 86)

WARNING: No record for point (cat = 87)

WARNING: No record for point (cat = 88)

WARNING: No record for point (cat = 89)

WARNING: No record for point (cat = 90)

WARNING: No record for point (cat = 91)

WARNING: No record for point (cat = 92)

WARNING: No record for point (cat = 93)

WARNING: No record for point (cat = 94)

WARNING: No record for point (cat = 95)

WARNING: No record for point (cat = 96)

WARNING: No record for point (cat = 97)

WARNING: No record for point (cat = 98)

WARNING: No record for point (cat = 99)

WARNING: No record for point (cat = 100)

WARNING: No record for point (cat = 101)

WARNING: No record for point (cat = 102)

WARNING: No record for point (cat = 103)

WARNING: No record for point (cat = 104)

WARNING: No record for point (cat = 105)

WARNING: No record for point (cat = 106)

WARNING: No record for point (cat = 107)

WARNING: No record for point (cat = 108)

WARNING: No record for point (cat = 109)

WARNING: No record for point (cat = 110)

WARNING: No record for point (cat = 111)

WARNING: No record for point (cat = 112)

WARNING: No record for point (cat = 113)

WARNING: No record for point (cat = 114)

0 points loaded

ERROR: No points found

Luís

Sent with ProtonMail Secure Email.


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Dear Anna,

thank you for the reply, indeed once I added the column parameter the module completed successfully. The manual includes the following on this parameter:

column=name

Name of attribute column with values to interpolate

If not given and input is 2D vector map then category values are used. If input is 3D vector

map then z-coordinates are used.

···

If I read that correctly, the module should pick up the “value” column by defualt. This particular layer was created by GRASS itself and includes a “value” column:

v.info -c soil_map_rcl_no_water

Displaying column types/names for database connection of layer <1>:

INTEGER|cat

INTEGER|value

CHARACTER|label

It is now clear this is not the case, v.surf.idw is seeking another column by default, one that is not created by vector creating modules. Perhaps this could be made more explicit in the manual page.

Thank you.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Friday, April 16, 2021 3:33 PM, Anna Petrášová kratochanna@gmail.com wrote:

Hi Luis,

could be because you haven’t provided the attribute column. It should probably fail with a message in this case…

Anna

Luís

Sent with ProtonMail Secure Email.

Dear Luis,

El lun, 19 abr 2021 a las 8:45, Luí­s Moreira de Sousa via grass-user (<grass-user@lists.osgeo.org>) escribió:

Dear Anna,

thank you for the reply, indeed once I added the column parameter the module completed successfully. The manual includes the following on this parameter:

column=name

Name of attribute column with values to interpolate

If not given and input is 2D vector map then category values are used. If input is 3D vector

map then z-coordinates are used.

If I read that correctly, the module should pick up the “value” column by defualt. This particular layer was created by GRASS itself and includes a “value” column:

I might be biased, but the description is clear to me: provide the name of a column that contains the values/quantities that will be used to interpolate. If you do not provide a column name, cat will be used (i.e., the IDs) in a 2D vector, or the z column in a 3D vector.

v.info -c soil_map_rcl_no_water

Displaying column types/names for database connection of layer <1>:

INTEGER|cat

INTEGER|value

CHARACTER|label

It is now clear this is not the case, v.surf.idw is seeking another column by default, one that is not created by vector creating modules.

It does not seek for another column, it defaults to cat if you do not provide a column name where the variable you want to interpolate is. It would be annoying, IMO, if I was forced to name a column value just because a module only takes that name. Also, there might be many columns with quantities/values in the attr table of a vector. How is the module supposed to know which one to use, if the user does not provide a name?

Perhaps this could be made more explicit in the manual page.

Maybe the fact that value appears in the description and your column is called value triggered the confusion?

We really appreciate any suggestions on how to improve the wording to make it clearer.

Best,

Vero

[bringing the issue back to the list for reference]

Dear Luis,

Thanks for your feedback!

If you didn’t provide a column name, and the module didn’t fall back to the cat column as it is supposed to, please report it as a bug (ideally with a reproducible example). According to the manual and my very little understanding of the c code, it should.

All the best,

Vero

El lun, 19 abr 2021 a las 16:00, Luí­s Moreira de Sousa (<luis.de.sousa@protonmail.ch>) escribió:

Hi Vero,

from what I understand the module is seeking neither the value column, not the cat column. This map was created with r.to.vect, these are its attributes:

v.info -c soil_map_rcl_no_water

Displaying column types/names for database connection of layer <1>:

INTEGER|cat

INTEGER|value

CHARACTER|label

If v.surf.idw was indeed seeking the cat column I would expect the module to succeed with this input, producing a nice Voronoi map.

My suggestion would be to explicitly reference the name of the default column/attribute in the manual.

Thank you.

Luís

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Monday, April 19, 2021 1:56 PM, Veronica Andreo <veroandreo@gmail.com> wrote:

Dear Luis,

El lun, 19 abr 2021 a las 8:45, Luí­s Moreira de Sousa via grass-user (<grass-user@lists.osgeo.org>) escribió:

Dear Anna,

thank you for the reply, indeed once I added the column parameter the module completed successfully. The manual includes the following on this parameter:

column=name

Name of attribute column with values to interpolate

If not given and input is 2D vector map then category values are used. If input is 3D vector

map then z-coordinates are used.

If I read that correctly, the module should pick up the “value” column by defualt. This particular layer was created by GRASS itself and includes a “value” column:

I might be biased, but the description is clear to me: provide the name of a column that contains the values/quantities that will be used to interpolate. If you do not provide a column name, cat will be used (i.e., the IDs) in a 2D vector, or the z column in a 3D vector.

v.info -c soil_map_rcl_no_water

Displaying column types/names for database connection of layer <1>:

INTEGER|cat

INTEGER|value

CHARACTER|label

It is now clear this is not the case, v.surf.idw is seeking another column by default, one that is not created by vector creating modules.

It does not seek for another column, it defaults to cat if you do not provide a column name where the variable you want to interpolate is. It would be annoying, IMO, if I was forced to name a column value just because a module only takes that name. Also, there might be many columns with quantities/values in the attr table of a vector. How is the module supposed to know which one to use, if the user does not provide a name?

Perhaps this could be made more explicit in the manual page.

Maybe the fact that value appears in the description and your column is called value triggered the confusion?

We really appreciate any suggestions on how to improve the wording to make it clearer.

Best,

Vero

On Mon, Apr 19, 2021 at 10:24 AM Veronica Andreo <veroandreo@gmail.com> wrote:

[bringing the issue back to the list for reference]

Dear Luis,

Thanks for your feedback!

If you didn’t provide a column name, and the module didn’t fall back to the cat column as it is supposed to, please report it as a bug (ideally with a reproducible example). According to the manual and my very little understanding of the c code, it should.

Vero is right, I tested it and it does work as the manual describes, using the values of categories in your case.

Anna

All the best,

Vero

El lun, 19 abr 2021 a las 16:00, Luí­s Moreira de Sousa (<luis.de.sousa@protonmail.ch>) escribió:

Hi Vero,

from what I understand the module is seeking neither the value column, not the cat column. This map was created with r.to.vect, these are its attributes:

v.info -c soil_map_rcl_no_water

Displaying column types/names for database connection of layer <1>:

INTEGER|cat

INTEGER|value

CHARACTER|label

If v.surf.idw was indeed seeking the cat column I would expect the module to succeed with this input, producing a nice Voronoi map.

My suggestion would be to explicitly reference the name of the default column/attribute in the manual.

Thank you.

Luís

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Monday, April 19, 2021 1:56 PM, Veronica Andreo <veroandreo@gmail.com> wrote:

Dear Luis,

El lun, 19 abr 2021 a las 8:45, Luí­s Moreira de Sousa via grass-user (<grass-user@lists.osgeo.org>) escribió:

Dear Anna,

thank you for the reply, indeed once I added the column parameter the module completed successfully. The manual includes the following on this parameter:

column=name

Name of attribute column with values to interpolate

If not given and input is 2D vector map then category values are used. If input is 3D vector

map then z-coordinates are used.

If I read that correctly, the module should pick up the “value” column by defualt. This particular layer was created by GRASS itself and includes a “value” column:

I might be biased, but the description is clear to me: provide the name of a column that contains the values/quantities that will be used to interpolate. If you do not provide a column name, cat will be used (i.e., the IDs) in a 2D vector, or the z column in a 3D vector.

v.info -c soil_map_rcl_no_water

Displaying column types/names for database connection of layer <1>:

INTEGER|cat

INTEGER|value

CHARACTER|label

It is now clear this is not the case, v.surf.idw is seeking another column by default, one that is not created by vector creating modules.

It does not seek for another column, it defaults to cat if you do not provide a column name where the variable you want to interpolate is. It would be annoying, IMO, if I was forced to name a column value just because a module only takes that name. Also, there might be many columns with quantities/values in the attr table of a vector. How is the module supposed to know which one to use, if the user does not provide a name?

Perhaps this could be made more explicit in the manual page.

Maybe the fact that value appears in the description and your column is called value triggered the confusion?

We really appreciate any suggestions on how to improve the wording to make it clearer.

Best,

Vero


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Dear all,

I opened a new issue with a simple example:

https://github.com/OSGeo/grass/issues/1547

Thank you for the replies.

···

Luís

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Monday, April 19, 2021 4:53 PM, Anna Petrášová kratochanna@gmail.com wrote:

On Mon, Apr 19, 2021 at 10:24 AM Veronica Andreo <veroandreo@gmail.com> wrote:

[bringing the issue back to the list for reference]

Dear Luis,

Thanks for your feedback!

If you didn’t provide a column name, and the module didn’t fall back to the cat column as it is supposed to, please report it as a bug (ideally with a reproducible example). According to the manual and my very little understanding of the c code, it should.

Vero is right, I tested it and it does work as the manual describes, using the values of categories in your case.

Anna

All the best,

Vero

El lun, 19 abr 2021 a las 16:00, Luí­s Moreira de Sousa (<luis.de.sousa@protonmail.ch>) escribió:

Hi Vero,

from what I understand the module is seeking neither the value column, not the cat column. This map was created with r.to.vect, these are its attributes:

v.info -c soil_map_rcl_no_water

Displaying column types/names for database connection of layer <1>:

INTEGER|cat

INTEGER|value

CHARACTER|label

If v.surf.idw was indeed seeking the cat column I would expect the module to succeed with this input, producing a nice Voronoi map.

My suggestion would be to explicitly reference the name of the default column/attribute in the manual.

Thank you.

Luís

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Monday, April 19, 2021 1:56 PM, Veronica Andreo <veroandreo@gmail.com> wrote:

Dear Luis,

El lun, 19 abr 2021 a las 8:45, Luí­s Moreira de Sousa via grass-user (<grass-user@lists.osgeo.org>) escribió:

Dear Anna,

thank you for the reply, indeed once I added the column parameter the module completed successfully. The manual includes the following on this parameter:

column=name

Name of attribute column with values to interpolate

If not given and input is 2D vector map then category values are used. If input is 3D vector

map then z-coordinates are used.

If I read that correctly, the module should pick up the “value” column by defualt. This particular layer was created by GRASS itself and includes a “value” column:

I might be biased, but the description is clear to me: provide the name of a column that contains the values/quantities that will be used to interpolate. If you do not provide a column name, cat will be used (i.e., the IDs) in a 2D vector, or the z column in a 3D vector.

v.info -c soil_map_rcl_no_water

Displaying column types/names for database connection of layer <1>:

INTEGER|cat

INTEGER|value

CHARACTER|label

It is now clear this is not the case, v.surf.idw is seeking another column by default, one that is not created by vector creating modules.

It does not seek for another column, it defaults to cat if you do not provide a column name where the variable you want to interpolate is. It would be annoying, IMO, if I was forced to name a column value just because a module only takes that name. Also, there might be many columns with quantities/values in the attr table of a vector. How is the module supposed to know which one to use, if the user does not provide a name?

Perhaps this could be made more explicit in the manual page.

Maybe the fact that value appears in the description and your column is called value triggered the confusion?

We really appreciate any suggestions on how to improve the wording to make it clearer.

Best,

Vero


grass-user mailing list

grass-user@lists.osgeo.org

https://lists.osgeo.org/mailman/listinfo/grass-user

Dear Luís,

On Wed, Apr 21, 2021 at 8:47 AM Luí­s Moreira de Sousa via grass-user
<grass-user@lists.osgeo.org> wrote:

Dear all,

I opened a new issue with a simple example:
https://github.com/OSGeo/grass/issues/1547

Anna has fixed the issue.
It has also been backported to the upcoming GRASS GIS 7.8.6.

Best,
Markus