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

[Feature requests] Support cloud storage URL (AWS, Google ...) #47

Open
vincentsarago opened this issue May 22, 2018 · 2 comments
Open

Comments

@vincentsarago
Copy link
Contributor

It will be really useful to support cloud storage url as s3://

I understand this is not an easy task, I could see if I can submit a PR (at least for AWS support)

cc @constantinius

@constantinius
Copy link
Member

Hi @vincentsarago,

Thank you for for issuing this feature request. It definitely sounds like a really useful enhancement. Unfortunately I'm really not an expert for Amazon services. Looking into the matter, I'm a little confused about this s3:// protocol URL prefix. As far as I can tell, this is just a way to shorten the URL. I think I can remember that it also includes authorization management of some kind.

What would you say would be required to have a useful support of s3://?

On the other hand, this sounds like a good place for a customized Source. Such a Source must only have an async fetch(offset, length) method that actually makes the request. For HTTP based sources, I simply set the Range header to get slices of the file. It is then possible to use the fromSource() factory with such a source to instantiate a GeoTIFF object.

It seems like using the aws-sdk with the mentioned methods might yield the desired results.

Is this going into the desired direction?

@vincentsarago
Copy link
Contributor Author

I need to dig more too.

On the other hand, this sounds like a good place for a customized Source. Such a Source must only have an async fetch(offset, length) method that actually makes the request. For HTTP based sources, I simply set the Range header to get slices of the file. It is then possible to use the fromSource() factory with such a source to instantiate a GeoTIFF object.

This is how we do it in COGDumper (python lib to read COG files)
https://github.com/mapbox/COGDumper/blob/master/cogdumper/s3dumper.py#L20-L25

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

2 participants