refocusWorld: Refocus the 'worldLL'/'worldLLhigh' Data Sets

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Refocus the worldLL/worldLLhigh data sets, e.g., refocus them so that Eastern Canada appears to the west of Western Europe.

Usage

1
refocusWorld (polys, xlim=NULL, ylim=NULL, clip.AN=TRUE)

Arguments

polys

PolySet – object with one or more polygons; typically worldLL or worldLLhigh (required).

xlim

numeric – range of X-coordinates.

ylim

numeric – range of Y-coordinates.

clip.AN

logical – if TRUE, clip expanded Antarctica to 'xlim' of refocused polygons other than Antarctica and to user-defined/default 'ylim'.

Details

This function accepts a PolySet containing one or more polygons with X-coordinates that collectively span approximately 360 degrees. The function effectively joins the PolySet into a cylinder and then splits it at an arbitrary longitude according to the user-specified limits. Modifications in the resulting PolySet are restricted to shifting X-coordinates by +/- multiples of 360 degrees, and instead of clipping polygons, the return value simply omits out-of-range polygons.

Value

PolySet, likely a subset of the input PolySet, which retains the same PID/SID values.

Note

The Antarctic polygon is treated as a special case in that it is expanded longitudinally by duplicating it to the West and East of the base polygon. The expanded Antarctica is then clipped to the limits of the plot, or not if 'clip.NA=FALSE'.

Author(s)

Nicholas M. Boers, Associate Professor – Computer Science
MacEwan University, Edmonton AB

Rowan Haigh, Program Head – Offshore Rockfish
Pacific Biological Station (PBS), Fisheries & Oceans Canada (DFO), Nanaimo BC
locus opus: Institute of Ocean Sciences (IOS), Sidney BC
Last modified Rd: 2018-10-26

See Also

joinPolys

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
local(envir=.PBSmapEnv,expr={
  oldpar = par(no.readonly=TRUE)
  #--- load appropriate data
  data(worldLL,envir=.PBSmapEnv)
  #--- set limits
  xlim <- c(-100,25)
  ylim <- c(0,90)
  #--- refocus and plot the world
  polys <- refocusWorld(worldLL, xlim, ylim)
  plotMap(polys, xlim, ylim)
  par(oldpar)
})

Example output

-----------------------------------------------------------
PBS Mapping 2.72.1 -- Copyright (C) 2003-2020 Fisheries and Oceans Canada

PBS Mapping comes with ABSOLUTELY NO WARRANTY;
for details see the file COPYING.
This is free software, and you are welcome to redistribute
it under certain conditions, as outlined in the above file.

A complete user guide 'PBSmapping-UG.pdf' is located at 
/usr/lib/R/site-library/PBSmapping/doc/PBSmapping-UG.pdf

Packaged on 2019-03-14
Pacific Biological Station, Nanaimo

All available PBS packages can be found at
https://github.com/pbs-software

To see demos, type '.PBSfigs()'.
-----------------------------------------------------------

PBSmapping documentation built on Jan. 15, 2021, 3:41 p.m.