Skip to content

Commit c4cac3d

Browse files
authored
POI categories and Qrank (#519)
* Tiles 4.13.0, Styles 5.7.0 * add additional POI categories to style and sprite generation [#238] * implement data structure for grading of POIs based on Qrank and kind * boost POIs to lower zoom levels based on QRank * unit tests * update CHANGELOG
1 parent 550d627 commit c4cac3d

File tree

15 files changed

+196
-19
lines changed

15 files changed

+196
-19
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Tiles 4.13.0, Styles 5.7.0
2+
------
3+
- addition of more sprites for POIs
4+
- certain POI `kinds` are boosted to lower zoom levels using QRank data
5+
16
Tiles 4.12.0, Styles 5.6.0
27
------
38
- addition of generic, US:I and NL:S-road highway shields [#238]

examples/basic.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.0.1/dist/maplibre-gl.css" crossorigin="anonymous">
66
<script src="https://unpkg.com/maplibre-gl@5.0.1/dist/maplibre-gl.js" crossorigin="anonymous"></script>
77
<script src="https://unpkg.com/pmtiles@4.2.1/dist/pmtiles.js"></script>
8-
<script src="https://unpkg.com/@protomaps/basemaps@5.6.0/dist/basemaps.js"></script>
8+
<script src="https://unpkg.com/@protomaps/basemaps@5.7.0/dist/basemaps.js"></script>
99
<style>
1010
body {
1111
margin: 0;

examples/data_sandwich.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.0.1/dist/maplibre-gl.css" crossorigin="anonymous">
66
<script src="https://unpkg.com/maplibre-gl@5.0.1/dist/maplibre-gl.js" crossorigin="anonymous"></script>
77
<script src="https://unpkg.com/pmtiles@4.2.1/dist/pmtiles.js"></script>
8-
<script src="https://unpkg.com/@protomaps/basemaps@5.6.0/dist/basemaps.js"></script>
8+
<script src="https://unpkg.com/@protomaps/basemaps@5.7.0/dist/basemaps.js"></script>
99
<style>
1010
body {
1111
margin: 0;

examples/theme_language.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5.0.1/dist/maplibre-gl.css" crossorigin="anonymous">
66
<script src="https://unpkg.com/maplibre-gl@5.0.1/dist/maplibre-gl.js" crossorigin="anonymous"></script>
77
<script src="https://unpkg.com/pmtiles@4.2.1/dist/pmtiles.js"></script>
8-
<script src="https://unpkg.com/@protomaps/basemaps@5.6.0/dist/basemaps.js"></script>
8+
<script src="https://unpkg.com/@protomaps/basemaps@5.7.0/dist/basemaps.js"></script>
99
<style>
1010
body {
1111
margin: 0;

sprites/flavors/dark.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"arrow":["#666666","#666666"],
55
"green":["#30C573", "#1F1F1F"],
66
"lapis": ["#2B5CEA", "#1F1F1F"],
7-
"slategray": ["#93939F", "#1F1F1F"]
7+
"slategray": ["#93939F", "#1F1F1F"],
8+
"blue": ["#4299BB", "#1F1F1F"],
9+
"tangerine": ["#F19B6E", "#1F1F1F"],
10+
"pink": ["#EF56BA", "#1F1F1F"]
811
},
912
"icons": {
1013
"townspot":"base",
@@ -33,6 +36,7 @@
3336
"zoo":"green",
3437
"garden": "green",
3538
"bench": "green",
39+
"nature_reserve": "green",
3640
"aerodrome": "lapis",
3741
"train_station": "lapis",
3842
"bus_stop": "lapis",
@@ -43,6 +47,22 @@
4347
"school": "slategray",
4448
"animal": "slategray",
4549
"toilets": "slategray",
46-
"drinking_water": "slategray"
50+
"drinking_water": "slategray",
51+
"building": "slategray",
52+
"post_office": "slategray",
53+
"supermarket": "blue",
54+
"convenience": "blue",
55+
"books": "blue",
56+
"beauty": "blue",
57+
"electronics": "blue",
58+
"clothes": "blue",
59+
"restaurant": "tangerine",
60+
"fast_food": "tangerine",
61+
"cafe": "tangerine",
62+
"bar": "tangerine",
63+
"museum": "pink",
64+
"attraction": "pink",
65+
"theatre": "pink",
66+
"artwork": "pink"
4767
}
4868
}

sprites/flavors/light.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"arrow":["#cccccc","#cccccc"],
55
"green":["#20834D", "#DEF7EA"],
66
"lapis": ["#315BCF", "#DFEAF4"],
7-
"slategray": ["#6A5B8F", "#E1F2FF"]
7+
"slategray": ["#6A5B8F", "#E1F2FF"],
8+
"blue": ["#1A8CBD", "#E5F5FB"],
9+
"tangerine": ["#FA8209", "#FCF1E1"],
10+
"pink": ["#EF56BA", "#F9EBFE"]
811
},
912
"icons": {
1013
"townspot":"base",
@@ -33,6 +36,7 @@
3336
"zoo":"green",
3437
"garden": "green",
3538
"bench": "green",
39+
"nature_reserve": "green",
3640
"aerodrome": "lapis",
3741
"train_station": "lapis",
3842
"bus_stop": "lapis",
@@ -43,6 +47,22 @@
4347
"school": "slategray",
4448
"animal": "slategray",
4549
"toilets": "slategray",
46-
"drinking_water": "slategray"
50+
"drinking_water": "slategray",
51+
"building": "slategray",
52+
"post_office": "slategray",
53+
"supermarket": "blue",
54+
"convenience": "blue",
55+
"books": "blue",
56+
"beauty": "blue",
57+
"electronics": "blue",
58+
"clothes": "blue",
59+
"restaurant": "tangerine",
60+
"fast_food": "tangerine",
61+
"cafe": "tangerine",
62+
"bar": "tangerine",
63+
"museum": "pink",
64+
"attraction": "pink",
65+
"theatre": "pink",
66+
"artwork": "pink"
4767
}
4868
}

styles/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

styles/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@protomaps/basemaps",
3-
"version": "5.6.0",
3+
"version": "5.7.0",
44
"description": "Protomaps basemap style for MapLibre GL",
55
"type": "module",
66
"main": "dist/cjs/index.cjs",

styles/src/base_layers.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,23 @@ export function labels_layers(
16431643
"animal",
16441644
"toilets",
16451645
"drinking_water",
1646+
"post_office",
1647+
"building",
1648+
"townhall",
1649+
"restaurant",
1650+
"fast_food",
1651+
"cafe",
1652+
"bar",
1653+
"supermarket",
1654+
"convenience",
1655+
"books",
1656+
"beauty",
1657+
"electronics",
1658+
"clothes",
1659+
"attraction",
1660+
"museum",
1661+
"theatre",
1662+
"artwork",
16461663
],
16471664
],
16481665
],
@@ -1719,10 +1736,41 @@ export function labels_layers(
17191736
"animal",
17201737
"toilets",
17211738
"drinking_water",
1739+
"post_office",
1740+
"building",
1741+
"townhall",
17221742
],
17231743
],
17241744
],
17251745
t.pois.slategray,
1746+
[
1747+
"in",
1748+
["get", "kind"],
1749+
[
1750+
"literal",
1751+
[
1752+
"supermarket",
1753+
"convenience",
1754+
"books",
1755+
"beauty",
1756+
"electronics",
1757+
"clothes",
1758+
],
1759+
],
1760+
],
1761+
t.pois.blue,
1762+
[
1763+
"in",
1764+
["get", "kind"],
1765+
["literal", ["restaurant", "fast_food", "cafe", "bar"]],
1766+
],
1767+
t.pois.tangerine,
1768+
[
1769+
"in",
1770+
["get", "kind"],
1771+
["literal", ["attraction", "museum", "theatre", "artwork"]],
1772+
],
1773+
t.pois.pink,
17261774
t.earth,
17271775
],
17281776
"text-halo-color": t.earth,

tiles/src/main/java/com/protomaps/basemap/Basemap.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public String description() {
119119

120120
@Override
121121
public String version() {
122-
return "4.12.0";
122+
return "4.13.0";
123123
}
124124

125125
@Override
@@ -177,10 +177,12 @@ static void run(Arguments args) throws IOException {
177177
"https://r2-public.protomaps.com/datasets/daylight-landcover.gpkg");
178178

179179
Path pgfEncodingZip = sourcesDir.resolve("pgf-encoding.zip");
180+
Path qrankCsv = sourcesDir.resolve("qrank.csv.gz");
180181
Downloader.create(planetiler.config()).add("ne", neUrl, nePath)
181182
.add("pgf-encoding", "https://wipfli.github.io/pgf-encoding/pgf-encoding.zip", pgfEncodingZip)
183+
.add("qrank", "https://qrank.toolforge.org/download/qrank.csv.gz", qrankCsv)
182184
.run();
183-
var qrankDb = QrankDb.empty();
185+
var qrankDb = QrankDb.fromCsv(qrankCsv);
184186

185187
FontRegistry fontRegistry = FontRegistry.getInstance();
186188
fontRegistry.setZipFilePath(pgfEncodingZip.toString());

0 commit comments

Comments
 (0)