diff --git a/placenames.mss b/placenames.mss index 8223fd41e7..ae5cb6015e 100644 --- a/placenames.mss +++ b/placenames.mss @@ -53,43 +53,39 @@ } #capital-names { - [zoom = 3][population > 600000], - [zoom >= 4][zoom < 9] { + [zoom >= 4][zoom < 8][population > 600000], + [zoom >= 5][zoom < 8] { shield-file: url('symbols/place/place-capital-6.svg'); - shield-text-dy: 4; - shield-text-dx: 4; + shield-text-dy: 6; shield-name: '[name]'; shield-face-name: @book-fonts; shield-fill: @placenames; - shield-size: 9; + shield-size: 11; shield-min-distance: 10; shield-wrap-width: 30; shield-halo-fill: rgba(255,255,255,0.6); shield-halo-radius: 1.5; shield-placement-type: simple; - shield-placements: 'NE,SE,NW,NE'; + shield-placements: 'S,N'; shield-unlock-image: true; [zoom >= 5] { - shield-size: 10; shield-wrap-width: 45; } [zoom >= 6] { - shield-size: 11; + shield-size: 12; shield-wrap-width: 60; } [zoom >= 7] { - shield-size: 12; shield-file: url('symbols/place/place-capital-8.svg'); - shield-text-dy: 5; - shield-text-dx: 5; + shield-text-dy: 7; } } - [zoom >= 9] { + [zoom >= 8] { text-name: '[name]'; text-face-name: @book-fonts; text-fill: @placenames; - text-size: 12; + text-size: 13; text-min-distance: 10; text-wrap-width: 60; text-halo-fill: rgba(255,255,255,0.6); @@ -104,43 +100,37 @@ #placenames-medium::high-importance { [category = 1][zoom < 14][score >= 400000] { - [zoom >= 5][zoom < 9] { + [zoom >= 5][zoom < 8] { shield-file: url('symbols/place/place-4.svg'); - shield-text-dy: 3; - shield-text-dx: 3; + shield-text-dy: 4; shield-name: '[name]'; shield-face-name: @book-fonts; shield-fill: @placenames; - shield-size: 9; + shield-size: 11; shield-min-distance: 10; shield-wrap-width: 30; shield-halo-fill: rgba(255,255,255,0.6); shield-halo-radius: 1.5; shield-placement-type: simple; - shield-placements: 'NE,SE,NW,NE'; + shield-placements: 'S,N'; shield-unlock-image: true; [zoom >= 5] { - shield-size: 10; shield-wrap-width: 45; } [zoom >= 6] { - shield-size: 11; + shield-size: 12; shield-wrap-width: 60; shield-file: url('symbols/place/place-6.svg'); - shield-text-dy: 4; - shield-text-dx: 4; - } - [zoom >= 8] { - shield-size: 12; + shield-text-dy: 5; } } - [zoom >= 9] { + [zoom >= 8] { text-name: '[name]'; text-face-name: @book-fonts; text-fill: @placenames; - text-size: 12; + text-size: 13; text-min-distance: 10; text-wrap-width: 60; text-halo-fill: rgba(255,255,255,0.6); @@ -156,13 +146,12 @@ #placenames-medium::medium-importance { [category = 1][score < 400000][zoom < 15] { - [zoom >= 6][zoom < 9][score >= 70000], - [zoom >= 7][zoom < 9] { + [zoom >= 6][zoom < 8][score >= 70000], + [zoom >= 7][zoom < 8] { shield-file: url('symbols/place/place-4.svg'); - shield-text-dy: 3; - shield-text-dx: 3; + shield-text-dy: 4; shield-name: "[name]"; - shield-size: 9; + shield-size: 10; shield-fill: @placenames; shield-face-name: @book-fonts; shield-halo-radius: 1.5; @@ -170,35 +159,22 @@ shield-wrap-width: 30; shield-min-distance: 10; shield-placement-type: simple; - shield-placements: 'NE,SE,NW,NE'; + shield-placements: 'S,N'; shield-unlock-image: true; - - [zoom >= 8] { - shield-size: 10; - } - [zoom >= 9] { - shield-size: 11; - shield-wrap-width: 60; - } - [zoom >= 11] { - shield-size: 14; - shield-wrap-width: 70; - } - [zoom >= 14] { - shield-size: 15; - shield-wrap-width: 75; - } } - [zoom >= 9] { + [zoom >= 7] { text-name: "[name]"; - text-size: 11; + text-size: 10; text-fill: @placenames; text-face-name: @book-fonts; text-halo-radius: 1.5; text-halo-fill: rgba(255,255,255,0.6); text-wrap-width: 60; text-min-distance: 10; - + [zoom >= 9] { + text-size: 12; + text-wrap-width: 60; + } [zoom >= 11] { text-size: 14; text-wrap-width: 70; diff --git a/project.mml b/project.mml index 52f7b9a5f0..94363e65ea 100644 --- a/project.mml +++ b/project.mml @@ -1291,7 +1291,7 @@ "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way,\n name,\n CASE\n WHEN population ~ '^-?\\d+(\\.\\d+)?$' THEN population::NUMERIC ELSE 0\n END as population\n FROM planet_osm_point\n WHERE capital = 'yes'\n AND (admin_level = '2' OR admin_level IS NULL)\n ORDER BY population DESC\n) AS capital_names", + "table": "(SELECT\n way,\n name,\n CASE\n WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER ELSE 0\n END as population\n FROM planet_osm_point\n WHERE capital = 'yes'\n AND admin_level = '2'\n ORDER BY population DESC\n) AS capital_names", "geometry_field": "way", "type": "postgis", "key_field": "", diff --git a/project.yaml b/project.yaml index 144d24e02c..40917c339e 100644 --- a/project.yaml +++ b/project.yaml @@ -1523,11 +1523,11 @@ Layer: way, name, CASE - WHEN population ~ '^-?\d+(\.\d+)?$' THEN population::NUMERIC ELSE 0 + WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER ELSE 0 END as population FROM planet_osm_point WHERE capital = 'yes' - AND (admin_level = '2' OR admin_level IS NULL) + AND admin_level = '2' ORDER BY population DESC ) AS capital_names properties: