[R] Concave Hull?

Dave Roberts droberts at montana.edu
Thu May 4 20:04:41 CEST 2006


Those are pretty interesting approaches Ted.  An alternative is to 
establish a maximum length for any segment and delete all segments 
longer than that.  Then, find the shortest connected path such that no 
segments are longer than your threshold.  In many cases this would 
result in the same polygon as some of your methods, but it eliminates 
the requirement to specify the number of nodes a priori.

Dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David W. Roberts                                     office 406-994-4548
Professor and Head                                      FAX 406-994-3190
Department of Ecology                         email droberts at montana.edu
Montana State University
Bozeman, MT 59717-3460

(Ted Harding) wrote:
> On 02-May-06 Mike Saunders wrote:
>> I am modeling a trend surface using trmat and want to trim the
>> resulting matrix to the area enclosed by my real data (i.e.,
>> remove all the extrapolated areas).  I was using chull and
>> in.chull to calculate the convex hull and change all the other
>> values created by trmat to NA. However, my real data has portions
>> that are slightly concave so chull would give me slivers that are
>> extrapolations from my data.  Is there some other type of "chull"
>> function that will allow the resulting polygon to be slightly
>> concave?  (I can send a picture to show what I am trying to do,
>> if needed)
> 
> If I understand you correctly, what you are trying to do is not
> well-determined, though one can think of ways of achieving the
> general aim.
> 
> One approach might be to replace each segment of the convex hull
> by a circular arc, pulled perhaps towards the centroid until it
> first meets an interior point.
> 
> Or you might, for each bounding segemtn fo the convex hull:
> 
> 1: Select the nearest interior point to a boundary segment, and
>    make it the vertex of a triangle whose other two are the
>    end-points of the segment; then remove the segemnt. Or:
> 
> 2: Select the two nearest points to the segment and, along with
>    the two end-points, make the convex hull of these four points;
>    then remove the segment. Or:
> ...
> k: Select the k nearest points to the segment and make the convex
>    hull of these k+2 points; then remove the segment. ...
> 
> Come to think of it, perhaps your picture might help!
> 
> Best wishes,
> Ted.
> 
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 02-May-06                                       Time: 23:16:52
> ------------------------------ XFMail ------------------------------
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 


--




More information about the R-help mailing list