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

Unrendered man_made overrules natural #1336

Closed
daganzdaanda opened this issue Feb 25, 2015 · 4 comments · Fixed by #1349
Closed

Unrendered man_made overrules natural #1336

daganzdaanda opened this issue Feb 25, 2015 · 4 comments · Fixed by #1349

Comments

@daganzdaanda
Copy link

Opening a new issue after #1060 (comment)

Nodes with man_made=cross and natural=peak don't show up on the map.
Example: https://www.openstreetmap.org/node/26863070
More examples: http://overpass-turbo.eu/s/7OE

As @nebulon42 notes, in the SQL man_made takes precedence over natural , but since man_made=cross is not rendered nothing is rendered.
Related to #1269 (amenity vs tourism)

Possible solutions I can think of:

1 - reverse priority, render all natural over all man_made on the same node
...Likely to cause other issues?
1a - selectively render natural=peak over all man_made on the same node

2 - render something for man_made=cross
2a - render something special for man_made=cross and natural=peak combo

3 - more general: Have a list of things that get rendered for each key, and if the value is not on that list, look for another possible key to render. No idea if that is realistically possible, or if it would open other problems.

@matthijsmelissen
Copy link
Collaborator

3 - more general: Have a list of things that get rendered for each key, and if the value is not on that list, look for another possible key to render. No idea if that is realistically possible, or if it would open other problems.

Yes, that's possible, and the way this should be solved.

@nebulon42
Copy link
Contributor

While 3 is conceptually a good solution I have no clue how to implement that regarding SQL and Carto. @math1985 Maybe you can expand a bit on how you see this could be done?

@matkoniecz
Copy link
Contributor

@nebulon42

Its seems to be already done in some queries like

('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse,

Note that values of landuse other than 'forest' are transformed into null, without that COALESCE on [landuse='trolololo'; natural='forest'] would produce 'trolololo'.

CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END

transforms [landuse='trolololo'; natural='forest'] into [landuse=null; natural='forest'] - and coalesce returns 'forest'.

@matthijsmelissen
Copy link
Collaborator

Its seems to be already done in some queries like

('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse,

Yes, that's the way to go.

@matkoniecz matkoniecz added this to the Bugs and improvements milestone Mar 1, 2015
matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue Mar 4, 2015
* Make sure conditions are checked in both WHERE and COALESCE
  Checking the condition in the WHERE class is necessary for performance.
  Checking the condition in the COALESCE is necessary to prevent unrendered tags
  blocking rendering of tags further down in the COALESCE.
  See also the discussion [here](gravitystorm#1038 (comment)).

  This is an improvement of gravitystorm#1038.

  This resolves gravitystorm#985, resolves gravitystorm#1029, resolves gravitystorm#1336.

* Give amenity priority over shop.

  This resolves gravitystorm#963.

* Give tourism priority over amenity, shop, leisure, landuse, man_made, natural,
  and place.

  This resolves gravitystorm#1269, resolves first issue of gravitystorm#1232.
matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue Mar 4, 2015
* Make sure conditions are checked in both WHERE and COALESCE
  Checking the condition in the WHERE class is necessary for performance.
  Checking the condition in the COALESCE is necessary to prevent unrendered tags
  blocking rendering of tags further down in the COALESCE.
  See also the discussion [here](gravitystorm#1038 (comment)).

  This is an improvement of gravitystorm#1038.

  This resolves gravitystorm#985, resolves gravitystorm#1029, resolves gravitystorm#1336.

* Give amenity priority over shop.

  This resolves gravitystorm#963.

* Give tourism priority over amenity, shop, leisure, landuse, man_made, natural,
  and place.

  This resolves gravitystorm#1269, resolves first issue of gravitystorm#1232.
matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue Mar 4, 2015
* Make sure conditions are checked in both WHERE and COALESCE
  Checking the condition in the WHERE class is necessary for performance.
  Checking the condition in the COALESCE is necessary to prevent unrendered tags
  blocking rendering of tags further down in the COALESCE.
  See also the discussion [here](gravitystorm#1038 (comment)).

  This is an improvement of gravitystorm#1038.

  This resolves gravitystorm#985, resolves gravitystorm#1029, resolves gravitystorm#1336.

* Give amenity priority over shop.

  This resolves gravitystorm#963.

* Give tourism priority over amenity, shop, leisure, landuse, man_made, natural,
  and place.

  This resolves gravitystorm#1269, resolves first issue of gravitystorm#1232.
matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue Mar 9, 2015
* Make sure conditions are checked in both WHERE and COALESCE
  Checking the condition in the WHERE class is necessary for performance.
  Checking the condition in the COALESCE is necessary to prevent unrendered tags
  blocking rendering of tags further down in the COALESCE.
  See also the discussion [here](gravitystorm#1038 (comment)).

  This is an improvement of gravitystorm#1038.

  This resolves gravitystorm#985, resolves gravitystorm#1029, resolves gravitystorm#1336.

* Give amenity priority over shop.

  This resolves gravitystorm#963.

* Give tourism priority over amenity, shop, leisure, landuse, man_made, natural,
  and place.

  This resolves gravitystorm#1269, resolves first issue of gravitystorm#1232.
sommerluk pushed a commit to sommerluk/openstreetmap-carto that referenced this issue Mar 16, 2015
* Make sure conditions are checked in both WHERE and COALESCE
  Checking the condition in the WHERE class is necessary for performance.
  Checking the condition in the COALESCE is necessary to prevent unrendered tags
  blocking rendering of tags further down in the COALESCE.
  See also the discussion [here](gravitystorm#1038 (comment)).

  This is an improvement of gravitystorm#1038.

  This resolves gravitystorm#985, resolves gravitystorm#1029, resolves gravitystorm#1336.

* Give amenity priority over shop.

  This resolves gravitystorm#963.

* Give tourism priority over amenity, shop, leisure, landuse, man_made, natural,
  and place.

  This resolves gravitystorm#1269, resolves first issue of gravitystorm#1232.
@matkoniecz matkoniecz added the bug label May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants