Skip to content
Prev 7274 / 29559 Next

Close Spatial Lines into a Polygon

On Wed, 30 Dec 2009, Rodrigo Aluizio wrote:

            
The general answer is in chunks 66 and 71 in the code from our book, see:

http://www.asdar-book.org/book/cm_mod.R

That leaves one small unclosed island in the NE, plus the coastline. If 
you want to colour the land, you need to close these two manually to the 
E, N, and S bounding box values, and something extra to the west, probably 
by extracting and re-inserting the coords slots of the two "Line" objects.

Hope this helps,

Roger