Skip to content

Update locale attribute names for Diplomat locale-based labels#757

Open
Rub21 wants to merge 14 commits into
stagingfrom
1257_localized
Open

Update locale attribute names for Diplomat locale-based labels#757
Rub21 wants to merge 14 commits into
stagingfrom
1257_localized

Conversation

@Rub21
Copy link
Copy Markdown
Member

@Rub21 Rub21 commented May 6, 2026

I made some changes that require an imposm re-import, so I am considering to solve those issues in this PR:

Comment thread images/tiler-server-martin/scripts/generate_functions.py Outdated
Comment thread images/tiler-imposm/queries/ohm_mviews/buildings.sql Outdated
Comment thread images/tiler-imposm/queries/ohm_mviews/buildings.sql Outdated
Comment thread images/tiler-imposm/queries/utils/postgis_helpers.sql Outdated
Comment thread images/tiler-imposm/queries/utils/postgis_helpers.sql Outdated
Comment thread images/tiler-imposm/queries/utils/postgis_helpers.sql Outdated
Comment thread images/tiler-imposm/config/layers/buildings.json
-- Normalize Unicode quotes/primes to ASCII; map NBSP to space.
s := translate(input,
E'‘’‛′“”‟″ ',
'''''''''""""' || ' ');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my new favorite example of quote escaping. 😊

NULL,
NULL
'(class = ''building:part'') AS is_building_part, EXISTS (SELECT 1 FROM osm_buildings_relation_members obrm WHERE obrm.member = ABS(osm_buildings.osm_id) AND obrm.role = ''outline'') AS hide_3d',
'{"height": "COALESCE(parse_to_meters(height), parse_to_meters(building_height))", "min_height": "parse_to_meters(min_height)", "roof_height": "parse_to_meters(roof_height)", "building_levels": "clean_numeric(building_levels)", "building_min_level": "clean_numeric(building_min_level)"}'::jsonb,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, most OSM tilesets seem to omit building:levels=* and building:min_level=*, instead using these tags as a fallback in case height=* and min_height=* are missing, respectively. They generally assume that a level is 3 meters tall. Some tilesets randomize the heights slightly so that adjacent buildings with the same number of levels look distinct on the map. A stylesheet can’t do that because it evaluates each building individually without context about surrounding buildings.

We can ticket out this fallback as tail work, since we’d have to think through the implications for roof:levels=* too.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants