Description Usage Arguments Details Author(s) References Examples
projView maps existing local or online tiles in the choosen target projection. The first raster tile is taken for the default background.
1 |
x |
a |
zcol |
attribute name(s) or column number(s) in attribute table of the column(s) to be rendered |
color |
color (palette) for points/polygons/lines |
na.color |
color for missing values |
map.types |
an obligate list of map tiles see details |
cex |
attribute name(s) or column number(s) in attribute table of the column(s) to be used for defining the size of circles |
lwd |
line width |
alpha |
opacity of the lines or points |
legend |
should a legend be plotted |
legend.opacity |
opacity of the legend |
verbose |
should some details be printed during the process |
use.layer.names |
should layer names of the Raster* object be used? |
layer.name |
the name of the overlay layer to be shown on the map |
popup |
a character vector of the HTML content for the popups. See
|
internalList |
default is FALSE if set to TRUE it is possible to pipe a command with externalList |
externalList |
list of two strings first item is the keyword for the kind of data (currently just "arctic-nasa" is implemented, second is the R command to be evaluated. example: externalList = c("arctic-nasa","visEarthPole(groupList='1000',dateString='2014-02-04',createList = TRUE)")) |
values |
a vector of values for the visualisation of the layers. Per default these are calculated based on the supplied raster* object. |
Please note: If you use in the list ovlBounds coordinates with
numbers that are bigger then Latitude/Longitude values would be (i.e.
-180/+180, -90/+90), projView assumes that you are providing *correct*
extend coordinates and will not touch them. This can be helpful if the
transformation fails for projections that are not "common" or well described
by an EPSG, ESRI or other code. Otherwise it construct a rectangle and
project the coordinates towards the target system.
For all other
information please have a look at the vignette or at the online help of
projView
Chris Reudenbach
Online maps and tile services:
NASA EarthData project: NASA EOSDIS GIBS
Conservation of Arctic Fauna and Flora: CAFF, The CAFF Geoserver
ArcticConnect project using their ArcticWebMap server.
Environmental maps from the Authorithy of Mecklenburg-Vorpommern L-MV
Swedish Agency for Marine and Water Management (Havs- och vattenmyndigheten): HAV
For the used overlay data see: campsQ2
, roadsGRL
JS libraries:
Leaflet 0.7.7: Leaflet
The kartena projection plugin for leaflet: Proj4Leaflet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ## Not run:
## packages
require(mapview)
require(raster)
## load data of the arctic stations
data("campsQ2")
## load Greenlands roads data from geofabrik
data("roadsGRL")
## We need to define online data providers. this is a bit tricky and yields sometimes just frustration...
## under details you'll find a link for further explanations.
## The map.typeList as provided contains five examples. 2 OSM and 3 WMS services
data("map.types")
### finally let's start mapping
## map the antarctic facilities data using the NASA EarthData tiles
projView(campsQ2, map.types= map.types$NASA)
## same as before but now using the visEarthPole function as a "plugin"
projView(campsQ2, map.types= map.types$NASA,
internalList =TRUE,
externalList = c("arctic-nasa","visEarthPole(groupList='1000',dateString='2014-02-04',createList = TRUE)"))
### similiar job in the North
## map Greenland's roads using the CAFF tiles for sea and landsurface temerature
mapview::projView(roadsGRL, map.types= map.types$CAFF)
## again Greenland's roads using the HAV map tiles
mapview::projView(roadsGRL, map.types= map.types$HAV)
## reproject HAV and roadsGRL to EPSG:3995
map.types$HAV$params$t_srs <- "+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs"
map.types$HAV$params$t_epsg <- "EPSG:3995"
mapview::projView(roadsGRL, map.types= map.types$HAV)
## move center
map.types$HAV$params$mapCenter$cLon="70"
map.types$HAV$params$mapCenter$cLat="15"
mapview::projView(roadsGRL, map.types= map.types$HAV)
## load the list of the above example
data("map.types")
## map the ArcticConnect map
mapview::projView(roadsGRL, map.types = map.types$AC)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.