simplify: Simplify a polygon shape by straightening out jittery lines

Description Usage Arguments Examples

View source: R/simplify.R

Description

Simplify a polygon shape by straightening out jittery lines

Usage

1
simplify(map, tol = 0.01)

Arguments

map

map object as generated by functions such as 'process_shape', 'ggplot2::map_data', or 'ggplot2::fortify'

tol

tolerance to use for simplifying the map. Larger tolerances will lead to smaller maps at lower resolutions.

Examples

1
2
3
4
states05 <- simplify(states, 0.001)
states05 %>% ggplot(aes(x = long, y = lat)) + geom_path(aes(group = group))
states01 <- simplify(states, 0.01)
states01 %>% ggplot(aes(x = long, y = lat)) + geom_path(aes(group = group))

heike/ggmapr documentation built on May 17, 2019, 3:23 p.m.