Projected SpatialLinesDataFrame has a segment spanning the globe
rr2box42 <rr2box42 <at> gmail.com> writes:
Thanks much to you both--Edzer's suggestion does work to remove the
offending
vertex. Based on the input I managed an alternative, which is to correct the original vertex to not pass 180 degrees longitude (it's currently at 180.0000004, which is apparently the problem): ind = which(coastsCoarse <at> lines[[94]] <at> Lines[[1]] <at> coords[,1] >
180)
coastsCoarse <at> lines[[94]] <at> Lines[[1]] <at> coords[ind,1] = 180 Cheers, Ryan
Thanks both, I'll fix in the next update to rworldmap.
Edzer Pebesma-2 wrote
Please let me know where you learned that you could use coordinates() to assign coordinates to a Spatial* object.
I was just trying what seemed sensible, in sp help for coordinates() it says : Description: retrieve (or set) spatial coordinates from (for) spatial data