Last data update: 2014.03.03

R: Generate Isolines
lawn_isolinesR Documentation

Generate Isolines

Description

Takes data-Point's with z-values and an array of value breaks and generates isolines

Usage

lawn_isolines(points, z, resolution, breaks, lint = FALSE)

Arguments

points

Input points

z

(character) the property name in points from which z-values will be pulled

resolution

(numeric) resolution of the underlying grid

breaks

(numeric) where to draw contours

lint

(logical) Lint or not. Uses geojsonhint. Takes up increasing time as the object to get linted increases in size, so probably use by default for small objects, but not for large if you know they are good geojson objects. Default: FALSE

Value

data-FeatureCollection of isolines (data-LineString features)

See Also

Other interpolation: lawn_hex_grid, lawn_planepoint, lawn_point_grid, lawn_square_grid, lawn_tin, lawn_triangle_grid

Examples

pts <- lawn_random(n = 100, bbox = c(0, 30, 20, 50))
pts$features$properties <- data.frame(z = round(rnorm(100, mean = 5)), stringsAsFactors = FALSE)
breaks <- c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
lawn_isolines(pts, 'z', 15, breaks)

Results