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

Create GeoTIFF Datastore/Coveragestore without uploading a file? #148

Open
pedro-cf opened this issue Apr 17, 2024 · 6 comments
Open

Create GeoTIFF Datastore/Coveragestore without uploading a file? #148

pedro-cf opened this issue Apr 17, 2024 · 6 comments
Labels
New feature New feature or request question Further information is requested

Comments

@pedro-cf
Copy link

pedro-cf commented Apr 17, 2024

Greetings. Is it possible to create a GeoTIFF Datastore/Coveragestore without having to upload a file?
Using a file that is already in the Geoserver?

@pedro-cf pedro-cf changed the title Create a Datastore without uploading a file? Create a Datastore/Coveragestore without uploading a file? Apr 17, 2024
@pedro-cf pedro-cf changed the title Create a Datastore/Coveragestore without uploading a file? Create GeoTIFF Datastore/Coveragestore without uploading a file? Apr 17, 2024
@iamtekson
Copy link
Collaborator

Right now, the functionality is not available. I am open for any PR.

@iamtekson iamtekson added question Further information is requested New feature New feature or request labels Apr 17, 2024
@pedro-cf
Copy link
Author

pedro-cf commented Apr 19, 2024

I think this should apply for any fuction that involves uploading, allow the option to merely use a file that is already in geoserver instead of uploading

@pedro-cf
Copy link
Author

Greetings @iamtekson

Do you know if the Geoserver REST API allows for the creation of datastores/coveragestores that make use of the COG (Cloud optimized Geotiff) plugin?

If so, this would be a great addition to this feature request!

@iamtekson
Copy link
Collaborator

Do you know if the Geoserver REST API allows for the creation of datastores/coveragestores that make use of the COG (Cloud optimized Geotiff) plugin?

I have no idea about this. But found this discussion in the StackOverflow. Seems like, we can integrate that too.

@tommasosansone91
Copy link

Hello, I am also open to work on the development of this feature.

@Ponsoda
Copy link

Ponsoda commented Nov 7, 2024

Regarding this issue, I added the modifications mentioned on the discussion that @iamtekson mentioned to add the possibility to create coverage stores from remote cog files "But found this discussion in the StackOverflow.".

Unfortunately, I only have access to Google cloud files to test that it is working fine, is it possible that someone test the HTTP, Azure and S3 connexions for me?

This is the repo: https://github.com/Ponsoda/geoserver-rest-cog-coverage-store
Some considerations based on the plugin explanations:

  • Be sure that the file is in cog format (not all geotiffs are valid)
  • Every provider needs to have a different plugin installed (cog-http, cog-google, cog-azure and cog-aws)
  • To use Google, it is necessary:
    • Set the env variable GOOGLE_APPLICATION_CREDENTIALS with the path of the json file with the credentials
    • On geo.create_coveragestore add two extra parameters <remote_url> in substitution of path, with the url of the file (both https or gs schemes are valids) and, <cog_settings> with the following value {'rangeReaderSettings':'GS'} (ex. geo.create_coveragestore(layer_name='layer1', remote_url='https://storage.cloud.google.com/data/myfile.tif', workspace='demo', cog_settings={'rangeReaderSettings':'GS'}))

⚠️⚠️ Now starts the untested part. The rangeReaderSettings name and the credentials had been assumed by miself based on the documentation, as I couldn't find any information about it.

  • To use http, it is necessary:
    • On geo.create_coveragestore add two extra parameters <remote_url> in substitution of path, with the url of the file (both https or gs schemes are valids) and, <cog_settings> with the following value {'rangeReaderSettings':HTTP', 'userName':, 'password':}
  • To use AWS, it is necessary:
    • On geo.create_coveragestore add two extra parameters <remote_url> in substitution of path, with the url of the file (both https or gs schemes are valids) and, <cog_settings> with the following value {'rangeReaderSettings':'S3', 'accessKeyID':, 'secretAccessKey':}
  • To use Azure, it is necessary:
    • On geo.create_coveragestore add two extra parameters <remote_url> in substitution of path, with the url of the file (both https or gs schemes are valids) and, <cog_settings> with the following value {'rangeReaderSettings':'Azure', 'accountKey':, 'accountKey':}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants