Learn R Programming

spocc (version 0.2.0)

wkt_vis: Visualize well-known text area's on a map.

Description

This can be helpful in visualizing the area in which you are searching for occurrences with the occ function.

Usage

wkt_vis(x, zoom = 6, maptype = "terrain", which = "interactive")

Arguments

x
Input well-known text area (character)
zoom
Zoom level, defaults to 6 (numeric)
maptype
Map type, default is terrain (character)
which
One of interactive (default) or static. Interactive open Mapbox map in your browser, and static uses ggplot based ggmap package.

Examples

Run this code
poly <- 'POLYGON((-111.06 38.84, -110.80 39.37, -110.20 39.17, -110.20 38.90,
     -110.63 38.67, -111.06 38.84))'
wkt_vis(poly)
wkt_vis(poly, which='static')

poly2 <- 'POLYGON((-125 38.4,-125 40.9,-121.8 40.9,-121.8 38.4,-125 38.4))'
wkt_vis(poly2)

Run the code above in your browser using DataLab