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

Search/Queries (cross-swg): joinCollections common OGC API building block #801

Open
jerstlouis opened this issue Mar 10, 2023 · 0 comments

Comments

@jerstlouis
Copy link
Member

jerstlouis commented Mar 10, 2023

As suggested in T18-SWIM (Section 7.2.4) (though there it was called collections), it would be great to support a join capability that would work with the existing /items end-point.

This would make queryables from another collection available for filter, sortby, properties (allowing to derive new fields and also easily handling the simple OGC API - Joins use case).

Compared to the current main Search proposal, with this request there is a primary collection (akin to the left table in a SQL LEFT JOIN) for which all matching items will be returned and there is a clear featureId associated with each item returned, while the items / data (could be non-features for features/coverage data integration) from the joined collections will be matched where applicable, providing additional queryables available for CQL2 properties in filter, sortby and properties (These are also defined in Processes - Part 3: Workflows and Chaining "Input/Output field modifiers").

The collection could be local or remote if that is supported e.g.:

GET /collections/flightRoutes/items?
   joinCollections=https://weather.com/ogcapi/collections/winds&
   filter=winds.speed > 100 and s_intersects(geometry, winds.geometry) and departingAirport in (JFK, EWR, LGA)&
   sortby=-winds.speed,departingAirport&
   limit=1000

This could also work for /coverage and /map requests:

GET /collections/dem/map?joinCollections=countries&filter=Elevation > 1000 and countries.name = 'Canada'

In this case, a DEM map of Canada is returned for elevation above 1000.

GET /collections/countries/map?joinCollections=dem&filter=dem.Elevation > 1000 and name = 'Canada'

Similar request but in this case, a country map (might be simple solid fill / stroke) of Canada is returned for elevation above 1000.

NOTE: joinCollections avoids confusion with the Tiles / Maps collections parameter which selects the content to render on the map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant