[R] GIS re-mapping / polygon overlap

Ross Ihaka ihaka at stat.auckland.ac.nz
Thu Oct 23 23:13:13 CEST 2003


Jens Oehlschlägel wrote:

>   AND
>     - is there a general function in R available to map demographic data
> between two boundary systems
>     OR
>     - is there an efficient R function that can determine the amount of area
> overlap between two general polygons (beyond gpclib)
> 
> I am willing to share developed code for this problem (that's why I would
> prefer gpl code over gpclib, which is not really free)
> 
> Thanks for any help

There is pretty cool polygon intersection algorithm available at:

	http://davis.wpi.edu/~matt/courses/clipping/4th.html

with the code at:

	http://davis.wpi.edu/~matt/courses/clipping/code.html

You can pick up the paper the code is based on from kai hormann's home
page (currently):

	http://vcg.isti.cnr.it/~hormann/

The only problem with the algorithm is that it doesn't handle holes, but 
for area computations you could just join the holes to the boundary.

-- 
Ross Ihaka                         Email:  ihaka at stat.auckland.ac.nz
Department of Statistics           Phone:  (64-9) 373-7599 x 85054
University of Auckland             Fax:    (64-9) 373-7018
Private Bag 92019, Auckland
New Zealand




More information about the R-help mailing list