-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Expose relation membership to schema configs #351
Comments
Greetings! Thanks again for your work. I think this is the blocker for a few issues over at osmus/OpenTrailMap. A lot of OSM trail data we want to use, such as membership and hierarchy, are tagged on route relations instead of individual ways. We don't want to import route relations as wholesale objects, we just want to query relations when filtering ways and also copy over some of their tags. I'd be happy to discuss a schema implementation or even work on it myself if you can point me in the right direction. |
Awesome! Let's figure out what the yaml schemas should look like first then work backwards... What would you want the yaml schemas to look like for those use-cases you linked? |
I think something simple like having a keyword to navigate up the parent relation would work, plus a keyword to specify the role of the child feature. Given that features can have any number of different, unrelated parent relations, the feature should match if any parent relation matches. However, for convenience, a parent relation must match all statements in the list to be considered matching. Example: match all ways that are either cycleways or are part of a bike route relation:
Example: match all ways that are part of a bike route OR part of a hiking route:
Example: match all ways that are part of a bike route AND part of a hiking route:
Example: match all the nodes that are labels of admin boundaries:
Example: match all waterway lines that have a
Example: match all waterway lines that are segments of waterway relations, excluding tributaries:
In the future this syntax could also work for navigating from nodes up to ways ( For attributes, I think just having the above functionality in the attribute Example: add
Note the duplicated Example: add
|
Thanks! This looks like reasonably simple approach to navigate the connectivity graph. The other functionality available to us is expressions, so something like A few other use-cases I'd want to think through how to handle:
|
The problem with this syntax is that it's not clear if you're querying one parent relation or all parent relations. Does it return true if the feature has two parents, one with only For superrelations, I think each
Concerning #857, I think that just has to do with the |
I guess people would want to copy over attributes pretty often… I think expression syntax would actually work okay if there were variables for dealing with multiple parent tag values.
We might also want to copy over some other parent metadata:
Note that without another property there would be no way to filter the parent relations prior to querying the attributes (which could be a problem in cases where different sorts of parent relations use the same tags for different things). |
👍 that's good to know, it definitely simplifies things if we don't need to support arbitrary levels of nesting.
It would probably be more code-like with CEL map/filter/exists macros like Using those macros I think we'd be able to express the min admin level like: |
This looks great. I'm not familiar with the ins and outs of CEL, but advanced code-like syntax is exactly what we need for something this complex. |
I would like to render boundary relations as polygons, and I'm willing to work on the code to make that happen. If we're happy with the syntax hashed out above (thanks for that!) I'd like to work on it. |
Needed for shortbread boundaries layer
The text was updated successfully, but these errors were encountered: