[R-sig-Geo] Projected SpatialLinesDataFrame has a segment spanning the globe
Andy South
southandy at gmail.com
Fri Nov 1 20:59:31 CET 2013
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
More information about the R-sig-Geo
mailing list