Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upgeojsonsf::geojson_sf add NA_character_ in "input" field of "crs" which make the object unusable by sf package #83
Comments
|
Thanks for reporting this. However, there's a couple of things going on here, notably with the update to
So I'm updating Could you you do me a favour and test the latest dev version of remotes::install_github("SymbolixAU/geojsonsf")And tell me if you still get this error? |
|
I just tried the exact same code and I now get the following error : Error: C stack usage 7970148 is too close to the limitAs you mentioned using a |
|
For you information the C stack usage error persists even after installing the last version d845e12 (If I use |
|
I'm adding an |
|
Ok but why not make the package handle both version of Also the C stack usage error persists on the new version. |
I am using:
Below is a minimal example:
yields the following error :
Digging down and comparing the dput with a functional one (from
sf::read_sf) showed that the issue is that the call to_geojsonsf_rcpp_read_sf_fileadd two fields "input" and "wkt" to the "crs" attributes in the "geometry" with valuesNA_character_while (according to what I understood from the error) it should beNA_integer_.Replacing
NA_character_withNA_integer_solve the issue:The error also vanish when importing with default
crsoption such assf_obj <- geojsonsf::geojson_sf(geojson, crs=4326)since no fields "input" and "wkt" are created in crs attributes (and then no inappropriateNA_character_values).