Re: [R-sig-Geo] Lines crossing Mercator projection map

2012-11-12 Thread Michael Sumner
This is happening because the maps data has data that is out of the range of [-180, 180], either from the source data itself or from the clipping somehow: range(world.map$x, na.rm = TRUE) [1] -179.9572 190.2908 You would have to carefully clean this up to make it useable, but I would just

Re: [R-sig-Geo] Lines crossing Mercator projection map

2012-11-12 Thread Roger Bivand
On Mon, 12 Nov 2012, Giuseppe Bianco wrote: Dear Mike, Thank you for your answer. I get an error with the polygons intersection: wrld.clip - gIntersection(clipPoly, wrld_simpl) Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, rgeos_intersection) : TopologyException: side location

Re: [R-sig-Geo] Lines crossing Mercator projection map

2012-11-12 Thread Giuseppe Bianco
Thank you Roger. Below what I get (didn't change after update.packages(rgeos)) library(rgeos) rgeos: (SVN revision 357) GEOS runtime version: 3.3.3-CAPI-1.7.4 Polygon checking: TRUE sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1]

[R-sig-Geo] Lines crossing Mercator projection map

2012-11-11 Thread Giuseppe Bianco
Dear List, I have been struggling all the day long with this issue but I didn't find any workaround. I would like to have exactly the map that come out from the code below but without the ugly line crossing one side to the other. world.map - map(fill=T, plot=F) IDs -