Skip to contents

The twin of geojson_sfc(), so a place can be compared with the shared fixtures in the shape they store rather than through a library that might normalise ring order or precision on the way.

Usage

sfc_geojson(s, digits = NA)

Arguments

s

an sfc holding one POLYGON or MULTIPOLYGON

digits

decimal places to round coordinates to, or NA for none

Value

a list with type and coordinates