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
And it was 7x faster than sf::st_write. The output wasn't identical as sf writes each feature to a new line in the file. But I was able to st_read it back in and it was identical to the original sf data frame.
I'm sure this function needs some refining, but it would be a really useful feature for geojsonsf
Thanks.
The text was updated successfully, but these errors were encountered:
My C++ is not great so I probably couldn't contribute in that way.
But in case anybody else comes across this issue; the problem with sf::st_write seems to be converting the sf object to geojson rather than the writing to disk. So sf_geojson provides a worthwhile speed boost on large datasets.
This writes geojson that is identical to st_write at least for my test cases and saved hours on some large datasets I was working on. It uses data.table for writing to disk, but that could probably be replaced with a base R solution as the main benefit is from sf_geojson.
Unless I've missed it, why there is no easy way to save an sf object to disk as a geojson file?
I created a little test function
And it was 7x faster than
sf::st_write
. The output wasn't identical assf
writes each feature to a new line in the file. But I was able tost_read
it back in and it was identical to the original sf data frame.I'm sure this function needs some refining, but it would be a really useful feature for
geojsonsf
Thanks.
The text was updated successfully, but these errors were encountered: