-
-
Notifications
You must be signed in to change notification settings - Fork 3
Update locale attribute names for Diplomat locale-based labels #757
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
base: staging
Are you sure you want to change the base?
Changes from all commits
9e8ffd0
672b7fa
8b07a76
d82cfc3
12dca09
fab2c54
099744c
087fe29
ca3fddf
301f964
de4fa70
20c5947
bd5d4d2
45c401e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| { | ||
| "tags": { | ||
| "load_all": true, | ||
| "exclude": [ | ||
| "created_by", | ||
| "source", | ||
| "source:datetime" | ||
| ] | ||
| }, | ||
| "generalized_tables": {}, | ||
| "tables": { | ||
| "buildings_relation_members": { | ||
| "type": "relation_member", | ||
| "fields": [ | ||
| { | ||
| "type": "id", | ||
| "name": "osm_id", | ||
| "key": null | ||
| }, | ||
| { | ||
| "type": "mapping_value", | ||
| "name": "type", | ||
| "key": null | ||
| }, | ||
| { | ||
| "type": "mapping_key", | ||
| "name": "class", | ||
| "key": null | ||
| }, | ||
| { | ||
| "type": "hstore_tags", | ||
| "name": "tags", | ||
| "key": null | ||
| }, | ||
| { | ||
| "name": "geometry", | ||
| "type": "geometry" | ||
| }, | ||
| { | ||
| "name": "member", | ||
| "type": "member_id" | ||
| }, | ||
| { | ||
| "name": "role", | ||
| "type": "member_role" | ||
| }, | ||
| { | ||
| "name": "me_building", | ||
| "type": "string", | ||
| "key": "building", | ||
| "from_member": true | ||
| }, | ||
| { | ||
| "name": "me_building_part", | ||
| "type": "string", | ||
| "key": "building:part", | ||
| "from_member": true | ||
| }, | ||
| { | ||
| "type": "hstore_tags", | ||
| "name": "me_tags", | ||
| "from_member": true | ||
| } | ||
| ], | ||
| "mapping": { | ||
| "type": [ | ||
| "building" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| { | ||
| "tags": { | ||
| "load_all": true, | ||
| "exclude": [ | ||
| "created_by", | ||
| "source", | ||
| "source:datetime" | ||
| ] | ||
| }, | ||
| "generalized_tables": {}, | ||
| "tables": { | ||
| "water_multilines": { | ||
| "type": "relation_member", | ||
| "fields": [ | ||
| { | ||
| "type": "id", | ||
| "name": "osm_id", | ||
| "key": null | ||
| }, | ||
| { | ||
| "type": "geometry", | ||
| "name": "geometry", | ||
| "key": null | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "name": "name", | ||
| "key": "name" | ||
| }, | ||
| { | ||
| "type": "mapping_value", | ||
| "name": "type", | ||
| "key": null | ||
| }, | ||
| { | ||
| "type": "mapping_key", | ||
| "name": "class", | ||
| "key": null | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "name": "bridge", | ||
| "key": "bridge" | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "name": "start_date", | ||
| "key": "start_date" | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "name": "end_date", | ||
| "key": "end_date" | ||
| }, | ||
| { | ||
| "type": "hstore_tags", | ||
| "name": "tags", | ||
| "key": null | ||
| }, | ||
| { | ||
| "type": "member_id", | ||
| "name": "member" | ||
| }, | ||
| { | ||
| "type": "hstore_tags", | ||
| "name": "me_tags", | ||
| "from_member": true | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "name": "me_name", | ||
| "key": "name", | ||
| "from_member": true | ||
| }, | ||
| { | ||
| "type": "string", | ||
| "name": "me_waterway", | ||
| "key": "waterway", | ||
| "from_member": true | ||
| } | ||
| ], | ||
| "mapping": { | ||
| "type": [ | ||
| "waterway" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,61 +1,89 @@ | ||
| -- ============================================================================ | ||
| -- Partial index on building relation outline members. | ||
| -- Speeds up the EXISTS subquery that derives hide_3d in mv_buildings_areas_z16_20. | ||
| -- Mirrors the OpenMapTiles pattern for the building layer. | ||
| -- ============================================================================ | ||
| CREATE INDEX IF NOT EXISTS osm_buildings_relation_members_outline_idx | ||
| ON osm_buildings_relation_members (member) | ||
| WHERE role = 'outline'; | ||
|
|
||
| -- ============================================================================ | ||
| -- Prepare points materialized view for higher zoom levels (12+) | ||
| -- Add height and height_fixed columns | ||
| -- All building/roof attributes (height, building:height, building:material, etc.) | ||
| -- are now extracted as native columns by imposm in osm_buildings_points | ||
| -- ============================================================================ | ||
| -- 3D / rendering attributes (height, materials, colours, levels, parts, roof | ||
| -- shape) are only meaningful on polygon footprints. Points (building=* | ||
| -- nodes) keep just identity/classification fields (name, type, building_use, | ||
| -- addresses). Inject NULLs of matching types so the UNION with polygon | ||
| -- centroids in mv_buildings_points_centroids_* aligns by name and type. | ||
| SELECT create_points_mview( | ||
| 'osm_buildings_points', | ||
| 'mv_buildings_points', | ||
| 'id, source, osm_id', | ||
| ARRAY['NULL as height'], | ||
| ARRAY[ | ||
| 'NULL::double precision AS height', | ||
| 'NULL::double precision AS min_height', | ||
| 'NULL::double precision AS roof_height', | ||
| 'NULL::numeric AS building_min_level', | ||
| 'NULL::text AS building_material', | ||
| 'NULL::numeric AS building_levels', | ||
| 'NULL::text AS building_colour', | ||
| 'NULL::text AS building_part', | ||
| 'FALSE::boolean AS is_building_part', | ||
| 'FALSE::boolean AS hide_3d', | ||
| 'NULL::text AS roof_material', | ||
| 'NULL::text AS roof_colour', | ||
| 'NULL::text AS roof_shape' | ||
| ], | ||
| NULL | ||
| ); | ||
|
|
||
|
|
||
|
|
||
| -- ============================================================================ | ||
| -- Zoom 14-15: | ||
| -- Very low simplification (5m) | ||
| -- Very small areas (>5K m² = 0.005 km²) | ||
| -- Add height_fixed column | ||
| -- Zoom 16-20: BASE | ||
| -- No simplification, all areas. Height columns are parsed to numeric here. | ||
| -- `height` falls back to deprecated `building:height` and `building_height` | ||
| -- is dropped from the output. All derived zoom levels inherit this. | ||
| -- ============================================================================ | ||
| SELECT create_areas_mview( | ||
| 'osm_buildings', | ||
| 'mv_buildings_areas_z14_15', | ||
| 5, | ||
| 5000, | ||
| 'mv_buildings_areas_z16_20', | ||
| 0, | ||
| 0, | ||
| 'id, osm_id, type', | ||
| NULL, | ||
| 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, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By the way, most OSM tilesets seem to omit We can ticket out this fallback as tail work, since we’d have to think through the implications for |
||
| ARRAY['building_height'] | ||
| ); | ||
|
|
||
| SELECT create_points_centroids_mview( | ||
| 'mv_buildings_areas_z14_15', | ||
| 'mv_buildings_points_centroids_z14_15', | ||
| 'mv_buildings_points' | ||
| ); | ||
| -- ============================================================================ | ||
| -- Zoom 16-20: | ||
| -- No simplification | ||
| -- All areas | ||
| -- Add height_fixed column | ||
| -- Zoom 14-15: derived from z16_20 | ||
| -- Low simplification (5m), filters out small buildings (<5,000 m²) | ||
| -- ============================================================================ | ||
|
|
||
| SELECT create_areas_mview( | ||
| 'osm_buildings', | ||
| SELECT create_area_mview_from_mview( | ||
| 'mv_buildings_areas_z16_20', | ||
| 0, | ||
| 0, | ||
| 'id, osm_id, type', | ||
| NULL, | ||
| NULL, | ||
| 'mv_buildings_areas_z14_15', | ||
| 5, | ||
| 5000, | ||
| NULL | ||
| ); | ||
|
|
||
| -- ============================================================================ | ||
| -- Centroids per zoom level (UNION with point-tagged buildings) | ||
| -- ============================================================================ | ||
| SELECT create_points_centroids_mview( | ||
| 'mv_buildings_areas_z16_20', | ||
| 'mv_buildings_points_centroids_z16_20', | ||
| 'mv_buildings_points' | ||
| ); | ||
| SELECT create_points_centroids_mview( | ||
| 'mv_buildings_areas_z14_15', | ||
| 'mv_buildings_points_centroids_z14_15', | ||
| 'mv_buildings_points' | ||
| ); | ||
|
|
||
| -- Refresh areas views | ||
| -- REFRESH MATERIALIZED VIEW CONCURRENTLY mv_buildings_areas_z14_15; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.