Random GeoJSON point

geo_point(count = 1, bbox = NULL)

Arguments

count

(integer/numeric) number of points. Default: 1

bbox

(integer/numeric) lat/long bounding box from which to generate positions; numeric vector of the form west (long), south (lat), east (long), north (lat). optional

Value

GeoJSON; a list with one ore more Points in a FeatureCollection, with class geo_list - simple unclass() to remove the class

Examples

geo_point()
#> $type #> [1] "FeatureCollection" #> #> $features #> $features[[1]] #> $features[[1]]$type #> [1] "Feature" #> #> $features[[1]]$geometry #> $features[[1]]$geometry$type #> [1] "Point" #> #> $features[[1]]$geometry$coordinates #> [1] 81.70159 -15.98413 #> #> #> $features[[1]]$properties #> NULL #> #> #> #> attr(,"class") #> [1] "geo_list"
geo_point(10)
#> $type #> [1] "FeatureCollection" #> #> $features #> $features[[1]] #> $features[[1]]$type #> [1] "Feature" #> #> $features[[1]]$geometry #> $features[[1]]$geometry$type #> [1] "Point" #> #> $features[[1]]$geometry$coordinates #> [1] -37.29242 -66.77527 #> #> #> $features[[1]]$properties #> NULL #> #> #> $features[[2]] #> $features[[2]]$type #> [1] "Feature" #> #> $features[[2]]$geometry #> $features[[2]]$geometry$type #> [1] "Point" #> #> $features[[2]]$geometry$coordinates #> [1] -72.48311 64.10523 #> #> #> $features[[2]]$properties #> NULL #> #> #> $features[[3]] #> $features[[3]]$type #> [1] "Feature" #> #> $features[[3]]$geometry #> $features[[3]]$geometry$type #> [1] "Point" #> #> $features[[3]]$geometry$coordinates #> [1] 27.42747 34.34595 #> #> #> $features[[3]]$properties #> NULL #> #> #> $features[[4]] #> $features[[4]]$type #> [1] "Feature" #> #> $features[[4]]$geometry #> $features[[4]]$geometry$type #> [1] "Point" #> #> $features[[4]]$geometry$coordinates #> [1] -134.69174 -61.19984 #> #> #> $features[[4]]$properties #> NULL #> #> #> $features[[5]] #> $features[[5]]$type #> [1] "Feature" #> #> $features[[5]]$geometry #> $features[[5]]$geometry$type #> [1] "Point" #> #> $features[[5]]$geometry$coordinates #> [1] 108.45905 -31.07149 #> #> #> $features[[5]]$properties #> NULL #> #> #> $features[[6]] #> $features[[6]]$type #> [1] "Feature" #> #> $features[[6]]$geometry #> $features[[6]]$geometry$type #> [1] "Point" #> #> $features[[6]]$geometry$coordinates #> [1] 11.723459 -5.371296 #> #> #> $features[[6]]$properties #> NULL #> #> #> $features[[7]] #> $features[[7]]$type #> [1] "Feature" #> #> $features[[7]]$geometry #> $features[[7]]$geometry$type #> [1] "Point" #> #> $features[[7]]$geometry$coordinates #> [1] -145.46646 12.90296 #> #> #> $features[[7]]$properties #> NULL #> #> #> $features[[8]] #> $features[[8]]$type #> [1] "Feature" #> #> $features[[8]]$geometry #> $features[[8]]$geometry$type #> [1] "Point" #> #> $features[[8]]$geometry$coordinates #> [1] -117.95332 -22.42363 #> #> #> $features[[8]]$properties #> NULL #> #> #> $features[[9]] #> $features[[9]]$type #> [1] "Feature" #> #> $features[[9]]$geometry #> $features[[9]]$geometry$type #> [1] "Point" #> #> $features[[9]]$geometry$coordinates #> [1] 63.07506 -63.20049 #> #> #> $features[[9]]$properties #> NULL #> #> #> $features[[10]] #> $features[[10]]$type #> [1] "Feature" #> #> $features[[10]]$geometry #> $features[[10]]$geometry$type #> [1] "Point" #> #> $features[[10]]$geometry$coordinates #> [1] -109.36097 -69.59885 #> #> #> $features[[10]]$properties #> NULL #> #> #> #> attr(,"class") #> [1] "geo_list"
geo_point(bbox = c(50, 50, 60, 60))
#> $type #> [1] "FeatureCollection" #> #> $features #> $features[[1]] #> $features[[1]]$type #> [1] "Feature" #> #> $features[[1]]$geometry #> $features[[1]]$geometry$type #> [1] "Point" #> #> $features[[1]]$geometry$coordinates #> [1] 53.87096 56.20844 #> #> #> $features[[1]]$properties #> NULL #> #> #> #> attr(,"class") #> [1] "geo_list"