Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of http access #56

Closed
alex-s-gardner opened this issue Dec 21, 2022 · 4 comments
Closed

Support of http access #56

alex-s-gardner opened this issue Dec 21, 2022 · 4 comments

Comments

@alex-s-gardner
Copy link
Contributor

It would be nice if GeoJSON.read() could accept a URL, e.g. "https://its-live-data.s3.amazonaws.com/datacubes/catalog_v02.json"

@visr
Copy link
Member

visr commented Dec 22, 2022

I'd just use HTTP separately, it only adds one line of code:

using GeoJSON, HTTP

resp = HTTP.get("https://its-live-data.s3.amazonaws.com/datacubes/catalog_v02.json")
fc = GeoJSON.read(resp.body)

Otherwise we'd have to take on a dependency on HTTP.

@alex-s-gardner
Copy link
Contributor Author

Ya, that makes sense. I got lost with trying:

resp = HTTP.get("https://its-live-data.s3.amazonaws.com/datacubes/catalog_v02.json")
fc = GeoJSON.read(resp)

Maybe I can add an example to the ReadMe

@visr
Copy link
Member

visr commented Dec 24, 2022

Yes that'd be welcome!

@rafaqz rafaqz closed this as completed Dec 29, 2022
@likev
Copy link

likev commented Apr 28, 2024

I just create a pull request #90 so that we can use Downloads.download in stdlib

using GeoJSON, Downloads
io = Downloads.download("https://its-live-data.s3.amazonaws.com/datacubes/catalog_v02.json", IOBuffer())
fc = GeoJSON.read(io)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants