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 S3 storage for resource path for geotiff #45

Open
pchevali opened this issue Feb 26, 2024 · 1 comment
Open

Support S3 storage for resource path for geotiff #45

pchevali opened this issue Feb 26, 2024 · 1 comment

Comments

@pchevali
Copy link

Is your feature request related to a problem? Please describe.

It is possible from geonode to enable different backend for storage. For example STORAGE_MANAGER_CONCRETE_CLASS="geonode.storage.aws.AwsStorageManager"
And if geoserver has the S3 geotiff storage plugin, it would be nice to have to be able to use an image stored in an S3 storage service.

Describe the solution you'd like
Being able to create a coverage store by giving a s3:// style url, or alias:// as stated in https://docs.geoserver.org/main/en/user/community/s3-geotiff/index.html

Describe alternatives you've considered
Mounting the S3 storage as local dir. But fear a listdir performance trap maybe...

Additional context
There is a thing that prevent using s3 storage URL is that path is forcibly prefixed by "file:/" at this line

cs.url = path if path.startswith("file:") else f"file:{path}"

Would it solve problem to release this prefix condition ? Maybe just check if the path contains an URL connection schema ( http:, file: , s3: ,whatever:), and put the "file:" prefix if nothing specified.

@pchevali
Copy link
Author

Getting back on this feature, I am working locally with a modified version that accepts other schemes than only "file:" (for single files or image mosaic granules).
The idea would be to prepend the "file:" scheme only when no scheme can be found.

Is there a reason to restrict to "file" scheme only ?

I want to use this rest client for S3 based images ( with cog plugin )

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

1 participant