Skip to content
Prev 607 / 29559 Next

convertion to polygon for coloring, shading

On Sat, 1 Oct 2005, Sebastian Luque wrote:

            
So the origin was a map of rings that has been clipped (by a rectangle?)? 
Could you try to simplify this for testing purposes to a small number of 
shapes (a much smaller rectangle) and let me see it? I've written a small 
functio using sp classes that just rbind()'s the line coordinates with the 
first coordinate if the first and last are not identical. It may work, if 
the lines start and stop on the same rectangle edge (but will not if they 
are on different edges). 

If the lines go outside the rectangle a little, the same approach will
work, but will need clipping with functions in spgpc on r-spatial, not a
big problem. If the rectangle is known, it could be given to the function
as an argument, which would maybe allow the corner case to be handled too.

Roger