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

Wolf Bergenheim wolf+grass at bergenheim.net
Wed Feb 18 06:53:09 EST 2009


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! :( 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! :D

> 
> 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:>



More information about the grass-user mailing list