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

What happens with conflicting attributes? #32

Open
pnorman opened this issue Feb 16, 2024 · 1 comment
Open

What happens with conflicting attributes? #32

pnorman opened this issue Feb 16, 2024 · 1 comment
Labels

Comments

@pnorman
Copy link
Contributor

pnorman commented Feb 16, 2024

The water_polygons layer contains a number of features with definitions that can overlap because they're coming from different OSM keys.

As an example, something with landuse=river natural=water would meet the criteria for kind of river and of reservoir.

The osm2pgsql-themepark implementation is

if t.natural == 'glacier' then
    kind = 'glacier'
elseif t.natural == 'water' then
    if t.water == 'river' then
        kind = 'river'
    else
        kind = 'water'
    end
elseif t.waterway == 'riverbank' then
    kind = 'river'
elseif t.waterway == 'dock' or t.waterway == 'canal' then
    kind = t.waterway
elseif t.landuse == 'basin' or t.landuse == 'reservoir' then
    kind = t.landuse
end

This is the logical way to read the spec as it goes down the table and takes the first condition that is met, but it's not ideal since landuse=reservoir natural=water would have a kind of the generic water.

@pnorman
Copy link
Contributor Author

pnorman commented Feb 21, 2024

Another example is the sites layer where there can be objects tagged with matching military and amenity tags. For this one it might make sense to have the object appear multiple times, or it might make sense to define a priority order.

@joto joto added the spec label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants