You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this cool package! I currently have a use case where I get given a long vector of polylines, and I'm wondering whether it makes sense to have one of:
A version or option for decode that produces an sf object instead of requiring the user to convert the list of dataframes themselves.
A constructor for sfencoded that does the work of creating an encoded column and sets class so that polyline_wkt %>% st_as_sf can be used.
Both of these are certainly convenience functions. I can try a PR in the next few days once I read over the code a bit also.
The text was updated successfully, but these errors were encountered:
Number 1 is certainly feasible and I think will just mean attaching sfc attributes here.
We can also add functionality so a data.frame of polylines gets decoded into an sf object.
Example data to work with
polylines<- c(
"ohlbDnbmhN~suq@am{tAw`qsAeyhGvkz`@fge}A",
"ggmnDt}wmLgc`DesuQvvrLofdDorqGtzzV"
)
## option to convert to `sfc`
decode(polylines)
df<-data.frame(
id=1:2
, pl=polylines
)
## this will then get converted to `sf`# decode(df)
Thanks for this cool package! I currently have a use case where I get given a long vector of polylines, and I'm wondering whether it makes sense to have one of:
decode
that produces ansf
object instead of requiring the user to convert the list of dataframes themselves.sfencoded
that does the work of creating an encoded column and sets class so thatpolyline_wkt %>% st_as_sf
can be used.Both of these are certainly convenience functions. I can try a PR in the next few days once I read over the code a bit also.
The text was updated successfully, but these errors were encountered: