Closed HywelMJ closed 3 years ago
thanks @HywelMJ having a look
what were you trying to get as the output?
I'm not sure I understand your question so forgive me if my responses seem odd. The file downloads but geojson_read still suggests 'name too long?' even when the name has been changed to a very short name - 'EW.geojson'. (Actually, I should have thought of checking the length of the path name. That could be pretty long on my PC.)
But surely "https://opendata.arcgis.com/datasets/d49160d2e5af4123b15d48c2e9c70160_4.geojson" isn't too long?
Sorry but I can't reproduce the problem myself now so best close the issue. Sorry to have wasted your time.
More apologies. Problem reproduced using https://opendata.arcgis.com/datasets/e1ed938a33cf472fa802d99b1900164b_1.geojson
I meant: Do you want an R list? json? an sf object? something else?
Now I understand you. My issue is with the error message obtained when using the default setting of geojson_read - which includes 'what = list'. Changing from the default to 'what = "sp"' does work.
Sounds like you do want a list, but you did not say so explicitly, we'll go with a list then.
I'm having a look at the error still.
fiddling with geojson_read
on the geojson_read_fixes
branch - have to come back to this a bit later as we need to submit a new version fixing other things by tomrrow
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
Session Info
```r R version 3.6.2 (2019-12-12) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362) Matrix products: default locale: [1] LC_COLLATE=Welsh_United Kingdom.1252 LC_CTYPE=Welsh_United Kingdom.1252 [3] LC_MONETARY=Welsh_United Kingdom.1252 LC_NUMERIC=C [5] LC_TIME=Welsh_United Kingdom.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] geojsonio_0.8.0 spdplyr_0.3.0 sp_1.3-2 dplyr_0.8.3 mapview_2.7.0 loaded via a namespace (and not attached): [1] Rcpp_1.0.3 svglite_1.2.2 lattice_0.20-38 [4] png_0.1-7 class_7.3-15 leaflet.providers_1.9.0 [7] assertthat_0.2.1 digest_0.6.23 packrat_0.5.0 [10] V8_3.0.1 mime_0.8 R6_2.4.1 [13] leafpop_0.0.5 stats4_3.6.2 e1071_1.7-3 [16] httr_1.4.1 geojson_0.3.2 pillar_1.4.3 [19] gdtools_0.2.1 rlang_0.4.2 lazyeval_0.2.2 [22] curl_4.3 uuid_0.1-2 rstudioapi_0.10 [25] raster_3.0-7 rgdal_1.4-8 webshot_0.5.2 [28] foreign_0.8-74 jqr_1.1.0 htmlwidgets_1.5.1 [31] munsell_0.5.0 shiny_1.4.0 compiler_3.6.2 [34] httpuv_1.5.2 pkgconfig_2.0.3 systemfonts_0.1.1 [37] base64enc_0.1-3 rgeos_0.5-2 htmltools_0.4.0 [40] tidyselect_0.2.5 tibble_2.1.3 codetools_0.2-16 [43] viridisLite_0.3.0 crayon_1.3.4 later_1.0.0 [46] sf_0.8-0 grid_3.6.2 jsonlite_1.6 [49] satellite_1.0.2 xtable_1.8-4 lifecycle_0.1.0 [52] DBI_1.1.0 magrittr_1.5 units_0.6-5 [55] scales_1.1.0 KernSmooth_2.23-16 promises_1.1.0 [58] leaflet_2.0.3 brew_1.0-6 RColorBrewer_1.1-2 [61] tools_3.6.2 leafem_0.0.1 glue_1.3.1 [64] purrr_0.3.3 crosstalk_1.0.0 fastmap_1.0.1 [67] yaml_2.2.0 colorspace_1.4-1 maptools_0.9-9 [70] classInt_0.4-2 spbabel_0.5.0 ```test <- geojsonio::geojson_read( "https://opendata.arcgis.com/datasets/d49160d2e5af4123b15d48c2e9c70160_4.geojson")
produces Error in unlink(x) : file name conversion problem -- name too long?
The file downloads OK using download.file. Given short name EW.geojson and then attempting to read in locally produced the same error message.