i have a df with a character colum that contains an arrays of wgs84 coordinates.
> head(df$Multipoint)
[1] "[[11.038156,44.525654],[9.768989,45.620678],[7.923145,45.060564]]"
[2] "[[9.768989,45.620678],[11.282019,46.441482],[11.858295,45.651340]]"
[3] "[[11.038156,44.525654],[9.768989,45.620678],[11.126326,43.450791],[11.858295,45.651340]]"
[4] "[[11.038156,44.525654],[9.768989,45.620678],[7.923145,45.060564]]"
[5] "[[16.081622,40.499836],[14.840397,40.859856],[12.766940,41.980122],[14.595315,41.684185],[16.619494,40.984473]]"
[6] "[[11.038156,44.525654],[11.126326,43.450791]]"
As you can observe, there are both points and lines (no polygons). I need to convert it in a spatial dataframe, usually i use
coordinates(object) <- value
but, in this case i need to obtain lines too.