-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add DAP storage option #513
Conversation
@huard I think, the PR is great improvement - even I myself do not use the DAP storage feature at the moment, I love the interoperability possibilities, it offers. Only thing I'm missing in your PR is update of documentation - you have to add section to configuration AND I would love to see a chapter in extensions too. Is it possible to add some tests as well? |
Yes, I'll try to launch a dap server with emu to test it's really working. Ideally, we'd have a general solution for this. Imagine for example that a process creates a shapefile and you'd like to serve it using wms and wcs. What should the wps response be ? |
Hi, this is one of the dream features, which used to be in PyWPS, but had to go due to lack of resources. Anyway, IMHO, this should be steered by mimetype - if the mimetype is image/tiff, it can be still link to wms or wcs, but the result should be the file. If the result is the service, then the mimetype should be application/vnd.ogc.wms_xml and the response should be the capabilities document IMHO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments.
@@ -201,7 +202,10 @@ def _json_reference(self, data): | |||
if self.prop == 'url': | |||
data["href"] = self.url | |||
elif self.prop is not None: | |||
self.storage = FileStorageBuilder().build() | |||
if self.data_format.mime_type == "application/x-ogc-dods": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not check the configured storagetype ... whenever I have a dods
file it will use the DapStorageBuilder
even when it is not configured.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed.
@huard I think the Is the |
yes, that was the idea. |
Thanks @cehbrecht for your comments. I realize it was a pretty naive implementation. I just realized that in the case where we want everything to be stored on a DAP server, we only have to modify the FileStorage configuration. I suggest to close this PR for now and see if we can do everything we need with the current FileStorage implementation and a tweaked configuration. |
I don't think we want to serve everything by DAP. I'm not sure if OpenDAP (and WMS, WCS, ...) is a storage type. Maybe an output service type (which we do not have yet)? The services may still use the same storage: file, S3, ... Depending on the mimetype and the configuration the output urls would be adapted to HTTP, OpenDAP, WMS, ... @jachym what would you think? |
Something like:
and then the |
or maybe like this:
PyWPS may know the mimetypes. |
@cehbrecht I think explicit mime-types offer some advantages. You could have two instances of a WMS server, one for version 1.0 and another for version 2.0. |
Ok. But I suppose we need to configure it differently ... not using the mimetype as config parameter. ping @jachym. |
Like the format name: 'GEOJSON, JSON, SHP, GML, METALINK, META4, KML, KMZ, GEOTIFF,' |
yes ... that could work. |
So will close this one and open another PR when I come up with a more general solution. |
Overview
Fix #512 (in theory). Untested in practice, will need a DAP server running alongside a WPS server to test.
Additional Information
Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)