geo_type {geojson}R Documentation

Get geometry type

Description

Get geometry type

Usage

geo_type(x)

Arguments

x

input, an object of class geojson

Examples

geo_type(point('{ "type": "Point", "coordinates": [100.0, 0.0] }'))

x <- '{ "type": "Polygon",
"coordinates": [
  [ [100.0, 0.0], [100.0, 1.0], [101.0, 1.0], [101.0, 0.0], [100.0, 0.0] ]
  ]
}'
poly <- polygon(x)

geo_type(poly)

[Package geojson version 0.3.5 Index]