This is an automated email from the ASF dual-hosted git repository.

bchapuis pushed a commit to branch gdal
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git


The following commit(s) were added to refs/heads/gdal by this push:
     new 38343f72 Rename contour layers
38343f72 is described below

commit 38343f7282b63e975dfbfb59d19adedce9f7c443
Author: Bertil Chapuis <[email protected]>
AuthorDate: Sun Oct 8 22:50:43 2023 +0200

    Rename contour layers
---
 .../main/java/org/apache/baremaps/cli/map/Contour.java   |  2 +-
 .../baremaps/{raster => contour}/ContourTileStore.java   | 12 ++++++------
 examples/contour/style.json                              | 16 ++++++++--------
 examples/contour/tileset.json                            |  4 ++--
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git 
a/baremaps-cli/src/main/java/org/apache/baremaps/cli/map/Contour.java 
b/baremaps-cli/src/main/java/org/apache/baremaps/cli/map/Contour.java
index c2505c4f..aaf0acd1 100644
--- a/baremaps-cli/src/main/java/org/apache/baremaps/cli/map/Contour.java
+++ b/baremaps-cli/src/main/java/org/apache/baremaps/cli/map/Contour.java
@@ -19,7 +19,7 @@ import io.servicetalk.http.netty.HttpServers;
 import io.servicetalk.http.router.jersey.HttpJerseyRouterBuilder;
 import java.nio.file.Path;
 import java.util.concurrent.Callable;
-import org.apache.baremaps.raster.ContourTileStore;
+import org.apache.baremaps.contour.ContourTileStore;
 import org.apache.baremaps.server.CorsFilter;
 import org.apache.baremaps.server.ServerResources;
 import org.apache.baremaps.tilestore.TileStore;
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/raster/ContourTileStore.java 
b/baremaps-core/src/main/java/org/apache/baremaps/contour/ContourTileStore.java
similarity index 96%
rename from 
baremaps-core/src/main/java/org/apache/baremaps/raster/ContourTileStore.java
rename to 
baremaps-core/src/main/java/org/apache/baremaps/contour/ContourTileStore.java
index bb5e98d0..41c59d0d 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/raster/ContourTileStore.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/contour/ContourTileStore.java
@@ -10,7 +10,7 @@
  * the License.
  */
 
-package org.apache.baremaps.raster;
+package org.apache.baremaps.contour;
 
 import org.apache.baremaps.tilestore.TileCoord;
 import org.apache.baremaps.tilestore.TileStore;
@@ -195,11 +195,11 @@ public class ContourTileStore implements TileStore, 
AutoCloseable {
 
         // Generate the contours in meters
         var contourLevelsInMeters = 
CONTOUR_LEVELS_BY_ZOOM_LEVELS_IN_METERS.get(tile.z());
-        var featuresInMeters = generateContours(rasterDataset3, 
rasterEnvelope, rasterEnvelopeWithBuffer, contourLevelsInMeters);
+        var featuresInMeters = generateContour(rasterDataset3, rasterEnvelope, 
rasterEnvelopeWithBuffer, contourLevelsInMeters);
 
         // Generate the contours in feets
         var contourLevelsInFeets = 
CONTOUR_LEVELS_BY_ZOOM_LEVELS_IN_FEETS.get(tile.z());
-        var featuresInFeets = generateContours(rasterDataset3, rasterEnvelope, 
rasterEnvelopeWithBuffer, contourLevelsInFeets);
+        var featuresInFeets = generateContour(rasterDataset3, rasterEnvelope, 
rasterEnvelopeWithBuffer, contourLevelsInFeets);
 
         // Release the resources
         rasterDataset1.delete();
@@ -209,12 +209,12 @@ public class ContourTileStore implements TileStore, 
AutoCloseable {
         // Create the vector tile
         return VectorTileFunctions
                 .asVectorTile(new VectorTile(List.of(
-                        new Layer("contours_m", 4096, featuresInMeters),
-                        new Layer("contours_ft", 4096, featuresInFeets))));
+                        new Layer("contour_m", 4096, featuresInMeters),
+                        new Layer("contour_ft", 4096, featuresInFeets))));
     }
 
 
-    public List<Feature> generateContours(Dataset rasterDataset, Geometry 
rasterEnvelope, Geometry rasterEnvelopeWithBuffer, String contourLevels) {
+    public List<Feature> generateContour(Dataset rasterDataset, Geometry 
rasterEnvelope, Geometry rasterEnvelopeWithBuffer, String contourLevels) {
         // Initialize the vector dataset and layer to store the contours
         var vectorProjection = rasterDataset.GetProjection();
         var vectorSpatialReferenceSystem = new 
SpatialReference(vectorProjection);
diff --git a/examples/contour/style.json b/examples/contour/style.json
index bd2ba22b..11af7cdc 100644
--- a/examples/contour/style.json
+++ b/examples/contour/style.json
@@ -17,10 +17,10 @@
       }
     },
     {
-      "id": "contours_m",
+      "id": "contour_m",
       "type": "line",
       "source": "baremaps",
-      "source-layer": "contours_m",
+      "source-layer": "contour_m",
       "layout": {
         "line-cap": "round",
         "line-join": "round"
@@ -30,10 +30,10 @@
       }
     },
     {
-      "id": "contours_m_label",
+      "id": "contour_m_label",
       "type": "symbol",
       "source": "baremaps",
-      "source-layer": "contours_m",
+      "source-layer": "contour_m",
       "layout": {
         "symbol-placement": "line",
         "text-anchor": "center",
@@ -55,10 +55,10 @@
       }
     },
     {
-      "id": "contours_ft",
+      "id": "contour_ft",
       "type": "line",
       "source": "baremaps",
-      "source-layer": "contours_ft",
+      "source-layer": "contour_ft",
       "layout": {
         "line-cap": "round",
         "line-join": "round"
@@ -68,10 +68,10 @@
       }
     },
     {
-      "id": "contours_ft_label",
+      "id": "contour_ft_label",
       "type": "symbol",
       "source": "baremaps",
-      "source-layer": "contours_ft",
+      "source-layer": "contour_ft",
       "layout": {
         "symbol-placement": "line",
         "text-anchor": "center",
diff --git a/examples/contour/tileset.json b/examples/contour/tileset.json
index baebaa18..b96f3994 100644
--- a/examples/contour/tileset.json
+++ b/examples/contour/tileset.json
@@ -11,7 +11,7 @@
   "database": 
"jdbc:postgresql://localhost:5432/baremaps?&user=baremaps&password=baremaps",
   "vector_layers": [
     {
-      "id": "contours_m",
+      "id": "contour_m",
       "queries": [
         {
           "minzoom": 0,
@@ -20,7 +20,7 @@
       ]
     },
     {
-      "id": "contours_ft",
+      "id": "contour_ft",
       "queries": [
         {
           "minzoom": 0,

Reply via email to