opengeospatial / ogcapi-joins

OGC API - Joins SWG public repo
Other
2 stars 0 forks source link

Discuss the possibility of a common approach with the Features API SWG #2

Open ghobona opened 2 years ago

ghobona commented 2 years ago

The Features API SWG is looking into the possibility of supporting joins on OGC API - Features.

There is a need for the Features API SWG and the TJS SWG to discuss the possibility of a common approach.

Cc: @cportele @pvretano @tmiosmauli @latvap @jerstlouis

AlexRamageScot1 commented 2 years ago

Gobe, others

Can you give us more information on the type of joins that Features are looking at. Remember TJS is looking a very specific use case, where you are joining a Geospatial dataset with a tabular dataset to join the table and geospatial data together.

Regards

Alex Ramage

From: ghobona @.> Reply to: opengeospatial/ogcapi-joins @.> Date: Wednesday, 6 April 2022 at 18:26 To: opengeospatial/ogcapi-joins @.> Cc: Subscribed @.> Subject: [opengeospatial/ogcapi-joins] Discuss the possibility of a common approach with the Features API SWG (Issue #2)

The Features API SWG is looking into the possibility of supporting joins on OGC API - Features.

There is a need for the Features API SWG and the TJS SWG to discuss the possibility of a common approach.

Cc: @cportelehttps://github.com/cportele @pvretanohttps://github.com/pvretano @tmiosmaulihttps://github.com/tmiosmauli @latvaphttps://github.com/latvap @jerstlouishttps://github.com/jerstlouis

— Reply to this email directly, view it on GitHubhttps://github.com/opengeospatial/ogcapi-joins/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKJTQZHAELRJ5DZ2A647FULVDXCLTANCNFSM5SWXUMRQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

pvretano commented 2 years ago

@ghobona FYI this is already part of the Search extension proposal ... see example 7 in section 11.3, Examples.

pvretano commented 2 years ago

@AlexRamageScot1 Joins as proposed in Features would be very generic ... spatial, temporal, scalar ... basically the kind of thing that WFS supported or that you could do in a RDBMS.

Here is an example from the proposal that joins two collections, parks and lakes, to find which lakes are within Algonquin park (so this example uses both a scalar predicate and a spatial predicate).

   CLIENT                                                               SERVER
     |                                                                     |
     |   POST /search   HTTP/1.1                                           |
     |   Host: www.someserver.com/                                         |
     |   Accept: application/json                                          |
     |   Content-Type: application/ogcqry+json                             |
     |                                                                     |
     |   [                                                                 |
     |      {                                                              |
     |         "collections": ["http://.../collections/parks",             |
     |                         "http://.../collections/lakes"]             |
     |         "filter": {                                                 |
     |            "and": [                                                 |
     |               {"eq": [{"property": "parks.name"},"Algonquin Park"]} |
     |               {"contains": [{"property": "parks.geometry"},         |
     |                             {"property": "lakes.geometry"}]}        |
     |            ]                                                        |
     |         }                                                           |
     |      }                                                              |
     |   ]                                                                 |
     |-------------------------------------------------------------------->|
     |                                                                     |
     |   Content-Type: application/json                                    |
     |   {                                                                 |
     |      "tuples": [                                                    |
     |         [                                                           |
     |            {                                                        |
     |               "id": "park.001",                                     |
     |               "type": "Feature",                                    |
     |               "geometry": { ... },                                  |
     |               "properties": { ... }                                 |
     |            },                                                       |
     |            {                                                        |
     |               "id": "lake.001",                                     |
     |               "type": "Feature",                                    |
     |               "geometry": { ... },                                  |
     |               "properties": { ... }                                 |
     |            }                                                        |
     |         ],                                                          |
     |         [                                                           |
     |            { "$ref": "#/tuples[0]/[0]" },                           |
     |            {                                                        |
     |               "id": "lake.001",                                     |
     |               "type": "Feature",                                    |
     |               "geometry": { ... },                                  |
     |               "properties": { ... }                                 |
     |            }                                                        |
     |         ],                                                          |
     |         .                                                           |
     |         .                                                           |
     |         .                                                           |
     |      ]                                                              |
     |   }                                                                 |
     |<--------------------------------------------------------------------|

This approach is not strictly speaking a function of the API but of the query expression ... although with Part 3, Filter and CQL2 we could make it an API thing too ...

http://.../search?collections=parks,lakes&filter=<CQL2 join expression>

Again, this is only a proposal at this point so all the fine details have not been discussed.

ghobona commented 1 year ago

@pvretano Thanks for the clarification above.

It looks like OGC API - Features and OGC API - Joins will have clearly distinct use cases regarding Joins.

I will therefore close this GitHub Issue on 2023-02-13 at 17:00 UTC, if there is no objection to closing it.

jerstlouis commented 1 year ago

@ghobona I am not really convinced that the use case is clearly distinct to the point of being completely independent.

The ability to join tabular datasets with features to provide additional attributes is a special type of join, but at least it should be consistent and work well with Features (and its approach to joins) and possibly other related APIs.

It seems to me that having a joint session with other OGC API would be a good idea, both to raise awareness and provide an overview of OGC API - Joins and to ensure a consistent approach to joins across the OGC APIs. Is anything planned for the OGC API session in Frascati?