[GRASS-user] v.to.db in GRASS 7.8 requires 'overwrite' if column exists but flag is invalid

Helmut Kudrnovsky hellik at web.de
Thu Jul 16 03:34:44 PDT 2020


Mira Kattwinkel wrote
> Dear list,
> 
> 
> in GRASS 7.8 v.to.db creates a new column in contrast to previous 
> versions where it column had to exist before.
> 
> According to the manual "If the /column/ exists, the *--overwrite* flag 
> is required to overwrite it". However, this flag does not exist. Hence, 
> if the column is present, it is not upated, giving:
> 
> ERROR: Column 
> <length_new>
>  exists. To overwrite, use the --overwrite flag
> 
> When useing "overwrite", it gives:
> 
> Invalid flag value: overwrite
> 
> 
> Another issue is that even if the flag would work, it would no longer be 
> compatible with previous versions that also do not know the flag but 
> need the column to exist.
> 
> 
> Can anybody please advice me what to do?


yes there was a change in the module behaviour, see

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

I had the same issue.

regarding using this new behaviour in scripts, see e.g.

https://github.com/OSGeo/grass-addons/commit/943d9c72a51716608f6a358a40dd114e38eaa9cf

on the command line, just add --overwrite,

e.g. v.to.db --overwrite map=soils type=centroid option=area
columns=area_size unit=h

but in the v.to.db GUI, there is no overwrite available.

please open an issue about that.



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html


More information about the grass-user mailing list