geo_get_coords: Get coordinates

View source: R/get_coord.R

geo_get_coordsR Documentation

Get coordinates

Description

Get coordinates

Usage

geo_get_coords(x)

Arguments

x

geojson string

Details

You can use jsonlite to convert the output to R objects

Value

a character vector with coordinates as JSON

Examples

## Not run: 
x <- '{"type": "Feature", "geometry": {"type": "Point","coordinates": [1, 2]},"properties": {}}'
geo_get_coords(x)
x <- '{"type": "Point", "coordinates": [1, 2]}'
geo_get_coords(x)
x <- '[0, 5]'
geo_get_coords(x)

## End(Not run)

ropenscilabs/geoops documentation built on Nov. 8, 2024, 4:01 a.m.