[GRASSLIST:3807] Re: Vector Manipulation

Christoph Simon ciccio at kiosknet.com.br
Fri May 31 09:50:53 EDT 2002


On Fri, 31 May 2002 15:35:38 +0200
Radim Blazek <blazek at itc.it> wrote:

> You started with the most dificult task (using "ready for use" data :)

Hm. In my dayjob I'm a programmer and have a good time playing with
this ;)

> For this task my proposal is not useful.
> You would need v.cutter with inverted function, which is not
> available. In theory, should be possible to add rectangle to
> the map with boundary of area you want to cut out, then label
> area between your potato and rectangle and use v.cutter to extract
> lines in this labeled area.

I was looking at the code of v.rmedges as in one particular case it
does just the contrary of what I needed. Unfortunately, I didn't
understand the code as I couldn't find the description of the data
structure used. But there is an if-construct which seemed to be the
condition that the vertices are written to the destination map (i.e.,
they are not the border). I introduced a new flag -r (reverse) and
inverted the condition in case it is set. This did work, but it broke
my whole grass installation: no matter what grass module I called
(including grass5), it was always that program which started. Then I
found out, that I had forgotten to run gmakelinks5, but doing so by
then didn't help. I had to recompile the whole lot.

But what I think would really be necessary is a v.mapcalc, able to
operate on vertex coordinates as well as the segments themselves. I am
not familiar enough with grass to judge the usefulness of this for
most users, but my guess is, that many would benefit from it. Although
I have a clear idea how it should work, I'm far from understanding
grass to write it myself. This would make certain things very easy.

-- 
Christoph Simon
ciccio at kiosknet.com.br
---
^X^C
q
quit
:q
^C
end
x
exit
ZZ
^D
?
help
.



More information about the grass-user mailing list