Skip to content

Commit 58d859e

Browse files
authored
Disable QRank, as 404 stops the daily build and it's not used by Pois… (#219)
* Disable QRank, as 404 stops the daily build and it's not used by Pois yet. * formatting
1 parent 00f1faa commit 58d859e

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.onthegomap.planetiler.ForwardingProfile;
44
import com.onthegomap.planetiler.Planetiler;
55
import com.onthegomap.planetiler.config.Arguments;
6-
import com.onthegomap.planetiler.util.Downloader;
76
import com.protomaps.basemap.feature.NaturalEarthDb;
87
import com.protomaps.basemap.feature.QrankDb;
98
import com.protomaps.basemap.layers.Boundaries;
@@ -130,12 +129,13 @@ static void run(Arguments args) throws Exception {
130129
.addShapefileSource("osm_land", sourcesDir.resolve("land-polygons-split-3857.zip"),
131130
"https://osmdata.openstreetmap.de/download/land-polygons-split-3857.zip");
132131

133-
Downloader.create(planetiler.config()).add("ne", neUrl, nePath)
134-
.add("qrank", "https://qrank.wmcloud.org/download/qrank.csv.gz", sourcesDir.resolve("qrank.csv.gz")).run();
132+
// Downloader.create(planetiler.config()).add("ne", neUrl, nePath)
133+
// .add("qrank", "https://qrank.wmcloud.org/download/qrank.csv.gz", sourcesDir.resolve("qrank.csv.gz")).run();
135134

136135
var tmpDir = nePath.resolveSibling(nePath.getFileName() + "-unzipped");
137136
var naturalEarthDb = NaturalEarthDb.fromSqlite(nePath, tmpDir);
138-
var qrankDb = QrankDb.fromCsv(sourcesDir.resolve("qrank.csv.gz"));
137+
// var qrankDb = QrankDb.fromCsv(sourcesDir.resolve("qrank.csv.gz"));
138+
var qrankDb = QrankDb.empty();
139139

140140
planetiler.setProfile(new Basemap(naturalEarthDb, qrankDb)).setOutput(Path.of(area + ".pmtiles"))
141141
.run();

tiles/src/main/java/com/protomaps/basemap/feature/QrankDb.java

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public long get(String osmValue) {
3838
}
3939
}
4040

41+
public static QrankDb empty() {
42+
LongLongHashMap db = new LongLongHashMap();
43+
return new QrankDb(db);
44+
}
45+
4146
public static QrankDb fromCsv(Path csvPath) throws IOException {
4247
GZIPInputStream gzip = new GZIPInputStream(new FileInputStream(csvPath.toFile()));
4348
try (BufferedReader br = new BufferedReader(new InputStreamReader(gzip))) {

0 commit comments

Comments
 (0)