From 182482bf2b9c2371eef4896aedf108bedf6f6508 Mon Sep 17 00:00:00 2001 From: Oliver Wipfli Date: Tue, 20 Dec 2022 19:55:35 +0100 Subject: [PATCH 1/2] Add a custommap standalone pom file --- planetiler-custommap/README.md | 22 +++- planetiler-custommap/standalone.pom.xml | 130 ++++++++++++++++++++++++ 2 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 planetiler-custommap/standalone.pom.xml diff --git a/planetiler-custommap/README.md b/planetiler-custommap/README.md index e3bb2cfec5..bf5155f247 100644 --- a/planetiler-custommap/README.md +++ b/planetiler-custommap/README.md @@ -4,9 +4,7 @@ You can define how planetiler turns input sources into vector tiles by running p file as the first argument: ```bash -# from a java build -java -jar planetiler.jar schema.yml -# or with docker (put the schema in data/schema.yml to include in the attached volume) +# With docker (put the schema in data/schema.yml to include in the attached volume) docker run -v "$(pwd)/data":/data ghcr.io/onthegomap/planetiler:latest /data/schema.yml ``` @@ -18,6 +16,24 @@ available options. See the [samples](src/main/resources/samples) directory for w Only a subset of the Java API is currently exposed so for more complex schemas you should switch to the Java API (see the [examples project](../planetiler-examples)). Feedback is welcome to help shape the final product! +## Local Build and Usage + +Build the configurable Planetiler profile locally with: + +```bash +../mvnw clean package --file standalone.pom.xml +``` + +To build the `shortbread.yml` configurable schema from the samples folder, run: +```bash +java -cp target/*with-deps.jar com.onthegomap.planetiler.custommap.ConfiguredMapMain --download --schema src/main/resources/samples/shortbread.yml +``` + +Inspect the generated tiles with: +```bash +docker run --rm -it -v "$(pwd)/data":/data -p 8080:8080 maptiler/tileserver-gl -p 8080 +``` + ## Root The root of the schema has the following attributes: diff --git a/planetiler-custommap/standalone.pom.xml b/planetiler-custommap/standalone.pom.xml new file mode 100644 index 0000000000..88aaf07e10 --- /dev/null +++ b/planetiler-custommap/standalone.pom.xml @@ -0,0 +1,130 @@ + + + 4.0.0 + + planetiler-custommap + + + com.onthegomap.planetiler + planetiler-parent + ${revision} + + + + UTF-8 + 16 + 16 + 0.6-SNAPSHOT + 5.9.1 + + com.onthegomap.planetiler.examples.BikeRouteOverlay + + + + + com.onthegomap.planetiler + planetiler-core + ${project.parent.version} + + + org.snakeyaml + snakeyaml-engine + + + org.commonmark + commonmark + + + org.projectnessie.cel + cel-tools + + + + com.onthegomap.planetiler + planetiler-core + ${project.parent.version} + test-jar + test + + + + + + + org.projectnessie.cel + cel-bom + 0.3.11 + pom + import + + + + + + + + io.github.zlika + reproducible-build-maven-plugin + + + + maven-deploy-plugin + + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M7 + + + org.apache.maven.plugins + maven-failsafe-plugin + 3.0.0-M7 + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.4.2 + + + com.onthegomap.planetiler + planetiler-core + ${planetiler.version} + + + + + + + true + + + ${mainClass} + + + + with-deps + + + + + + make-assembly + package + + single + + + + + + + From eda724179c8baa8ea7ce61b2dbc3070201038776 Mon Sep 17 00:00:00 2001 From: Oliver Wipfli Date: Tue, 20 Dec 2022 20:00:36 +0100 Subject: [PATCH 2/2] Lint --- planetiler-custommap/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/planetiler-custommap/README.md b/planetiler-custommap/README.md index bf5155f247..a0eea0a7c4 100644 --- a/planetiler-custommap/README.md +++ b/planetiler-custommap/README.md @@ -25,11 +25,13 @@ Build the configurable Planetiler profile locally with: ``` To build the `shortbread.yml` configurable schema from the samples folder, run: + ```bash java -cp target/*with-deps.jar com.onthegomap.planetiler.custommap.ConfiguredMapMain --download --schema src/main/resources/samples/shortbread.yml ``` Inspect the generated tiles with: + ```bash docker run --rm -it -v "$(pwd)/data":/data -p 8080:8080 maptiler/tileserver-gl -p 8080 ```