[GRASSLIST:4407] Re: v.patch problems

Paul Kelly paul-grass at stjohnspoint.co.uk
Thu Sep 23 17:46:38 EDT 2004


On Wed, 22 Sep 2004, Carlos Henrique Grohmann wrote:

> Hello all,
> I'm trying to patch some vector maps in GRASS 5.3, but there are problems. the
> maps are contours and spot heights in shape format. when I import then,
> everything is OK, the contours have the right z-value, and so the points (in
> vector format). the problem is when I try to patch them, and the final result
> comes with completely different z-values. all labels are changed.
> any ideas?

v.patch is a simple algorithm and assumes the attribute numbers correspond 
to the same category labels (I presume you have the z co-ordinates as 
category labels) in all the input maps. If they don't then the output 
will be mixed up.

If your z values are all integers greater than 0 then you can make the 
attribute number be the actual z value and don't have any category labels. 
You should be able to achieve this with careful use of the command-line 
parameters to v.in.shape I think.

If you have 0, negative or decimal values I suppose you could multiply 
them by something and add a bit on to make them positive integers, or make 
sure all your attribute numbers occupy different ranges in all the inputs 
maps or something (no idea how to do that). I've run into this problem 
lots of times and it is very awkward. I think I worked around it just by 
giving every line in each map a different attribute number. That is very 
inefficient though.


More information about the grass-user mailing list