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 coverage store for local files #68

Open
evansohgit opened this issue Dec 28, 2021 · 6 comments
Open

Create coverage store for local files #68

evansohgit opened this issue Dec 28, 2021 · 6 comments
Labels
enhancement New feature or request New feature New feature or request

Comments

@evansohgit
Copy link

Currently, create_coveragestore only works with data upload via put. It should also be possible to use local file as per geoserver UI using "file://path/to/file". I think this would also enable functionality for imagemosaic.

@iamtekson iamtekson added enhancement New feature or request New feature New feature or request labels Jan 5, 2022
@theoway
Copy link
Contributor

theoway commented Jan 17, 2022

To add imagemosaic, you first have to import the folder to Geoserver, then you can make API call to create imagemosaic datastore. I used importer extension that would upload the folder to geoserver, then make API call to create coverage store. It worked, but it is not recommended to do this way.

@evansohgit
Copy link
Author

Thanks for the response, you are right that this is probably not a recommended way to do what is needed.

I am actually trying to port my project to geoserver-rest from gsconfig because that one seems to be no longer supported. Just for your information, it seems a functional implementation can be found in https://github.com/geosolutions-it/gsconfig/blob/8466dbb0f4507c1e21066322c2f3a0e95c0a92fa/src/geoserver/catalog.py#L540.

This caters for whether upload(import) is being used and matches more closely with what can be done via geoserver web interface.

@theoway
Copy link
Contributor

theoway commented Jan 17, 2022

Cool! Wondering if it works for mosaic as well. If it does, it'll be cool.
Anyways, the endpoint is same. I'll try to add mosaic option as well to current implementation in geoserver-rest

@lstillwe
Copy link

lstillwe commented Jun 8, 2022

To add imagemosaic, you first have to import the folder to Geoserver, then you can make API call to create imagemosaic datastore. I used importer extension that would upload the folder to geoserver, then make API call to create coverage store. It worked, but it is not recommended to do this way.

Is image mosaic creation for a remote directory of tiff files supported yet?
@theoway do you have a code example of how to use the importer to do this? Tried to get it to work, but have not been successful yet. Thanks!

@theoway
Copy link
Contributor

theoway commented Jun 8, 2022

@lstillwe Sorry, I don't have the code for it now. What I can tell you is that this approach was very difficult for me to get working and is not recommended. You can use the COG community plugin, or the image mosaic jdbc plugin. I was working on it long time back and have already started using COG plugin.

@lstillwe
Copy link

@theoway @evansohgit Does anyone have just a curl example for creating and image mosaic when the tiffs are already local to the Geoserver file system? I have spent several days trying to get at least that scenario working. Thanks!
Here is my latest attempt that still does not work:
curl -X POST -u user:passwd -H "Content-Type: application/xml" -d "test-mosaicImageMosaictruefile:mosaics/testing/testmosaic" "http://somehost.org/geoserver/rest/workspaces/test/coveragestores/test-mosaic/coverages.xml"

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

No branches or pull requests

4 participants