Nothing
#' Flip x,y to y,x, and vice versa
#'
#' @export
#' @param input [data-Feature] or [data-FeatureCollection]
#' @template lint
#' @return A [data-Feature] or [data-FeatureCollection]
#' @examples
#' # a point
#' serbia <- '{
#' "type": "Feature",
#' "properties": {"color": "red"},
#' "geometry": {
#' "type": "Point",
#' "coordinates": [20.566406, 43.421008]
#' }
#' }'
#' lawn_flip(serbia)
#'
#' # a featurecollection
#' pts <- lawn_random("points")
#' lawn_flip(pts)
#' @examples \dontrun{
#' lawn_data$points_average %>% view
#' lawn_flip(lawn_data$points_average) %>% view
#' lawn_data$polygons_average %>% view
#' lawn_flip(lawn_data$polygons_average) %>% view
#' }
lawn_flip <- function(input, lint = FALSE) {
input <- convert(input)
lawnlint(input, lint)
if (lint) is_type(input, type_top = c("Feature", "FeatureCollection"))
ct$eval(sprintf("var flp = turf.flip(%s);", input))
structure(ct$get("flp"), class = tolower(ct$get("flp.type")))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.