Opened 12 years ago

Last modified 6 years ago

#1001 new enhancement

Add option to replace (instead of just add) cats with v.category

Reported by: needelsd Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Vector Version: 6.4.0 RCs
Keywords: v.category add del replace cats Cc:
CPU: Unspecified Platform: Unspecified

Description (last modified by martinl)

Add an option to v.category option=replace that overwrites the cat values in a vector instead of only adding a cat to objects that do not already have a cat.

Equivalent to

v.category input=input_vector output=tmp option=del
v.category input=tmp output=output_vector option=add
g.remove vect=tmp

Personally, I would also appreciate a flag [-r]?? or other mechanism to overwrite cats in the original vector (allow output=input).

Change History (4)

comment:1 Changed 12 years ago by hamish

aka v.edit?

comment:2 Changed 12 years ago by martinl

Description: modified (diff)

comment:3 Changed 12 years ago by needelsd

aka v.edit?

As far as I can tell the v.edit tool=catadd does not replace cats. It appears to append the same one or more cats designated by cats= to every feature selected by ids=, but without incrementing the cat value.

Is there a way to tell v.edit to add sequential cat numbers or to replace an existing cat with a new one?

But v.edit does make changes to the original file. Also, the tool=catdel ids=1-9999 cats=1-9999 does delete all multiple cats associated with individual selected vector features.

comment:4 Changed 6 years ago by neteler

Note: See TracTickets for help on using tickets.