fixCoastwrap function

Correct the Wrapping problem

Correct the Wrapping problem

Correct wrapping for GEOmaps

fixCoastwrap(Z, maxdis = 100)

Arguments

  • Z: list of x, y
  • maxdis: maximum distance for differences

Details

Based on mapswrap program

Returns

List: - x: x-coordinates (longitudes)

  • y: y-coordinates (latitudes)

Author(s)

Jonathan M. Leesjonathan.lees@unc.edu

Examples

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))
  • Maintainer: Jonathan M. Lees
  • License: GPL (>= 2)
  • Last published: 2024-07-09

Useful links