Closed Nowosad closed 3 years ago
Currently, we do something like in the example at https://github.com/kadyb/rgugik/blob/26fac50fb67044196f2ade3bce25b742395c4b68/R/DEM_request.R#L65.
This works well for objects of class sf, but does not support objects of the sfc class. I think, it can be easily fixed with replacing seq_len(nrow(polygon)) with seq_along(sf::st_geometry(polygon)) (maybe some other changes could be also required).
seq_len(nrow(polygon))
seq_along(sf::st_geometry(polygon))
This possible change could make downloading easier for novice users, and we could remove the following line https://github.com/kadyb/rgugik/blob/26fac50fb67044196f2ade3bce25b742395c4b68/vignettes/DEM.Rmd.orig#L95.
Good idea!
Currently, we do something like in the example at https://github.com/kadyb/rgugik/blob/26fac50fb67044196f2ade3bce25b742395c4b68/R/DEM_request.R#L65.
This works well for objects of class sf, but does not support objects of the sfc class. I think, it can be easily fixed with replacing
seq_len(nrow(polygon))
withseq_along(sf::st_geometry(polygon))
(maybe some other changes could be also required).This possible change could make downloading easier for novice users, and we could remove the following line https://github.com/kadyb/rgugik/blob/26fac50fb67044196f2ade3bce25b742395c4b68/vignettes/DEM.Rmd.orig#L95.