Re: [GRASS-dev] [EXTERNAL] vector patching frustration

2024-03-16 Thread Vincent Bain via grass-dev
Hello Michael, sorry if I misunderstand your issue, but before patching these two maps are you sure that each has a set of cat values strictly distinct from the other? If a vector feature in map A shares the same cat value as another feature in map B then after patching these features will be

Re: [GRASS-dev] [EXTERNAL] vector patching frustration

2024-03-15 Thread Michael Barton via grass-dev
I got this to work *finally*. But there are still complications. Here is an example work flow: 1. Create a map of vector features 2. Create a basic attribute table (e.g., with v.db.addtable). 3. Export that table into a csv file using db.out.ogr 4. Add some attribute fields to that csv file 5.

Re: [GRASS-dev] [EXTERNAL] vector patching frustration

2024-03-15 Thread Michael Barton via grass-dev
Never mind. I figured it out when I saw the post. Now for the next step. Michael _ C. Michael Barton Associate Director, School of Complex Adaptive Systems (https://scas.asu.edu) Professor, School of Human Evolution & Social Change

Re: [GRASS-dev] [EXTERNAL] vector patching frustration

2024-03-15 Thread Michael Barton via grass-dev
Something is just not working here. I can't try the new PR until I can get the original cats fixed. v.category does not seem to be working as expected. I have a map with a single area. I clipped it out of another map (where it had cat=18) using v.select. When I check the categories, it looks

Re: [GRASS-dev] [EXTERNAL] vector patching frustration

2024-03-15 Thread Michael Barton via grass-dev
Thanks Huidae, Your new PR looks like it will seriously simplify patching from the complicated and non-intuitive solution and Vincent describe in current GRASS versions. Michael _ C. Michael Barton Associate Director, School of Complex Adaptive Systems

Re: [GRASS-dev] [EXTERNAL] vector patching frustration

2024-03-15 Thread Vincent Bain via grass-dev
Michael, Huidae thats's what I was just about to post... you need to care cats intervals don't overlap before patching. With the attached set of 2 vector maps you can have a try, typing : v.in.ogr input=/your/path/to/map1.gpkg output=map1 v.in.ogr input=/your/path/to/map2.gpkg output=map2

Re: [GRASS-dev] [EXTERNAL] vector patching frustration

2024-03-15 Thread Huidae Cho via grass-dev
Michael, Just confirmed your issue. v.random tmp100 npoints=100 seed=100 v.db.addtable tmp100 col="id varchar(20)" v.db.update tmp100 col=id qcol="'tmp100_' || cat" v.random tmp10 npoints=10 seed=10 v.db.addtable tmp10 col="id varchar(20)" v.db.update tmp10 col=id qcol="'tmp10_' || cat"

Re: [GRASS-dev] [EXTERNAL] vector patching frustration

2024-03-14 Thread Michael Barton via grass-dev
Thanks Doug and Vincent. None of this works. I vaguely remember having this same kind of road block several years back. Nothing in v.category lets you change an existing cat value to a different value v.in.ogr MUST add a column that MUST be named cat (all else causes an error--this is a bug)

Re: [GRASS-dev] [EXTERNAL] vector patching frustration

2024-03-14 Thread Newcomb, Doug via grass-dev
Have you tried a .csvt file for your .csv file? https://gdal.org/drivers/vector/csv.html From: grass-dev on behalf of Michael Barton via grass-dev Sent: Wednesday, March 13, 2024 7:02 PM To: GRASS developers ; GRASS user list Subject: [EXTERNAL] [GRASS-dev]