Skip to content

Boundaries admin level 3 5 #202

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

Merged
merged 4 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions app/src/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,19 @@
"tags": ["bridge", "ch"],
"center": [8.54252, 47.376925],
"zoom": 17
},
{
"name": "brazil-boundaries",
"description": "admin boundaries other than Brasilia should be visible at zoom 6",
"tags": ["boundaries"],
"center": [-49.092, -15.092],
"zoom": 6
},
{
"name": "kenya-boundaries",
"description": "admin boundaries level 5 around Nairobi should not appear broken",
"tags": ["boundaries"],
"center": [37.382, -1.592],
"zoom": 7
}
]
4 changes: 2 additions & 2 deletions app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sirv from "sirv";
import react from "@vitejs/plugin-react";
import { resolve } from "path";

const serve = sirv("../tiles");
const serve = sirv("../tiles", { dev: true });

const servePmtilesInTilesDir = () => ({
name: "serve-pmtiles-in-tiles-dir",
Expand Down Expand Up @@ -32,7 +32,7 @@ export default defineConfig({
},
server: {
fs: {
allow: [searchForWorkspaceRoot(process.cwd()), '../styles/src']
allow: [searchForWorkspaceRoot(process.cwd()), "../styles/src"],
},
},
});
14 changes: 14 additions & 0 deletions tiles/src/main/java/com/protomaps/basemap/layers/Boundaries.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
// Natural Earth is used for low zooms (for compilation and tile size reasons)
themeMinZoom = 6;
}
// used in Colombia, Brazil, Kenya (historical)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Beware: In Brazil there are several "statistical" groupings of actual administrative regions. Some of these are in conventional usage, some are not. I'm also wary of adding historical boundary lines. However, since the map looks broken without this change we should make it... but worth some more research...

case 3 -> {
kind = "region";
kindDetail = "3";
minZoom = 6;
themeMinZoom = 6;
}
case 4 -> {
kind = "region";
kindDetail = "4";
Expand All @@ -207,6 +214,13 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
// Natural Earth is used for low zooms (for compilation and tile size reasons)
themeMinZoom = 6;
}
// used in Colombia, Brazil
case 5 -> {
kind = "county";
kindDetail = "5";
minZoom = 8;
themeMinZoom = 8;
}
case 6 -> {
kind = "county";
kindDetail = "6";
Expand Down