[R-sig-Geo] longest distance in a polygon

Roger Bivand Roger.Bivand at nhh.no
Wed Dec 8 13:10:18 CET 2004


On Mon, 6 Dec 2004, Brian Menounos wrote:

> Hello,
> 
> I'm interested in determining the longest linear distance in an
> irregular polygon (and potentially ones with internal holes) and
> wondering if there is R code to accomplish this? My interest is to
> develop an automated procedure to calculate the effective fetch for
> lakes. In a GIS one can clip line coverage based on an irregular
> boundary to accomplish this task. The PBSmapping function 'clipLines'
> unfortunately only works with rectangles. 
> 
> Any help would be greatly appreciated.

I suggest looking at the gpclib package. I don't think the functionality 
you need is there at the level of an R function, but you may find that you 
can see how the intersect() function for polygons works. The underlying 
computational geometry library in both PBSmapping and gpclib is the same.

Roger

> 
> Thanks in advance,
> 
> Brian Menounos
> 
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list