diff --git a/README.md b/README.md index c940b6d435..f5fc3348cc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Planetiler Basemap Profile +# Planetiler OpenMapTiles Profile -This basemap profile is based on [OpenMapTiles](https://github.com/openmaptiles/openmaptiles) v3.13. -See [README.md](../README.md) in the parent directory for instructions on how to run. +This OpenMapTiles profile is based on [OpenMapTiles](https://github.com/openmaptiles/openmaptiles). +See [README.md](https://github.com/onthegomap/planetiler/blob/main/README.md) in the parent repository for instructions on how to run. ## Differences from OpenMapTiles @@ -14,30 +14,30 @@ See [README.md](../README.md) in the parent directory for instructions on how to ## Code Layout -[Generate.java](./src/main/java/com/onthegomap/planetiler/basemap/Generate.java) generates code in -the [generated](./src/main/java/com/onthegomap/planetiler/basemap/generated) package from an OpenMapTiles tag in GitHub: +[Generate.java](./src/main/java/com/onthegomap/planetiler/openmaptiles/Generate.java) generates code in +the [generated](./src/main/java/com/onthegomap/planetiler/openmaptiles/generated) package from an OpenMapTiles tag in GitHub: -- [OpenMapTilesSchema](./src/main/java/com/onthegomap/planetiler/basemap/generated/OpenMapTilesSchema.java) +- [OpenMapTilesSchema](./src/main/java/com/onthegomap/planetiler/openmaptiles/generated/OpenMapTilesSchema.java) contains an interface for each layer with constants for the name, attributes, and allowed values for each tag in that layer -- [Tables](./src/main/java/com/onthegomap/planetiler/basemap/generated/Tables.java) +- [Tables](./src/main/java/com/onthegomap/planetiler/openmaptiles/generated/Tables.java) contains a record for each table that OpenMapTiles [imposm3](https://github.com/omniscale/imposm3) configuration generates (along with the tag-filtering expression) so layers can listen on instances of those records instead of doing the tag filtering and parsing themselves -The [layers](./src/main/java/com/onthegomap/planetiler/basemap/layers) package contains a port of the SQL logic to +The [layers](./src/main/java/com/onthegomap/planetiler/openmaptiles/layers) package contains a port of the SQL logic to generate each layer from OpenMapTiles. Layers define how source features (or parsed imposm3 table rows) map to vector tile features, and logic for post-processing tile geometries. -[BasemapProfile](./src/main/java/com/onthegomap/planetiler/basemap/BasemapProfile.java) dispatches source features to +[OpenMapTilesProfile](./src/main/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesProfile.java) dispatches source features to layer handlers and merges the results. -[BasemapMain](./src/main/java/com/onthegomap/planetiler/basemap/BasemapMain.java) is the main driver that registers +[OpenMapTilesMain](./src/main/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesMain.java) is the main driver that registers source data and output location. ## Regenerating Code -To run `Generate.java`, use [scripts/regenerate-openmaptiles.sh](../scripts/regenerate-openmaptiles.sh) script with the +To run `Generate.java`, use [scripts/regenerate-openmaptiles.sh](https://github.com/onthegomap/planetiler/blob/main/scripts/regenerate-openmaptiles.sh) script with the OpenMapTiles release tag: ```bash diff --git a/pom.xml b/pom.xml index 4a9d3b276d..ee8e94618d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - planetiler-basemap + planetiler-openmaptiles com.onthegomap.planetiler diff --git a/src/main/java/com/onthegomap/planetiler/basemap/Generate.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/Generate.java similarity index 98% rename from src/main/java/com/onthegomap/planetiler/basemap/Generate.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/Generate.java index 9366af47fa..031211d30c 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/Generate.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/Generate.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap; +package com.onthegomap.planetiler.openmaptiles; import static com.onthegomap.planetiler.expression.Expression.*; import static java.util.stream.Collectors.joining; @@ -161,9 +161,9 @@ public static void main(String[] args) throws IOException { tables.putAll(layer.tables); } - String packageName = "com.onthegomap.planetiler.basemap.generated"; + String packageName = "com.onthegomap.planetiler.openmaptiles.generated"; String[] packageParts = packageName.split("\\."); - Path output = Path.of("planetiler-basemap", "src", "main", "java") + Path output = Path.of("planetiler-openmaptiles", "src", "main", "java") .resolve(Path.of(packageParts[0], Arrays.copyOfRange(packageParts, 1, packageParts.length))); FileUtils.deleteDirectory(output); @@ -188,7 +188,7 @@ private static void emitLayerSchemaDefinitions(OpenmaptilesTileSet info, List createInstances(Translations translations, PlanetilerC info.languages.stream().map(Format::quote).collect(joining(", ")), layers.stream() .map( - l -> "new com.onthegomap.planetiler.basemap.layers.%s(translations, config, stats)" + l -> "new com.onthegomap.planetiler.openmaptiles.layers.%s(translations, config, stats)" .formatted(lowerUnderscoreToUpperCamel(l.layer.id))) .collect(joining("," + LINE_SEPARATOR)) .indent(6).trim() diff --git a/src/main/java/com/onthegomap/planetiler/basemap/Layer.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/Layer.java similarity index 70% rename from src/main/java/com/onthegomap/planetiler/basemap/Layer.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/Layer.java index 20446594fa..e34f4a9755 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/Layer.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/Layer.java @@ -1,8 +1,8 @@ -package com.onthegomap.planetiler.basemap; +package com.onthegomap.planetiler.openmaptiles; import com.onthegomap.planetiler.ForwardingProfile; -/** Interface for all vector tile layer implementations that {@link BasemapProfile} delegates to. */ +/** Interface for all vector tile layer implementations that {@link OpenMapTilesProfile} delegates to. */ public interface Layer extends ForwardingProfile.Handler, ForwardingProfile.HandlerForLayer {} diff --git a/src/main/java/com/onthegomap/planetiler/basemap/BasemapMain.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesMain.java similarity index 79% rename from src/main/java/com/onthegomap/planetiler/basemap/BasemapMain.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesMain.java index 53aa1d9c7c..3c9abc67ef 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/BasemapMain.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesMain.java @@ -1,14 +1,14 @@ -package com.onthegomap.planetiler.basemap; +package com.onthegomap.planetiler.openmaptiles; import com.onthegomap.planetiler.Planetiler; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; import com.onthegomap.planetiler.config.Arguments; import java.nio.file.Path; /** - * Main entrypoint for generating a map using the basemap schema. + * Main entrypoint for generating a map using the OpenMapTiles schema. */ -public class BasemapMain { +public class OpenMapTilesMain { public static void main(String[] args) throws Exception { run(Arguments.fromArgsOrConfigFile(args)); @@ -29,21 +29,21 @@ static void run(Arguments arguments) throws Exception { .setDefaultLanguages(OpenMapTilesSchema.LANGUAGES) .fetchWikidataNameTranslations(sourcesDir.resolve("wikidata_names.json")) // defer creation of the profile because it depends on data from the runner - .setProfile(BasemapProfile::new) + .setProfile(OpenMapTilesProfile::new) // override any of these with arguments: --osm_path=... or --osm_url=... // or OSM_PATH=... OSM_URL=... environmental argument // or osm_path=... osm_url=... in a config file - .addShapefileSource("EPSG:3857", BasemapProfile.LAKE_CENTERLINE_SOURCE, + .addShapefileSource("EPSG:3857", OpenMapTilesProfile.LAKE_CENTERLINE_SOURCE, sourcesDir.resolve("lake_centerline.shp.zip"), // was previously using this old build from 2016: https://github.com/lukasmartinelli/osm-lakelines/releases/download/v0.9/lake_centerline.shp.zip "https://github.com/acalcutt/osm-lakelines/releases/download/latest/lake_centerline.shp.zip") - .addShapefileSource(BasemapProfile.WATER_POLYGON_SOURCE, + .addShapefileSource(OpenMapTilesProfile.WATER_POLYGON_SOURCE, sourcesDir.resolve("water-polygons-split-3857.zip"), "https://osmdata.openstreetmap.de/download/water-polygons-split-3857.zip") - .addNaturalEarthSource(BasemapProfile.NATURAL_EARTH_SOURCE, + .addNaturalEarthSource(OpenMapTilesProfile.NATURAL_EARTH_SOURCE, sourcesDir.resolve("natural_earth_vector.sqlite.zip"), "https://naciscdn.org/naturalearth/packages/natural_earth_vector.sqlite.zip") - .addOsmSource(BasemapProfile.OSM_SOURCE, + .addOsmSource(OpenMapTilesProfile.OSM_SOURCE, sourcesDir.resolve(area.replaceAll("[^a-zA-Z]+", "_") + ".osm.pbf"), "planet".equalsIgnoreCase(area) ? ("aws:latest") : ("geofabrik:" + area)) // override with --mbtiles=... argument or MBTILES=... env var or mbtiles=... in a config file diff --git a/src/main/java/com/onthegomap/planetiler/basemap/BasemapProfile.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesProfile.java similarity index 95% rename from src/main/java/com/onthegomap/planetiler/basemap/BasemapProfile.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesProfile.java index 2e976a8799..91fec55312 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/BasemapProfile.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesProfile.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap; +package com.onthegomap.planetiler.openmaptiles; import static com.onthegomap.planetiler.geo.GeoUtils.EMPTY_LINE; import static com.onthegomap.planetiler.geo.GeoUtils.EMPTY_POINT; @@ -8,10 +8,10 @@ import com.onthegomap.planetiler.ForwardingProfile; import com.onthegomap.planetiler.Planetiler; import com.onthegomap.planetiler.Profile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.layers.Transportation; -import com.onthegomap.planetiler.basemap.layers.TransportationName; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.layers.Transportation; +import com.onthegomap.planetiler.openmaptiles.layers.TransportationName; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.expression.MultiExpression; import com.onthegomap.planetiler.reader.SimpleFeature; @@ -41,7 +41,7 @@ * {@link FinishHandler} or post-process features in that layer before rendering the output tile by implementing * {@link FeaturePostProcessor}. */ -public class BasemapProfile extends ForwardingProfile { +public class OpenMapTilesProfile extends ForwardingProfile { // IDs used in stats and logs for each input source, as well as argument/config file overrides to source locations public static final String LAKE_CENTERLINE_SOURCE = "lake_centerlines"; @@ -53,11 +53,11 @@ public class BasemapProfile extends ForwardingProfile { /** Index variant that filters out any table only used by layers that implement IgnoreWikidata class. */ private final MultiExpression.Index wikidataMappings; - public BasemapProfile(Planetiler runner) { + public OpenMapTilesProfile(Planetiler runner) { this(runner.translations(), runner.config(), runner.stats()); } - public BasemapProfile(Translations translations, PlanetilerConfig config, Stats stats) { + public OpenMapTilesProfile(Translations translations, PlanetilerConfig config, Stats stats) { List onlyLayers = config.arguments().getList("only_layers", "Include only certain layers", List.of()); List excludeLayers = config.arguments().getList("exclude_layers", "Exclude certain layers", List.of()); diff --git a/src/main/java/com/onthegomap/planetiler/basemap/generated/OpenMapTilesSchema.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/generated/OpenMapTilesSchema.java similarity index 98% rename from src/main/java/com/onthegomap/planetiler/basemap/generated/OpenMapTilesSchema.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/generated/OpenMapTilesSchema.java index f366f7e415..f29e5c5171 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/generated/OpenMapTilesSchema.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/generated/OpenMapTilesSchema.java @@ -35,11 +35,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */ // AUTOGENERATED BY Generate.java -- DO NOT MODIFY -package com.onthegomap.planetiler.basemap.generated; +package com.onthegomap.planetiler.openmaptiles.generated; import static com.onthegomap.planetiler.expression.Expression.*; -import com.onthegomap.planetiler.basemap.Layer; +import com.onthegomap.planetiler.openmaptiles.Layer; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.expression.MultiExpression; import com.onthegomap.planetiler.stats.Stats; @@ -68,22 +68,22 @@ public class OpenMapTilesSchema { /** Returns a list of expected layer implementation instances from the {@code layers} package. */ public static List createInstances(Translations translations, PlanetilerConfig config, Stats stats) { return List.of( - new com.onthegomap.planetiler.basemap.layers.Water(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Waterway(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Landcover(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Landuse(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.MountainPeak(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Park(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Boundary(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Aeroway(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Transportation(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Building(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.WaterName(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.TransportationName(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Place(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Housenumber(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.Poi(translations, config, stats), - new com.onthegomap.planetiler.basemap.layers.AerodromeLabel(translations, config, stats) + new com.onthegomap.planetiler.openmaptiles.layers.Water(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Waterway(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Landcover(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Landuse(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.MountainPeak(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Park(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Boundary(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Aeroway(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Transportation(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Building(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.WaterName(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.TransportationName(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Place(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Housenumber(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.Poi(translations, config, stats), + new com.onthegomap.planetiler.openmaptiles.layers.AerodromeLabel(translations, config, stats) ); } diff --git a/src/main/java/com/onthegomap/planetiler/basemap/generated/Tables.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/generated/Tables.java similarity index 99% rename from src/main/java/com/onthegomap/planetiler/basemap/generated/Tables.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/generated/Tables.java index dbaecf62be..1a0f777704 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/generated/Tables.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/generated/Tables.java @@ -35,7 +35,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */ // AUTOGENERATED BY Generate.java -- DO NOT MODIFY -package com.onthegomap.planetiler.basemap.generated; +package com.onthegomap.planetiler.openmaptiles.generated; import static com.onthegomap.planetiler.expression.Expression.*; diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabel.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/AerodromeLabel.java similarity index 87% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabel.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/AerodromeLabel.java index 09038b4a4a..30621fe9ed 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabel.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/AerodromeLabel.java @@ -33,16 +33,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfEmpty; -import static com.onthegomap.planetiler.basemap.util.Utils.nullOrEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullOrEmpty; import com.onthegomap.planetiler.FeatureCollector; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.util.LanguageUtils; -import com.onthegomap.planetiler.basemap.util.Utils; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.util.LanguageUtils; +import com.onthegomap.planetiler.openmaptiles.util.Utils; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.expression.MultiExpression; import com.onthegomap.planetiler.stats.Stats; diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Aeroway.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Aeroway.java similarity index 94% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Aeroway.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Aeroway.java index 230a965ca8..6c961dc5a8 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Aeroway.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Aeroway.java @@ -33,11 +33,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import com.onthegomap.planetiler.FeatureCollector; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.stats.Stats; import com.onthegomap.planetiler.util.Translations; diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Boundary.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Boundary.java similarity index 97% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Boundary.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Boundary.java index 310c019b68..a5da6ea942 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Boundary.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Boundary.java @@ -33,7 +33,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.util.MemoryEstimator.CLASS_HEADER_BYTES; import static com.onthegomap.planetiler.util.MemoryEstimator.POINTER_BYTES; @@ -45,8 +45,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.FeatureMerge; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; import com.onthegomap.planetiler.collection.Hppc; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.geo.GeoUtils; @@ -92,11 +92,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */ public class Boundary implements OpenMapTilesSchema.Boundary, - BasemapProfile.NaturalEarthProcessor, - BasemapProfile.OsmRelationPreprocessor, - BasemapProfile.OsmAllProcessor, - BasemapProfile.FeaturePostProcessor, - BasemapProfile.FinishHandler { + OpenMapTilesProfile.NaturalEarthProcessor, + OpenMapTilesProfile.OsmRelationPreprocessor, + OpenMapTilesProfile.OsmAllProcessor, + OpenMapTilesProfile.FeaturePostProcessor, + OpenMapTilesProfile.FinishHandler { /* * Uses natural earth at lower zoom levels and OpenStreetMap at higher zoom levels. @@ -296,7 +296,7 @@ public void processAllOsm(SourceFeature feature, FeatureCollector features) { @Override public void finish(String sourceName, FeatureCollector.Factory featureCollectors, Consumer emit) { - if (BasemapProfile.OSM_SOURCE.equals(sourceName)) { + if (OpenMapTilesProfile.OSM_SOURCE.equals(sourceName)) { var timer = stats.startStage("boundaries"); LongObjectMap countryBoundaries = prepareRegionPolygons(); diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Building.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Building.java similarity index 94% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Building.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Building.java index ccab4f2616..77631ccaa3 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Building.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Building.java @@ -33,9 +33,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.coalesce; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce; import static com.onthegomap.planetiler.util.MemoryEstimator.CLASS_HEADER_BYTES; import static com.onthegomap.planetiler.util.Parse.parseDoubleOrNull; import static java.util.Map.entry; @@ -43,9 +43,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.FeatureMerge; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.geo.GeometryException; import com.onthegomap.planetiler.reader.osm.OsmElement; @@ -67,8 +67,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE public class Building implements OpenMapTilesSchema.Building, Tables.OsmBuildingPolygon.Handler, - BasemapProfile.FeaturePostProcessor, - BasemapProfile.OsmRelationPreprocessor { + OpenMapTilesProfile.FeaturePostProcessor, + OpenMapTilesProfile.OsmRelationPreprocessor { /* * Emit all buildings from OSM data at z14. diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Housenumber.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Housenumber.java similarity index 93% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Housenumber.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Housenumber.java index 1526459cca..77355070fe 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Housenumber.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Housenumber.java @@ -33,11 +33,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import com.onthegomap.planetiler.FeatureCollector; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.stats.Stats; import com.onthegomap.planetiler.util.Translations; diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Landcover.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Landcover.java similarity index 95% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Landcover.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Landcover.java index 2efc207f8e..68b34b89ef 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Landcover.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Landcover.java @@ -33,14 +33,14 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.FeatureMerge; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.expression.MultiExpression; import com.onthegomap.planetiler.geo.GeometryException; @@ -63,9 +63,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */ public class Landcover implements OpenMapTilesSchema.Landcover, - BasemapProfile.NaturalEarthProcessor, + OpenMapTilesProfile.NaturalEarthProcessor, Tables.OsmLandcoverPolygon.Handler, - BasemapProfile.FeaturePostProcessor { + OpenMapTilesProfile.FeaturePostProcessor { /* * Large ice areas come from natural earth and the rest come from OpenStreetMap at higher zoom diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Landuse.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Landuse.java similarity index 90% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Landuse.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Landuse.java index 54505839a9..1d9c0abbb4 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Landuse.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Landuse.java @@ -33,15 +33,15 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.coalesce; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty; import com.onthegomap.planetiler.FeatureCollector; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.reader.SourceFeature; import com.onthegomap.planetiler.stats.Stats; @@ -60,7 +60,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */ public class Landuse implements OpenMapTilesSchema.Landuse, - BasemapProfile.NaturalEarthProcessor, + OpenMapTilesProfile.NaturalEarthProcessor, Tables.OsmLandusePolygon.Handler { private static final ZoomFunction MIN_PIXEL_SIZE_THRESHOLDS = ZoomFunction.fromMaxZoomThresholds(Map.of( diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/MountainPeak.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/MountainPeak.java similarity index 93% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/MountainPeak.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/MountainPeak.java index e8b0671337..ba967cdc5e 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/MountainPeak.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/MountainPeak.java @@ -33,18 +33,18 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.elevationTags; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.elevationTags; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty; import com.carrotsearch.hppc.LongIntMap; import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.util.LanguageUtils; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.util.LanguageUtils; import com.onthegomap.planetiler.collection.Hppc; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.geo.GeometryException; @@ -70,11 +70,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * sql files. */ public class MountainPeak implements - BasemapProfile.NaturalEarthProcessor, + OpenMapTilesProfile.NaturalEarthProcessor, OpenMapTilesSchema.MountainPeak, Tables.OsmPeakPoint.Handler, Tables.OsmMountainLinestring.Handler, - BasemapProfile.FeaturePostProcessor { + OpenMapTilesProfile.FeaturePostProcessor { /* * Mountain peaks come from OpenStreetMap data and are ranked by importance (based on if they diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Park.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Park.java similarity index 92% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Park.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Park.java index 4d39424a44..f66f34411b 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Park.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Park.java @@ -33,20 +33,20 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.coalesce; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty; import static com.onthegomap.planetiler.collection.FeatureGroup.SORT_KEY_BITS; import com.carrotsearch.hppc.LongIntMap; import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.FeatureMerge; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.util.LanguageUtils; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.util.LanguageUtils; import com.onthegomap.planetiler.collection.Hppc; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.geo.GeoUtils; @@ -68,7 +68,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE public class Park implements OpenMapTilesSchema.Park, Tables.OsmParkPolygon.Handler, - BasemapProfile.FeaturePostProcessor { + OpenMapTilesProfile.FeaturePostProcessor { // constants for packing the minimum zoom ordering of park labels into the sort-key field private static final int PARK_NATIONAL_PARK_BOOST = 1 << (SORT_KEY_BITS - 1); diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Place.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Place.java similarity index 96% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Place.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Place.java index f355727e8b..099605b2d6 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Place.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Place.java @@ -33,20 +33,20 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.coalesce; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfEmpty; -import static com.onthegomap.planetiler.basemap.util.Utils.nullOrEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullOrEmpty; import static com.onthegomap.planetiler.collection.FeatureGroup.SORT_KEY_BITS; import com.carrotsearch.hppc.LongIntMap; import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.util.LanguageUtils; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.util.LanguageUtils; import com.onthegomap.planetiler.collection.Hppc; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.geo.GeoUtils; @@ -81,14 +81,14 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE */ public class Place implements OpenMapTilesSchema.Place, - BasemapProfile.NaturalEarthProcessor, + OpenMapTilesProfile.NaturalEarthProcessor, Tables.OsmContinentPoint.Handler, Tables.OsmCountryPoint.Handler, Tables.OsmStatePoint.Handler, Tables.OsmIslandPoint.Handler, Tables.OsmIslandPolygon.Handler, Tables.OsmCityPoint.Handler, - BasemapProfile.FeaturePostProcessor { + OpenMapTilesProfile.FeaturePostProcessor { /* * Place labels locations and names come from OpenStreetMap, but we also join with natural diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Poi.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Poi.java similarity index 91% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Poi.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Poi.java index 546deb021d..c090f5fb7f 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Poi.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Poi.java @@ -33,21 +33,21 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.coalesce; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfEmpty; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfLong; -import static com.onthegomap.planetiler.basemap.util.Utils.nullOrEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfLong; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullOrEmpty; import static java.util.Map.entry; import com.carrotsearch.hppc.LongIntMap; import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.util.LanguageUtils; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.util.LanguageUtils; import com.onthegomap.planetiler.collection.Hppc; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.expression.MultiExpression; @@ -68,7 +68,7 @@ public class Poi implements OpenMapTilesSchema.Poi, Tables.OsmPoiPoint.Handler, Tables.OsmPoiPolygon.Handler, - BasemapProfile.FeaturePostProcessor { + OpenMapTilesProfile.FeaturePostProcessor { /* * process() creates the raw POI feature from OSM elements and postProcess() diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Transportation.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Transportation.java similarity index 97% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Transportation.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Transportation.java index dacc80c485..4743760c78 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Transportation.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Transportation.java @@ -33,9 +33,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.*; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.*; import static com.onthegomap.planetiler.util.MemoryEstimator.CLASS_HEADER_BYTES; import static com.onthegomap.planetiler.util.MemoryEstimator.POINTER_BYTES; import static com.onthegomap.planetiler.util.MemoryEstimator.estimateSize; @@ -44,9 +44,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.FeatureMerge; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.expression.MultiExpression; import com.onthegomap.planetiler.geo.GeoUtils; @@ -91,10 +91,10 @@ public class Transportation implements Tables.OsmRailwayLinestring.Handler, Tables.OsmShipwayLinestring.Handler, Tables.OsmHighwayPolygon.Handler, - BasemapProfile.NaturalEarthProcessor, - BasemapProfile.FeaturePostProcessor, - BasemapProfile.OsmRelationPreprocessor, - BasemapProfile.IgnoreWikidata { + OpenMapTilesProfile.NaturalEarthProcessor, + OpenMapTilesProfile.FeaturePostProcessor, + OpenMapTilesProfile.OsmRelationPreprocessor, + OpenMapTilesProfile.IgnoreWikidata { /* * Generates the shape for roads, trails, ferries, railways with detailed diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/TransportationName.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/TransportationName.java similarity index 95% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/TransportationName.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/TransportationName.java index 8eaeb271e4..39d3b80303 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/TransportationName.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/TransportationName.java @@ -33,12 +33,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.layers.Transportation.highwayClass; -import static com.onthegomap.planetiler.basemap.layers.Transportation.highwaySubclass; -import static com.onthegomap.planetiler.basemap.layers.Transportation.isFootwayOrSteps; -import static com.onthegomap.planetiler.basemap.util.Utils.*; +import static com.onthegomap.planetiler.openmaptiles.layers.Transportation.highwayClass; +import static com.onthegomap.planetiler.openmaptiles.layers.Transportation.highwaySubclass; +import static com.onthegomap.planetiler.openmaptiles.layers.Transportation.isFootwayOrSteps; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.*; import com.carrotsearch.hppc.LongArrayList; import com.carrotsearch.hppc.LongByteMap; @@ -48,10 +48,10 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE import com.onthegomap.planetiler.FeatureMerge; import com.onthegomap.planetiler.ForwardingProfile; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.util.LanguageUtils; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.util.LanguageUtils; import com.onthegomap.planetiler.collection.Hppc; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.reader.osm.OsmElement; @@ -79,8 +79,8 @@ public class TransportationName implements Tables.OsmHighwayLinestring.Handler, Tables.OsmAerialwayLinestring.Handler, Tables.OsmShipwayLinestring.Handler, - BasemapProfile.FeaturePostProcessor, - BasemapProfile.IgnoreWikidata, + OpenMapTilesProfile.FeaturePostProcessor, + OpenMapTilesProfile.IgnoreWikidata, ForwardingProfile.OsmNodePreprocessor, ForwardingProfile.OsmWayPreprocessor { diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Water.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Water.java similarity index 92% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Water.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Water.java index 49afd2920e..18dcd21858 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Water.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Water.java @@ -33,13 +33,13 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import com.onthegomap.planetiler.FeatureCollector; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.util.Utils; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.util.Utils; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.expression.MultiExpression; import com.onthegomap.planetiler.reader.SourceFeature; @@ -55,8 +55,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE public class Water implements OpenMapTilesSchema.Water, Tables.OsmWaterPolygon.Handler, - BasemapProfile.NaturalEarthProcessor, - BasemapProfile.OsmWaterPolygonProcessor { + OpenMapTilesProfile.NaturalEarthProcessor, + OpenMapTilesProfile.OsmWaterPolygonProcessor { /* * At low zoom levels, use natural earth for oceans and major lakes, and at high zoom levels diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/WaterName.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/WaterName.java similarity index 94% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/WaterName.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/WaterName.java index ed0e673aa5..8e9ee467eb 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/WaterName.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/WaterName.java @@ -33,16 +33,16 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty; import com.carrotsearch.hppc.LongObjectMap; import com.onthegomap.planetiler.FeatureCollector; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.util.LanguageUtils; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.util.LanguageUtils; import com.onthegomap.planetiler.collection.Hppc; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.geo.GeoUtils; @@ -69,8 +69,8 @@ public class WaterName implements OpenMapTilesSchema.WaterName, Tables.OsmMarinePoint.Handler, Tables.OsmWaterPolygon.Handler, - BasemapProfile.NaturalEarthProcessor, - BasemapProfile.LakeCenterlineProcessor { + OpenMapTilesProfile.NaturalEarthProcessor, + OpenMapTilesProfile.LakeCenterlineProcessor { /* * Labels for lakes and oceans come primarily from OpenStreetMap data, but we also join diff --git a/src/main/java/com/onthegomap/planetiler/basemap/layers/Waterway.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Waterway.java similarity index 93% rename from src/main/java/com/onthegomap/planetiler/basemap/layers/Waterway.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Waterway.java index c91fcb6c5a..c1ab87831b 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/layers/Waterway.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/layers/Waterway.java @@ -33,20 +33,20 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty; import com.carrotsearch.hppc.LongObjectHashMap; import com.google.common.util.concurrent.AtomicDouble; import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.FeatureMerge; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; -import com.onthegomap.planetiler.basemap.generated.OpenMapTilesSchema; -import com.onthegomap.planetiler.basemap.generated.Tables; -import com.onthegomap.planetiler.basemap.util.LanguageUtils; -import com.onthegomap.planetiler.basemap.util.Utils; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; +import com.onthegomap.planetiler.openmaptiles.generated.OpenMapTilesSchema; +import com.onthegomap.planetiler.openmaptiles.generated.Tables; +import com.onthegomap.planetiler.openmaptiles.util.LanguageUtils; +import com.onthegomap.planetiler.openmaptiles.util.Utils; import com.onthegomap.planetiler.collection.Hppc; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.geo.GeometryException; @@ -70,10 +70,10 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE public class Waterway implements OpenMapTilesSchema.Waterway, Tables.OsmWaterwayLinestring.Handler, - BasemapProfile.FeaturePostProcessor, - BasemapProfile.NaturalEarthProcessor, - BasemapProfile.OsmRelationPreprocessor, - BasemapProfile.OsmAllProcessor { + OpenMapTilesProfile.FeaturePostProcessor, + OpenMapTilesProfile.NaturalEarthProcessor, + OpenMapTilesProfile.OsmRelationPreprocessor, + OpenMapTilesProfile.OsmAllProcessor { /* * Uses Natural Earth at lower zoom-levels and OpenStreetMap at higher zoom levels. diff --git a/src/main/java/com/onthegomap/planetiler/basemap/util/LanguageUtils.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/util/LanguageUtils.java similarity index 97% rename from src/main/java/com/onthegomap/planetiler/basemap/util/LanguageUtils.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/util/LanguageUtils.java index d65b26e0e3..8a29c5a158 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/util/LanguageUtils.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/util/LanguageUtils.java @@ -33,10 +33,10 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE See https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md for details on usage */ -package com.onthegomap.planetiler.basemap.util; +package com.onthegomap.planetiler.openmaptiles.util; -import static com.onthegomap.planetiler.basemap.util.Utils.coalesce; -import static com.onthegomap.planetiler.basemap.util.Utils.nullIfEmpty; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.nullIfEmpty; import com.onthegomap.planetiler.util.Translations; import java.util.HashMap; diff --git a/src/main/java/com/onthegomap/planetiler/basemap/util/Utils.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/util/Utils.java similarity index 98% rename from src/main/java/com/onthegomap/planetiler/basemap/util/Utils.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/util/Utils.java index 130815538b..fe8190cb00 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/util/Utils.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/util/Utils.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap.util; +package com.onthegomap.planetiler.openmaptiles.util; import com.onthegomap.planetiler.util.Parse; import java.util.Map; diff --git a/src/main/java/com/onthegomap/planetiler/basemap/util/VerifyMonaco.java b/src/main/java/com/onthegomap/planetiler/openmaptiles/util/VerifyMonaco.java similarity index 96% rename from src/main/java/com/onthegomap/planetiler/basemap/util/VerifyMonaco.java rename to src/main/java/com/onthegomap/planetiler/openmaptiles/util/VerifyMonaco.java index 5250a80cf2..efd57d429e 100644 --- a/src/main/java/com/onthegomap/planetiler/basemap/util/VerifyMonaco.java +++ b/src/main/java/com/onthegomap/planetiler/openmaptiles/util/VerifyMonaco.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap.util; +package com.onthegomap.planetiler.openmaptiles.util; import com.onthegomap.planetiler.mbtiles.Mbtiles; import com.onthegomap.planetiler.mbtiles.Verify; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/GenerateTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/GenerateTest.java similarity index 97% rename from src/test/java/com/onthegomap/planetiler/basemap/GenerateTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/GenerateTest.java index 227dd4ac6d..a0d9ca3dc0 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/GenerateTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/GenerateTest.java @@ -1,6 +1,6 @@ -package com.onthegomap.planetiler.basemap; +package com.onthegomap.planetiler.openmaptiles; -import static com.onthegomap.planetiler.basemap.Generate.parseYaml; +import static com.onthegomap.planetiler.openmaptiles.Generate.parseYaml; import static com.onthegomap.planetiler.expression.Expression.*; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.DynamicTest.dynamicTest; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/BasemapProfileTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesProfileTest.java similarity index 86% rename from src/test/java/com/onthegomap/planetiler/basemap/BasemapProfileTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesProfileTest.java index e7d4941886..864d8ee2d7 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/BasemapProfileTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesProfileTest.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap; +package com.onthegomap.planetiler.openmaptiles; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -11,12 +11,12 @@ import java.util.List; import org.junit.jupiter.api.Test; -class BasemapProfileTest { +class OpenMapTilesProfileTest { private final Wikidata.WikidataTranslations wikidataTranslations = new Wikidata.WikidataTranslations(); private final Translations translations = Translations.defaultProvider(List.of("en", "es", "de")) .addTranslationProvider(wikidataTranslations); - private final BasemapProfile profile = new BasemapProfile(translations, PlanetilerConfig.defaults(), + private final OpenMapTilesProfile profile = new OpenMapTilesProfile(translations, PlanetilerConfig.defaults(), Stats.inMemory()); @Test diff --git a/src/test/java/com/onthegomap/planetiler/basemap/BasemapTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesTest.java similarity index 95% rename from src/test/java/com/onthegomap/planetiler/basemap/BasemapTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesTest.java index ef50abff10..5c41213a4b 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/BasemapTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/OpenMapTilesTest.java @@ -1,15 +1,15 @@ -package com.onthegomap.planetiler.basemap; +package com.onthegomap.planetiler.openmaptiles; import static com.onthegomap.planetiler.TestUtils.assertContains; import static com.onthegomap.planetiler.TestUtils.assertFeatureNear; -import static com.onthegomap.planetiler.basemap.util.VerifyMonaco.MONACO_BOUNDS; +import static com.onthegomap.planetiler.openmaptiles.util.VerifyMonaco.MONACO_BOUNDS; import static com.onthegomap.planetiler.util.Gzip.gunzip; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.DynamicTest.dynamicTest; import com.onthegomap.planetiler.TestUtils; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.util.VerifyMonaco; +import com.onthegomap.planetiler.openmaptiles.util.VerifyMonaco; import com.onthegomap.planetiler.config.Arguments; import com.onthegomap.planetiler.mbtiles.Mbtiles; import java.io.IOException; @@ -30,12 +30,12 @@ import org.locationtech.jts.geom.Polygon; /** - * End-to-end tests for basemap generation. + * End-to-end tests for OpenMapTiles generation. *

