[GRASS5] question about v.patch

William K woklist at charter.net
Mon Jan 31 19:05:54 EST 2005


I saw some discussion on this a while back also, but it wasn't helpful. 
  Generally, yes that's the way it works, and not much desire/time to 
change it then.

The method I use: export both with v.out.ogr to shapefile with 
different dsn's (ie streamset1 & streamset2) with the same 'layer' 
name.  Use ogr2ogr -append to add one to the other.  Import that back 
in as a new vector.  Slow and tedious, but it works for now.

It looks like v.overlay could work with the default 'or' operator, but 
unfortunately it only works on areas (according to the docs), and I 
needed to patch to point vectors when I looked into it.  Tho I never 
actually TRIED it - maybe the docs are out of date.

On Jan 31, 2005, at 5:47 PM, Michael Barton wrote:

> I thought I remembered a discussion about this in the past 2-3 months 
> but
> couldn’t find it in the archives. So I’m asking. Please excuse if this 
> has
> been answered.
>
> I’ve got a bunch of vector files of streams in a series of adjacent 
> areas
> that I want to combine into a single stream map. v.patch is the most 
> obvious
> way to do it. However, I want to append the attribute tables of the 
> vector
> files when I combine the vector shapes. That is I want to combine 
> streamset1
> with streamset2 to make streamset3. I want streamset3 to have an 
> attribute
> table with all the records of streamset1 plus all the records of 
> streamset2.
> The formats of the tables of streamset1 and streamset2 are identical. 
> The
> cats of streamset1 and streamset2 overlap (that is cat is not unique 
> across
> all the records in all the stream files).
>
> It is beginning to look like this is not possible using v.patch, 
> because
> v.patch combines the vectors (keeping the cats), but not the attribute
> tables. So here are my questions:
>
> 1. I’m I correct that this isn’t possible using v.patch?
> 2. Is there some other way to do it in GRASS? v.overlay doesn't look 
> right
> from the man page, but maybe I just don't understand the options. 
> Currently,
> I only REALLY need one of the attributes so I'm thinking that I'll 
> convert
> all to raster, using the field I want for the new raster category, then
> r.patch. However, there may well come a time when I want to combine 
> vectors
> and need more attributes.
>

-----
William Kyngesburye <kyngchaos at charter.net>
http://webpages.charter.net/kyngchaos/

"History is an illusion caused by the passage of time, and time is an 
illusion caused by the passage of history."

- Hitchhiker's Guide to the Galaxy




More information about the grass-dev mailing list