On Wed, Mar 07, 2007 at 04:10:54PM +1300, Hamish wrote:
>
> Is there a way to re-assign cat numbers to the areas in my map so that
> I can give them unique names? Ideally without having to repeat the
> v.patch step, as I've spent a couple hours doing d.what.rast editing!
when it patches them, does it create two layers? (no idea, but it might)
see v.reclass to reassign the cat column.
see v.to.db to populate columns from map features, also v.distance.
Thanks both of you for your suggestions. I used v.category to add a
new cat, which I had to add in a separate layer, and then added it to
the database for the vector:
v.category input=na_ecoregions output=na_ecoregions_cats option=add
layer=3 --overwrite
v.to.db map=na_ecoregions_cats layer=3 option=cat
v.db.connect map=na_ecoregions_cats layer=3 table=na_ecoregions_cats
The output of a
typical d.what.vect is:
map: 'select_ecoregions'
mapset: 'tyler'
feature type: Centroid
Layer: 1
category: 77
driver: dbf
database: /home/tyler/grassdata/worldclim/tyler/dbf/
table: select_ecoregions_1
key column: cat
cat : 77
reg_name : Northern Lakes and Forests
Layer: 3
category: 912
driver: dbf
database: /home/tyler/grassdata/worldclim/tyler/dbf/
table: select_ecoregions_3
key column: cat
cat : 912
reg_name :
Is there a way to transfer the reg_name field from layer 1 to layer 3?
That would leave me with a handful of areas to correct manually. I
tried to use r.reclass for this:
v.reclass input=select_ecoregions output=sel_ecoreg2 column=cat
layer=3
This didn't work. The reclassed map appears to be the same as the
original map.
--
Regards,
Tyler Smith