[GRASS-user] Re: v.generalize for area boundaries?

Wolf wrote:

> I'll see if I can whip up an example for you.

Okay here is what I did:

r.to.vect input=geology output=test
v.generalize method=snakes input=test output=snakes

It produces nice straight lines and with method=douglas threshold=30 you
can get it even better (note that the cell size was 30m) Also note that
the method=snakes I used simply the default values for alpha and beta.

same here. [added feature=area for r.to.vect]

proposed example for the help pages based on that:
# spearfish
g.region rast=geology
r.reclass in=geology out=geology.claysand << EOF
8 = 8 claysand
EOF
r.to.vect in=geology.claysand out=geology_claysand feature=area
v.generalize in=geology_claysand out=geology_claysand_smooth method=snakes

ah, I see the problem now, I need to run v.build.polylines first, then
it works ok. Problematic vector attached.

Hamish:

  http://users.ox.ac.uk/~orie1848/tutorial.html
   (we should move that to the wiki before it disappears)

Wolf:

That page and the images exists in the svn too.

where in svn?

How does one go about adding extra manual pages?

what kind of man page did you have in mind?

Or perhaps we could integrate it into the manual page itself?

the module man page is already quite large. There are so many options,
I'd prefer a wiki page with an explanation & example (incl screenshots)
of each method. The tutorial at users.ox.ac.uk is a great start for that.
It is extensive enough that I think retaining a separate tutorial is
justified.

Helena:

I would strongly suggest to integrate at least the most important
info into the man page. Nobody maintains tutorials and other extra
docs and they become quickly obsolete. Also many people use man pages
so there is a better change of fixing / enhancing explanations if
necessary,

2c: I believe the wiki is alive enough that it gets maintained.
It is not as integrated & strictly updated, but not collecting dust
like the GDP in the web pages either.

Also images are not seen by `man`, add significantly to the bulk of
the source distribution, and integrate nicely in MediaWiki.

for v.generalize the bare description.html file is already 250 lines long,
so presumably already contains most important info. (although no examples)

thanks,
Hamish

(attachments)

blocky.vasc.gz (8.3 KB)

On 18.02.2009 06:05, Hamish wrote:

Wolf wrote:

proposed example for the help pages based on that:
# spearfish
g.region rast=geology
r.reclass in=geology out=geology.claysand << EOF
8 = 8 claysand
EOF
r.to.vect in=geology.claysand out=geology_claysand feature=area
v.generalize in=geology_claysand out=geology_claysand_smooth method=snakes

ah, I see the problem now, I need to run v.build.polylines first, then
it works ok. Problematic vector attached.

Yes, v.generalize doesn't move the endpoints, and if a boundary consists
of multiple lines consisting of two points, nothing will happen. Also
note that there is a potential problem with generalizing boundaries:

If you have

+-----##------+
| |
| +----+
| |#-----------------+
| +----+ |
| | |
+-------------+#------------+

Tolerance --------

could become like this, where # is the end of a line:

+-----##------+
| |
| |
| #-----|-------------+
| | |
| | |
+-------------+#------------+

Because the crooked part is generalized away and that points re not
connected. To solve this you need to break the line at intersections (so
that the intersections stay in place.

Hamish:

  http://users.ox.ac.uk/~orie1848/tutorial.html
   (we should move that to the wiki before it disappears)

Wolf:

That page and the images exists in the svn too.

where in svn?

Hmm... apparently not! :frowning: I was sure. I could add it though... So yes it
should be copied somewhere safe.

How does one go about adding extra manual pages?

what kind of man page did you have in mind?

I meant in addition to the current description.html how do you add
another? is it possible? What about images? how do you add them?

Or perhaps we could integrate it into the manual page itself?

the module man page is already quite large. There are so many options,
I'd prefer a wiki page with an explanation & example (incl screenshots)
of each method. The tutorial at users.ox.ac.uk is a great start for that.
It is extensive enough that I think retaining a separate tutorial is
justified.

Sounds good! Go for it! :smiley:

Helena:

I would strongly suggest to integrate at least the most important
info into the man page. Nobody maintains tutorials and other extra
docs and they become quickly obsolete. Also many people use man pages
so there is a better change of fixing / enhancing explanations if
necessary,

2c: I believe the wiki is alive enough that it gets maintained.
It is not as integrated & strictly updated, but not collecting dust
like the GDP in the web pages either.

Also images are not seen by `man`, add significantly to the bulk of
the source distribution, and integrate nicely in MediaWiki.

for v.generalize the bare description.html file is already 250 lines long,
so presumably already contains most important info. (although no examples)

FWIW I agree with Hamish.

--Wolf

--

<:3 )---- Wolf Bergenheim ----( 8:>