-
Notifications
You must be signed in to change notification settings - Fork 13
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
Coverage Processing Language #146
Comments
Related to #108 Defining a simple expression language which can express the values for desired bands, with some capabilities for aggregration would be very useful. It was also discussed that Workflows allow to define any number of "coverage processor" that could e.g. support exactly the processing languages of QGIS, GRASS, etc. These would profile OGC API - Processes in defining exactly the inputs and behavior of a process that implements a specific type of coverage processor. This could also be one way to integrate WCPS, e.g. as we did with: http://maps.ecere.com/ogcapi/processes/WCPSAdapter WCPS can also be integrated directly within an OGC API as discussed in #97 . In addition to full processing capabilities, we also identified that filtering at both the scene/image level as well as at the individual cell level would also be useful as a type of simple processing that could e.g. filter out cloudy scenes (discussed as part of #105) or cells (#103). These could be separate types of filters (e.g. |
Most of these capabilities could actually be handled by query parameters as described in #164. |
I'd try to avoid a new language, but instead use and potentially extend what is already available:
Maybe this can also somehow be solved with Processes - Part 3 and its various proposed encodings? |
@m-mohr As per the comment above referencing #164 , at this point I feel like starting from CQL2 (and extending as needed) is really the simplest solution, though there is still some work to clarify and define aggregation capabilities. OpenEO process graphs could also be used as an alternative per the Processes - Part 3 / OpenEO requirements class (relying on the existence of those basic operation processes), but results in a much more verbose "expression" than CQL2. Although the first version of CQL2 is mentioned as limited to boolean expressions for use with the OGC API - Features - Part 3 for the sake of avoiding to further delay publication, other uses may extend it beyond that use, and a future version of CQL2 itself may remove that restriction. (discussed in opengeospatial/ogcapi-features#723 ) See the note to this effect in Section 1 - Scope. We are already relying heavily on that capability for OGC Styles & Symbology 2.0 for both the CartoSym-JSON and CartoSym-CSS encodings, and we are planning to use it in extensions other OGC API standards including DGGS and Maps ( opengeospatial/ogcapi-maps#110 ). We also already implemented CQL2 expressions for derived fields in our implementation of OGC API - Coverages, and filters (for Maps and Coverages in addition to Features). |
@m-mohr yes, a good question indeed:
WCPS is OGC's geo datacube analytics language, so preferred. Also EU INSPIRE and recently ISO 19123-3 adopt it.
less powerful than WCPS, and harder to work with, you need either the visual representation (not machine readable) or the JSON representation (not what humans enjoy, WCPS is way more compat and easier to read).
too restricted. If you want to do serious things you will go and extend it, and then we are outside of any standard.
non-standard ;-)
I am not aware of any coverage-related functionality there. Bottom line: use WCPS. It was foreseen for OAPI-Coverages right from the beginning BTW. |
To repeat the question from this morning (via e-mail):
I can't agree with this.
This was asking for other standards and specifications to be added. Disregarding everything else out there seems not very solution oriented. |
Processes - Part 3 defines a number of things, all applicable to coverages:
For most of what WCPS defines, there is very little missing from CQL2 as it stands, other than removing the artificial restriction that it needs to return a boolean value, and defining aggregation functions. CQL2 already supports custom functions, so it is more about standardizing those functions than the language itself. We already use CQL2 in Styles & Symbology 2.0 to style coverages.
Strong disagreement there.
It can be supported alongside OGC API - Coverages as per #97 .
I believe it is WCPS that was mapped to OpenEO and not the other way around.
I (think I) am a human, and I do not enjoy reading WCPS, and I find it absolutely impossible to read. |
@jerstlouis The primary issue I have with CQL2 and OGC API - Processes is - as you also acknowledge - the lack of defined specific processes for data cube processing. Only openEO and WCPS really define a list of processes. Some parts surely can be done via query parameters etc but that's really just for the basics. Defining such processes is a major tasks (as I can tell after defining many for openEO) and shouldn't be underestimated. As such it would be great if we could try to not have two of a kind here. Without specific processes people need to go into too many technical details as Processes and CQL are generic and not datacube specific. They need to make sure datacubes get in and out and how to handle them.
Regarding openEO <-> WCPS mapping: There's an implementation that accepts openEO process graphs and translates to WCPS. I'm not sure how complete the implementation is. I have not seen any implementations that convert WCPS to openEO or anything else. That's why I've asked for any (parser) implementations above, e.g. in Python or JS. The only one I could find is the C++ implementation from rasdaman, but I'd assume that an adopted standard has to have more than one implementation, right? If that's not the case then there's a flaw in the standardization process, in my opinion.
Not impossible to read, but I also find it rather difficult and don't enjoy it. |
Is there a list of those things that we could go through? In the Coverages / CQL2 / Part 3 approach, some operations for which openEO may need a process do not require one:
Aggregation needs some work (some ideas already in #164) for the more complex cases (e.g., aggregating differently on different dimensions). Is there something else that is supported by OpenEO and/or WCPS which would be fundamental capability that could not easily be defined as a process that takes a coverages as an input (and potentially additional parameters), and returns a coverage as an output? An important ability of Processes is also the ability to integrate Coverages and Feature Collections (not restricting inputs only to coverage type data).
If I recall correctly from talking to Alex, some of the newer / more advanced openEO capability cannot be translated to WCPS.
OK, that was a hyperbole ;) I did manage to read and understand some simpler WCPS, but I really struggle with more complex ones. |
We all have our opinions, and that's just fair. I, for example, do not at all enjoy JSON and how it forces me to do straightforward things in highly convoluted ways... |
@pebau Is that the full answer to the questions above? I'm still looking for implementations of WCPS. Without any additional implementation, I have to assume that there is only rasdaman as an implementation for WCPS, which in my opinion pretty much nukes out WCPS as a serious alternative for any geodatacube standard going forward. Having in mind that OGC requires adoption of a standard (i.e. multiple implementations), I'm wondering how WCPS has passed this requirement. Seems like something in the standardization process is not working correctly. |
https://www.ogc.org/resources/uncertified-products/?&specid=347 I am trying to follow implementations, but the OGC site seems down currently: |
Thanks for linking to the implementations. It seems they are all closed-source except for the C++ rasdaman code. This makes it pretty difficult to actually experiment with it in the Testbed. |
@m-mohr @jerstlouis @pebau As an aside, the API EDR SWG are considering the issue of using the queries to provide limited manipulation of data, which is often a coverage. Simple summary statistics such as mean, max, etc are straightforward, and we think OGC cross-API standardisation, or at least consistency, is acheivable. And the mitigation of the threat of DDoS seems feasible. |
@chris-little That is music to my ears ;) For specific resolution, I believe this is typically orthogonal functionality to CQL queries for filtering or computing new values, which are typically specify "per cell/pixel" calculation. We already have a number of mechanisms for super/down sampling in OGC API - Coverages and Maps, so I suggest to stick to some of these already existing parameter building blocks for that purpose:
There may be more advanced scenarios where the down/sampling is actually done as part of the aggregation/condensing. It would be interesting to research this in more details, including how this currently works in WCPS and openEO. The whole question on how to / whether we can use CQL2 functions for these aggregation / condensing purposes is really something of interest to discuss. |
@jerstlouis I have a problem with
As they assume the exsiktence of map artefacts. EDR is about data. There are no assumptions about scale, width or height, etc. The data is requested and returned at specific (direct) positions in a CRS. For our uses cases, and specific queries (e.g. The Maps/Coverages terminology is just confusing. I will try to attend at 14:00 UTC (10:00 EDT) to discuss. |
Definitely, so is Coverages and Features ( see opengeospatial/ogcapi-features#654 ). It is true that the relationship between the In OGC API - Tiles we defined The parameters from Coverages do not rely on any concept of display resolution or maps concept:
There 3 parameters and how they behave are inherited from WCS, so they are all about data. |
depends on what you want to experiment with: change the syntax? or just run it? The latter is well possible without diving into the source code. BTW, WCPS is implemented in Java - HTH. |
Parse WCPS and translate/run in any other environment. Translate to openEO, run in geopyspark, run in xarray/dask, etc. That's what WCPS is meant to do, right? Implementation independant execution of coverage/datacube workflows. So I'd like to hook into the execution steps basically. |
@chris-little This is quite the thread to follow :-) But I would like to underscore something Chris said regarding the generation of statistics and related functional capability is that this is a cross cutting standards issue and hopefully is addressed as such. We do not need on-interoperable stovepipes :-) I am wondering whether any consideration has been given to using Dana Tomlin's map algebra as an abstract starting point?? QGIS, Esri products and many others use the map algebra concepts in implemented deployed products. May or may not be germane to datacube processing requirements. Thanks for listening. |
@cnreediii Thank you for pointing that out. The four types of operators described at https://en.wikipedia.org/wiki/Map_algebra are insightful:
|
I will raise a couple of issues in the API EDR repo:
|
Thanks @chris-little For example,
See this comment #164 (comment) This is also related to the DAPA aggregate query parameter. And I am trying to understand how the aggregator / condenser in WCPS work and which use cases they support. The syntax I had suggested so far (to extend CQL2) was:
e.g.,
would aggregate the minimum NDVI on a monthly basis, then return a sum of all values aggregated to a single value over the spatial dimensions. |
@jerstlouis openEO can do various aggregations.
The aggregation functions include:
See https://processes.openeo.org and https://openeo.org/documentation/1.0/datacubes.html for details. |
Thanks @m-mohr , this is exactly the kind of capability for which it would be useful to do a WCPS / openEO side-by-side comparison, and identify the common and/or essential capabilities, and figure out whether there is a way to express this as CQL2 expressions invoking aggregation functions. |
@cnreediii indeed, as has been pointed out already, WCPS supports all Tomlin operation, plus aggregation, in all combinations. Moreover, semantics is defined formally so that all implementation return the same result. |
@m-mohr well, the rasdaman WCPS implementation is fully open source, so nothing hinders you from "playing with it". |
As we are just discussing this in the GDC.SWG again: suggesting to have a WCPS conformance class for coverage processing, in addition to and at the same level as openEO and CQL2 - to make it easy for the users to pick their preference. |
The discussion today suggested the need for a simple OGC Coverage Processing Language.
This could be based on the simple expression languages of QGIS, GRASS.
The text was updated successfully, but these errors were encountered: