[GRASS-dev] Re: [GRASS-user] v.clean tool=prune - 'thresh' interpreted wrong?

Dylan Beaudette dylan.beaudette at gmail.com
Wed Oct 4 13:08:07 EDT 2006


On Wednesday 04 October 2006 02:58, Markus Neteler wrote:
> On Wed, Oct 04, 2006 at 11:53:59AM +0200, Maciej Sieczka wrote:
> > Moritz Lennert wrote:
>
> ...
>
> > > I don't think that the prune tool was ever thought to work this way.
> >
> > You don't know how it works. Then how do you know how it doesn't work :)
> > ?
>
> I made numerous tests in the past and it rarely worked as expected.
>
> It also fails completely in LatLong since threshold is literally
> taking the degree coords to calculate distances while it should be
> the geodetic distance (as -m flag in g.region does).
>
> Markus
>

This looks like a good opportunity to replace the "prune" option with the DP 
algorithm from the GMT source. As mentioned previously, the actual source 
code is quite compact. From what I can tell it would only require a couple 
things:

1. incorporation of GRASS data types (maybe, as it works with list of 
coordinates)
2. removal of Lat/long -> kilometer conversions  : i.e. generalize and add 
CASE statements for cartesian vs. spherical coordinates
3. testing

Anyone have others to add? 

Quoting Markus, here is the link;
http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version1.3/
-> gshhs_1.5_src.tbz
   -> gshhs/gshhs_dp.c


cheers,

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-dev mailing list