Closed SymbolixAU closed 6 years ago
sf
appears to do the same
sf <- sf::st_read('{"type":"Feature","properties":{"prop0":{"foo":"bar"}},"geometry":{"type":"Point","coordinates":[0,0]}}')
str(sf)
# Classes ‘sf’ and 'data.frame': 1 obs. of 2 variables:
# $ prop0 : Factor w/ 1 level "{ \"foo\": \"bar\" }": 1
# $ geometry:sfc_POINT of length 1; first list element: Classes 'XY', 'POINT', 'sfg' num [1:2] 0 0
# - attr(*, "sf_column")= chr "geometry"
# - attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA
# ..- attr(*, "names")= chr "prop0"
sf
Simple feature collection with 1 feature and 1 field
geometry type: POINT
dimension: XY
bbox: xmin: 0 ymin: 0 xmax: 0 ymax: 0
epsg (SRID): 4326
proj4string: +proj=longlat +datum=WGS84 +no_defs
prop0 geometry
1 { "foo": "bar" } POINT (0 0)
If sf
changes behaviour I will reopen this issue
e.g.
v0.2 converts the
prop0
object to a 'string' (initially for speed and convenience).sf
?