[GRASS-user] v.in.ascii cat column name attribution from csv file
Markus Metz
markus.metz.giswork at gmail.com
Wed Jul 5 12:47:54 PDT 2017
On Wed, Jul 5, 2017 at 11:11 AM, Annalisa Minelli <annagrass6 at gmail.com>
wrote:
>
> Hi list,
> I have a tricky question. I noticed that when importing a csv file with
v.in.ascii specifying cat column, the name of that column in the vector map
is no more "cat" but "int_1". My cvs file is without any header. Is it
normal?
If you did not provide column definitions with the columns option, yes.
> because then, when I try to patch the vector file with some others vector
files with "cat" as category column name, v.patch (obviously) says: "key
column names differ"... on the other hand, if I do not specify the cat
parameter in the import operation it creates the regular "cat" field with
progressive values - but in this way, I am obliged to delete the "int_1"
column before patching.
If you do not specify a column to be used as category values with the cat
option, a unique category value is assigned to each row and written to a
new column 'cat'.
The solution might be to specify a column to be used as category values
with the cat option and supply column definitions with the columns option
where the column to be used as category values must get the name 'cat'.
HTH,
Markus M
>
> I am on Debian 9 and grass 7.2 stable.
>
> Thanks in advance,
> Annalisa
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170705/a556e910/attachment.html>
More information about the grass-user
mailing list