Correct the Wrapping problem
Correct wrapping for GEOmaps
fixCoastwrap(Z, maxdis = 100)
Z
: list of x, ymaxdis
: maximum distance for differencesBased on mapswrap program
List: - x: x-coordinates (longitudes)
Jonathan M. Leesjonathan.lees@unc.edu
data(coastmap) SEL = which(coastmap$STROKES$nam=="AFROASIA") A = ExcludeGEOmap(coastmap, SEL, INOUT="in") plot(A$POINTS$lon, A$POINTS$lat, type='n') points(A$POINTS$lon, A$POINTS$lat, pch='.') ###### note that the map wraps around. B = fixCoastwrap(list(x=A$POINTS$lon, y=A$POINTS$lat), 100) which(is.na(B$x)) lines(B) polygon(B, col=rgb(.8,1, .8))
Useful links