[GRASSLIST:3679] Re: v.extract (5.7) doesn't work on extra fields?

Radim Blazek blazek at itc.it
Wed Jun 16 03:58:42 EDT 2004


On Tuesday 15 June 2004 21:05, William K wrote:
> so if I used: (assuming the tables are sorted correctly so that _2.cat
> = _3.cat)
>
> field=3 where "ZCTA != ''"
>
> would it also dissolve by ZCTA?  or just select?  I tried where once
> with no luck, but I was selecting on the cat column (where "cat > 0"),
> so of course there was no difference.  Or maybe not because ZCTA5 is
> varchar?  oh, that's probably why you did the whole reclass thing in
> the first place - dissolve only works on the cat.
>
> oh, but that would be nice for dissolve...

It will not work for 2 reasons:
1) There are no geometrical elements with field 3, because
   the layer 'Polygon' is a layer without geometry. You can check this 
   if you run "v.category map=tgr option=report"
   So first you have to relink field 2 to the table tgr_3 :
   v.db.connect -o map=tgr field=2 table=tgr_3 key=cat
2) Dissolving is based on the output categories. If 2 adjacent areas have
   the same output category, the boundary is removed. It does not make sense
   to dissolve a boundary between areas with different output category.
   v.extract field=2 where "ZCTA != ''" 
   extracts all areas and if
   'new=-1' original category is kept -> nothing dissolved as cats are unique
   or if 
   'new=1'  all areas have cat 1 and result is one area.


Radim




More information about the grass-user mailing list