Description Usage Arguments Value See Also Examples
Calculates the extent of all input features in a FeatureCollection, and returns a bounding box. The returned bounding box is of the form (west, south, east, north).
1 | lawn_extent(input, lint = FALSE)
|
input |
A data-Feature or data-FeatureCollection |
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: |
A bounding box, numeric vector of length 4, in
[ minX, minY, maxX, maxY ]
order
Other measurements:
lawn_along()
,
lawn_area()
,
lawn_bbox_polygon()
,
lawn_bbox()
,
lawn_bearing()
,
lawn_center_of_mass()
,
lawn_center()
,
lawn_centroid()
,
lawn_destination()
,
lawn_distance()
,
lawn_envelope()
,
lawn_line_distance()
,
lawn_midpoint()
,
lawn_point_on_feature()
,
lawn_pt2line_distance()
,
lawn_square()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # From a FeatureCollection
cat(lawn_data$points_average)
lawn_extent(lawn_data$points_average)
# From a Feature
dat <- '{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-112.072391,46.586591],
[-112.072391,46.61761],
[-112.028102,46.61761],
[-112.028102,46.586591],
[-112.072391,46.586591]
]]
}
}'
lawn_extent(dat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.