* Generates an entire map for the smallest openstreetmap extract available (Monaco) and asserts that expected output * features exist */ -class BasemapTest { +class OpenMapTilesTest { @TempDir static Path tmpDir; @@ -44,7 +44,7 @@ class BasemapTest { @BeforeAll public static void runPlanetiler() throws Exception { Path dbPath = tmpDir.resolve("output.mbtiles"); - BasemapMain.run(Arguments.of( + OpenMapTilesMain.run(Arguments.of( // Override input source locations "osm_path", TestUtils.pathToResource("monaco-latest.osm.pbf"), "natural_earth_path", TestUtils.pathToResource("natural_earth_vector.sqlite.zip"), diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/AbstractLayerTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/AbstractLayerTest.java similarity index 95% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/AbstractLayerTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/AbstractLayerTest.java index 581af6b8ff..ba23fbf30a 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/AbstractLayerTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/AbstractLayerTest.java @@ -1,18 +1,18 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.assertSubmap; import static com.onthegomap.planetiler.TestUtils.newLineString; import static com.onthegomap.planetiler.TestUtils.newPoint; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.OSM_SOURCE; -import static com.onthegomap.planetiler.basemap.util.Utils.coalesce; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.OSM_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.util.Utils.coalesce; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; import com.onthegomap.planetiler.FeatureCollector; import com.onthegomap.planetiler.TestUtils; import com.onthegomap.planetiler.VectorTile; -import com.onthegomap.planetiler.basemap.BasemapProfile; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.geo.GeoUtils; import com.onthegomap.planetiler.geo.GeometryException; @@ -37,7 +37,7 @@ public abstract class AbstractLayerTest { .addTranslationProvider(wikidataTranslations); final PlanetilerConfig params = PlanetilerConfig.defaults(); - final BasemapProfile profile = new BasemapProfile(translations, PlanetilerConfig.defaults(), + final OpenMapTilesProfile profile = new OpenMapTilesProfile(translations, PlanetilerConfig.defaults(), Stats.inMemory()); final Stats stats = Stats.inMemory(); final FeatureCollector.Factory featureCollectorFactory = new FeatureCollector.Factory(params, stats); diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabelTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/AerodromeLabelTest.java similarity index 98% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabelTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/AerodromeLabelTest.java index 5de48118b2..82b8cfe203 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/AerodromeLabelTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/AerodromeLabelTest.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import java.util.List; import java.util.Map; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/AerowayTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/AerowayTest.java similarity index 97% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/AerowayTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/AerowayTest.java index 67ebd33a19..ec55d8a5a6 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/AerowayTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/AerowayTest.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import java.util.List; import java.util.Map; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/BoundaryTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/BoundaryTest.java similarity index 98% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/BoundaryTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/BoundaryTest.java index 5ac0e1ccea..33070632ef 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/BoundaryTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/BoundaryTest.java @@ -1,9 +1,9 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.newLineString; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.NATURAL_EARTH_SOURCE; -import static com.onthegomap.planetiler.basemap.BasemapProfile.OSM_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.NATURAL_EARTH_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.OSM_SOURCE; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/BuildingTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/BuildingTest.java similarity index 97% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/BuildingTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/BuildingTest.java index c97a96e981..8a4b9eeddf 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/BuildingTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/BuildingTest.java @@ -1,7 +1,7 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.OSM_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.OSM_SOURCE; import static org.junit.jupiter.api.Assertions.assertEquals; import com.onthegomap.planetiler.VectorTile; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/HousenumberTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/HousenumberTest.java similarity index 92% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/HousenumberTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/HousenumberTest.java index f2f0dedc1e..045fce4815 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/HousenumberTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/HousenumberTest.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import java.util.List; import java.util.Map; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/LandcoverTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/LandcoverTest.java similarity index 97% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/LandcoverTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/LandcoverTest.java index 94d26cea2c..5f2fab2e98 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/LandcoverTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/LandcoverTest.java @@ -1,7 +1,7 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.NATURAL_EARTH_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.NATURAL_EARTH_SOURCE; import static org.junit.jupiter.api.Assertions.assertEquals; import com.onthegomap.planetiler.VectorTile; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/LanduseTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/LanduseTest.java similarity index 93% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/LanduseTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/LanduseTest.java index a054d00f09..ff21bcab1d 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/LanduseTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/LanduseTest.java @@ -1,7 +1,7 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.NATURAL_EARTH_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.NATURAL_EARTH_SOURCE; import com.onthegomap.planetiler.geo.GeoUtils; import com.onthegomap.planetiler.reader.SimpleFeature; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/MountainPeakTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/MountainPeakTest.java similarity index 96% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/MountainPeakTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/MountainPeakTest.java index f121e78668..991bbfbbed 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/MountainPeakTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/MountainPeakTest.java @@ -1,9 +1,9 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.newPoint; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.NATURAL_EARTH_SOURCE; -import static com.onthegomap.planetiler.basemap.BasemapProfile.OSM_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.NATURAL_EARTH_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.OSM_SOURCE; import static org.junit.jupiter.api.Assertions.assertEquals; import com.google.common.collect.Lists; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/ParkTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/ParkTest.java similarity index 98% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/ParkTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/ParkTest.java index d914891bb3..33cd12a2ab 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/ParkTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/ParkTest.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import com.onthegomap.planetiler.geo.GeoUtils; import java.util.List; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/PlaceTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/PlaceTest.java similarity index 97% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/PlaceTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/PlaceTest.java index 8c7e9feaee..1523991788 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/PlaceTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/PlaceTest.java @@ -1,10 +1,10 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.newPoint; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.NATURAL_EARTH_SOURCE; -import static com.onthegomap.planetiler.basemap.BasemapProfile.OSM_SOURCE; -import static com.onthegomap.planetiler.basemap.layers.Place.getSortKey; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.NATURAL_EARTH_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.OSM_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.layers.Place.getSortKey; import static com.onthegomap.planetiler.collection.FeatureGroup.SORT_KEY_MAX; import static com.onthegomap.planetiler.collection.FeatureGroup.SORT_KEY_MIN; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/PoiTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/PoiTest.java similarity index 98% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/PoiTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/PoiTest.java index 82dedb1e46..bfa26e71e2 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/PoiTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/PoiTest.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/TransportationTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/TransportationTest.java similarity index 98% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/TransportationTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/TransportationTest.java index 613f80b43d..535ab5ebf7 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/TransportationTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/TransportationTest.java @@ -1,13 +1,13 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.newLineString; import static com.onthegomap.planetiler.TestUtils.newPoint; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.NATURAL_EARTH_SOURCE; -import static com.onthegomap.planetiler.basemap.BasemapProfile.OSM_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.NATURAL_EARTH_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.OSM_SOURCE; import com.onthegomap.planetiler.FeatureCollector; -import com.onthegomap.planetiler.basemap.BasemapProfile; +import com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile; import com.onthegomap.planetiler.config.Arguments; import com.onthegomap.planetiler.config.PlanetilerConfig; import com.onthegomap.planetiler.geo.GeometryException; @@ -400,7 +400,7 @@ void testMinorRouteRef() { "highway", "tertiary" )))); - var profileWithMinorRefs = new BasemapProfile(translations, PlanetilerConfig.from(Arguments.of(Map.of( + var profileWithMinorRefs = new OpenMapTilesProfile(translations, PlanetilerConfig.from(Arguments.of(Map.of( "transportation_name_minor_refs", "true" ))), Stats.inMemory()); @@ -1225,7 +1225,7 @@ void testSortKeys() { @Test void testTransportationNameLayerRequiresTransportationLayer() { - var profile = new BasemapProfile(translations, PlanetilerConfig.from(Arguments.of( + var profile = new OpenMapTilesProfile(translations, PlanetilerConfig.from(Arguments.of( "only_layers", "transportation_name" )), Stats.inMemory()); SourceFeature feature = lineFeature(Map.of( diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/WaterNameTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/WaterNameTest.java similarity index 94% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/WaterNameTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/WaterNameTest.java index dd5370b0b9..bcf3317b26 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/WaterNameTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/WaterNameTest.java @@ -1,10 +1,10 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.newLineString; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.LAKE_CENTERLINE_SOURCE; -import static com.onthegomap.planetiler.basemap.BasemapProfile.NATURAL_EARTH_SOURCE; -import static com.onthegomap.planetiler.basemap.BasemapProfile.OSM_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.LAKE_CENTERLINE_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.NATURAL_EARTH_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.OSM_SOURCE; import com.onthegomap.planetiler.TestUtils; import com.onthegomap.planetiler.geo.GeoUtils; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/WaterTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/WaterTest.java similarity index 94% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/WaterTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/WaterTest.java index 2347a3f3f6..703ce278ad 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/WaterTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/WaterTest.java @@ -1,9 +1,9 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.rectangle; -import static com.onthegomap.planetiler.basemap.BasemapProfile.NATURAL_EARTH_SOURCE; -import static com.onthegomap.planetiler.basemap.BasemapProfile.OSM_SOURCE; -import static com.onthegomap.planetiler.basemap.BasemapProfile.WATER_POLYGON_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.NATURAL_EARTH_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.OSM_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.WATER_POLYGON_SOURCE; import com.onthegomap.planetiler.reader.SimpleFeature; import java.util.List; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/layers/WaterwayTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/WaterwayTest.java similarity index 96% rename from src/test/java/com/onthegomap/planetiler/basemap/layers/WaterwayTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/layers/WaterwayTest.java index b43d9a9d2d..d05cedb626 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/layers/WaterwayTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/layers/WaterwayTest.java @@ -1,8 +1,8 @@ -package com.onthegomap.planetiler.basemap.layers; +package com.onthegomap.planetiler.openmaptiles.layers; import static com.onthegomap.planetiler.TestUtils.newLineString; -import static com.onthegomap.planetiler.basemap.BasemapProfile.NATURAL_EARTH_SOURCE; -import static com.onthegomap.planetiler.basemap.BasemapProfile.OSM_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.NATURAL_EARTH_SOURCE; +import static com.onthegomap.planetiler.openmaptiles.OpenMapTilesProfile.OSM_SOURCE; import static org.junit.jupiter.api.Assertions.assertEquals; import com.onthegomap.planetiler.FeatureCollector; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/util/LanguageUtilsTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/util/LanguageUtilsTest.java similarity index 97% rename from src/test/java/com/onthegomap/planetiler/basemap/util/LanguageUtilsTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/util/LanguageUtilsTest.java index fb51f61031..2e14df0210 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/util/LanguageUtilsTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/util/LanguageUtilsTest.java @@ -1,7 +1,7 @@ -package com.onthegomap.planetiler.basemap.util; +package com.onthegomap.planetiler.openmaptiles.util; import static com.onthegomap.planetiler.TestUtils.assertSubmap; -import static com.onthegomap.planetiler.basemap.util.LanguageUtils.containsOnlyLatinCharacters; +import static com.onthegomap.planetiler.openmaptiles.util.LanguageUtils.containsOnlyLatinCharacters; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNull; diff --git a/src/test/java/com/onthegomap/planetiler/basemap/util/VerifyMonacoTest.java b/src/test/java/com/onthegomap/planetiler/openmaptiles/util/VerifyMonacoTest.java similarity index 96% rename from src/test/java/com/onthegomap/planetiler/basemap/util/VerifyMonacoTest.java rename to src/test/java/com/onthegomap/planetiler/openmaptiles/util/VerifyMonacoTest.java index e74ee6a212..5438be75c1 100644 --- a/src/test/java/com/onthegomap/planetiler/basemap/util/VerifyMonacoTest.java +++ b/src/test/java/com/onthegomap/planetiler/openmaptiles/util/VerifyMonacoTest.java @@ -1,4 +1,4 @@ -package com.onthegomap.planetiler.basemap.util; +package com.onthegomap.planetiler.openmaptiles.util; import static com.onthegomap.planetiler.geo.GeoUtils.point; import static com.onthegomap.planetiler.util.Gzip.gzip;