From 48b2050b0e4da952568ffd49006ee83cc6b6b7d7 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Thu, 28 Mar 2024 12:50:13 -0700 Subject: [PATCH] formatting --- .../java/com/protomaps/basemap/Basemap.java | 5 +++-- .../protomaps/basemap/layers/Landcover.java | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tiles/src/main/java/com/protomaps/basemap/Basemap.java b/tiles/src/main/java/com/protomaps/basemap/Basemap.java index d7c4987a..9406e8fd 100644 --- a/tiles/src/main/java/com/protomaps/basemap/Basemap.java +++ b/tiles/src/main/java/com/protomaps/basemap/Basemap.java @@ -8,8 +8,8 @@ import com.protomaps.basemap.layers.Boundaries; import com.protomaps.basemap.layers.Buildings; import com.protomaps.basemap.layers.Earth; -import com.protomaps.basemap.layers.Landuse; import com.protomaps.basemap.layers.Landcover; +import com.protomaps.basemap.layers.Landuse; import com.protomaps.basemap.layers.Natural; import com.protomaps.basemap.layers.PhysicalLine; import com.protomaps.basemap.layers.PhysicalPoint; @@ -133,7 +133,8 @@ static void run(Arguments args) throws Exception { "https://osmdata.openstreetmap.de/download/water-polygons-split-3857.zip") .addShapefileSource("osm_land", sourcesDir.resolve("land-polygons-split-3857.zip"), "https://osmdata.openstreetmap.de/download/land-polygons-split-3857.zip") - .addGeoPackageSource("landcover", sourcesDir.resolve("daylight-landcover.gpkg"), "https://r2-public.protomaps.com/datasets/daylight-landcover.gpkg"); + .addGeoPackageSource("landcover", sourcesDir.resolve("daylight-landcover.gpkg"), + "https://r2-public.protomaps.com/datasets/daylight-landcover.gpkg"); // Downloader.create(planetiler.config()).add("ne", neUrl, nePath) // .add("qrank", "https://qrank.wmcloud.org/download/qrank.csv.gz", sourcesDir.resolve("qrank.csv.gz")).run(); diff --git a/tiles/src/main/java/com/protomaps/basemap/layers/Landcover.java b/tiles/src/main/java/com/protomaps/basemap/layers/Landcover.java index 52eb0a58..ec11550c 100644 --- a/tiles/src/main/java/com/protomaps/basemap/layers/Landcover.java +++ b/tiles/src/main/java/com/protomaps/basemap/layers/Landcover.java @@ -6,19 +6,24 @@ import com.onthegomap.planetiler.geo.GeometryException; import com.onthegomap.planetiler.reader.SourceFeature; import com.protomaps.basemap.feature.FeatureId; - import java.util.List; public class Landcover implements ForwardingProfile.FeaturePostProcessor { public void processLandcover(SourceFeature sf, FeatureCollector features) { String kind = sf.getString("class"); - if (kind.equals("urban")) kind = "urban_area"; - if (kind.equals("crop")) kind = "farmland"; - if (kind.equals("grass")) kind = "grassland"; - if (kind.equals("trees")) kind = "forest"; - if (kind.equals("snow")) kind = "glacier"; - if (kind.equals("shrub")) kind = "scrub"; + if (kind.equals("urban")) + kind = "urban_area"; + if (kind.equals("crop")) + kind = "farmland"; + if (kind.equals("grass")) + kind = "grassland"; + if (kind.equals("trees")) + kind = "forest"; + if (kind.equals("snow")) + kind = "glacier"; + if (kind.equals("shrub")) + kind = "scrub"; // barren is passed through features.polygon(this.name())