fixCoastwrap: Correct the Wrapping problem

Description Usage Arguments Details Value Author(s) Examples

View source: R/fixCoastwrap.R

Description

Correct wrapping for GEOmaps

Usage

1
fixCoastwrap(Z, maxdis = 100)

Arguments

Z

list of x, y

maxdis

maximum distance for differences

Details

Based on mapswrap program

Value

List:

x

x-coordinates (longitudes)

y

y-coordinates (latitudes)

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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))

GEOmap documentation built on May 2, 2019, 8:56 a.m.