[R-sig-Geo] Truncating polygons in R

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Thu Apr 6 17:21:52 CEST 2006


Gregory Snow wrote:
> I have one suggested extension to Barry's idea.
> 
> With Barry's idea the polygons will all be inside the square, but there
> will be some area in the square that is not inside any of the polygons.
> If you want the entire square to be included within the polygons then
> take Barrys Idea of projecting the points perpendicular to the sides,
> but instead of projecting them onto the sides, project them beyond that
> side so that they are the same distance from the side of the square.
> Then the set of points that are equal distance from the projected point
> and the original point will fall along the border of the square.

  Nice.

  I implemented my method this afternoon and one thing I hadn't expected 
was that it can generate disconnected polygons! If you have a point over 
in a corner with not much near it the guard points round the edges can 
cut it off from the rest of the data points. Obviously the tessalation 
as a whole is connected, but when you drop the guard points' polygons 
you get an island. I suspect Greg's technique can't do that since the 
whole square is filled with polygons from your data points.

  Fun.

Barry




More information about the R-sig-Geo mailing list