We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reprex of the problem
# packages library(sf) #> Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3 library(stplanr) # create some fake data my_sfc_linestring <- st_sfc( st_linestring(matrix(c(1, 1, 2, 2, 3, 3), ncol = 2, byrow = TRUE)) ) my_sf_linestring <- st_as_sf(data.frame(ID = 1), geometry = my_sfc_linestring) line2points(my_sf_linestring) #> Simple feature collection with 2 features and 1 field #> geometry type: POINT #> dimension: XY #> bbox: xmin: 1 ymin: 1 xmax: 3 ymax: 3 #> epsg (SRID): NA #> proj4string: NA #> id geometry #> 1 1 POINT (1 1) #> 2 1 POINT (3 3) colnames(my_sf_linestring) #> [1] "ID" "geometry" # save data st_write(my_sf_linestring, "my_sf_linestring.gpkg") #> Updating layer `my_sf_linestring' to data source `my_sf_linestring.gpkg' using driver `GPKG' #> Writing 1 features with 1 fields and geometry type Line String. # read that same data my_sf_linestring <- st_read("my_sf_linestring.gpkg") #> Reading layer `my_sf_linestring' from data source `C:\Users\Utente\AppData\Local\Temp\RtmpEJviv4\reprex20fc24412f88\my_sf_linestring.gpkg' using driver `GPKG' #> Simple feature collection with 1 feature and 1 field #> geometry type: LINESTRING #> dimension: XY #> bbox: xmin: 1 ymin: 1 xmax: 3 ymax: 3 #> epsg (SRID): NA #> proj4string: NA line2points(my_sf_linestring) #> Error in x_coords[o_indices] <- sapply(l$geometry, `[[`, 1): replacement has length zero colnames(my_sf_linestring) #> [1] "ID" "geom"
Created on 2019-11-05 by the reprex package (v0.3.0)
The problem lies here I think
stplanr/R/od-funs.R
Lines 388 to 391 in b2fd352
I can fill a PR in the next days.
The text was updated successfully, but these errors were encountered:
Thanks Andrea, as discussed, I'm confident this should be a quick fix. Many thanks!
Sorry, something went wrong.
No branches or pull requests
Reprex of the problem
Created on 2019-11-05 by the reprex package (v0.3.0)
The problem lies here I think
stplanr/R/od-funs.R
Lines 388 to 391 in b2fd352
I can fill a PR in the next days.
The text was updated successfully, but these errors were encountered: