geo_bbox_polygon: BBOX polygon

Description Usage Arguments Value Examples

View source: R/bbox_polygon.R

Description

Takes a bbox and returns an equivalent Feature<Polygon>

Usage

1

Arguments

bbox

extent in [minX, minY, maxX, maxY] order

Value

Feature<Polygon> a Polygon representation of the bounding box

Examples

1
2
3
geo_bbox_polygon(c(0, 0, 10, 10))
geo_bbox_polygon(c(-90, -30, -70, -10))
geo_bbox_polygon(c(0, 0, 10, 10))

Example output

[1] "{\"geometry\":{\"coordinates\":[[[0.0,0.0],[10.0,0.0],[10.0,10.0],[0.0,10.0],[0.0,0.0]]],\"type\":\"Polygon\"},\"properties\":{},\"type\":\"Feature\"}"
[1] "{\"geometry\":{\"coordinates\":[[[-90.0,-30.0],[-70.0,-30.0],[-70.0,-10.0],[-90.0,-10.0],[-90.0,-30.0]]],\"type\":\"Polygon\"},\"properties\":{},\"type\":\"Feature\"}"
[1] "{\"geometry\":{\"coordinates\":[[[0.0,0.0],[10.0,0.0],[10.0,10.0],[0.0,10.0],[0.0,0.0]]],\"type\":\"Polygon\"},\"properties\":{},\"type\":\"Feature\"}"

geoops documentation built on July 1, 2020, 10:39 p.m.