Closed SymbolixAU closed 5 years ago
Thanks @SymbolixAU why did I miss this? It is because we have something more urgent here. Appreciate the input.
To answer your question: The rason is that geoplumber is trying to serve the data from internal api endpoints, we discussed this, as you rightly ask, we could probably just read it and dump it to the body of the response object here. I will test and update this issue.
It seems gp_geojson
has no issue reading both from a local path or a remote URL.
Thanks guys!
geo <- readLines(url)
geo <- paste(geo, collapse = "")
Seems to work, the reason for this collapsing
cropped up before, it is to do with underlying packages of plumber
. But as I do more tests might push and close this.
One more time, thanks a lot.
yes, that's exactly what I do here too - paste0(readLines(url), collapse = "")
So far all good. Closing and appreciate all your input @SymbolixAU. geojsonsf has made things quite different for me.
In this line you're reading the GeoJSON, converting to sf, then converting back to GeoJSON.
In summary:
Would it be more performant to directly read the GeoJSON and leave it as-is, rather than round-tripping to
sf
and back?