# NOT RUN {
pt1 <- '{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [144.834823, -37.771257]
}
}'
pt2 <- '{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [145.14244, -37.830937]
}
}'
lawn_midpoint(pt1, pt2)
# }
# NOT RUN {
lawn_midpoint(pt1, pt2) %>% view
lawn_featurecollection(list(
lawn_point(jsonlite::fromJSON(pt1)$geometry$coordinates),
lawn_point(jsonlite::fromJSON(pt2)$geometry$coordinates),
structure(lawn_midpoint(pt1, pt2), class = "point")
)) %>% view
# }
Run the code above in your browser using DataLab