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

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

commit a4f74b0c768f8dd381ebb7da462c84cb5b0a3782
Author: Bertil Chapuis <[email protected]>
AuthorDate: Sun Nov 12 19:44:03 2023 +0100

    Fix minor issues
---
 .../baremaps/database/collection/DataCollectionAdapter.java      | 2 +-
 .../org/apache/baremaps/storage/postgres/PostgresDataSchema.java | 9 +--------
 .../baremaps/storage/shapefile/internal/ShapefileByteReader.java | 8 ++++----
 basemap/import.js                                                | 1 +
 4 files changed, 7 insertions(+), 13 deletions(-)

diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/database/collection/DataCollectionAdapter.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/database/collection/DataCollectionAdapter.java
index f202ed9f..be04534d 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/database/collection/DataCollectionAdapter.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/database/collection/DataCollectionAdapter.java
@@ -45,7 +45,7 @@ public class DataCollectionAdapter<S, T> extends 
AbstractDataCollection<T> {
    * {@inheritDoc}
    */
   @Override
-  public Iterator iterator() {
+  public Iterator<T> iterator() {
     return collection.stream().map(this.transformer).iterator();
   }
 
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/storage/postgres/PostgresDataSchema.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/storage/postgres/PostgresDataSchema.java
index 242e03d9..55e6c741 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/storage/postgres/PostgresDataSchema.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/storage/postgres/PostgresDataSchema.java
@@ -261,19 +261,12 @@ public class PostgresDataSchema implements DataSchema {
       case LONG -> new LongValueHandler<Long>();
       case FLOAT -> new FloatValueHandler<Float>();
       case DOUBLE -> new DoubleValueHandler<Double>();
-      case GEOMETRY -> new GeometryValueHandler();
-      case POINT -> new GeometryValueHandler();
-      case MULTIPOINT -> new GeometryValueHandler();
-      case LINESTRING -> new GeometryValueHandler();
-      case MULTILINESTRING -> new GeometryValueHandler();
-      case POLYGON -> new GeometryValueHandler();
-      case MULTIPOLYGON -> new GeometryValueHandler();
-      case GEOMETRYCOLLECTION -> new GeometryValueHandler();
       case INET4_ADDRESS -> new Inet4AddressValueHandler();
       case INET6_ADDRESS -> new Inet6AddressValueHandler();
       case LOCAL_DATE -> new LocalDateValueHandler();
       case LOCAL_TIME -> new LocalTimeValueHandler();
       case LOCAL_DATE_TIME -> new LocalDateTimeValueHandler();
+      case GEOMETRY, POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, 
MULTIPOLYGON, GEOMETRYCOLLECTION -> new GeometryValueHandler();
       default -> throw new IllegalArgumentException("Unsupported type: " + 
type);
     };
   }
diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/storage/shapefile/internal/ShapefileByteReader.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/storage/shapefile/internal/ShapefileByteReader.java
index 62b3cc26..45af573e 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/storage/shapefile/internal/ShapefileByteReader.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/storage/shapefile/internal/ShapefileByteReader.java
@@ -327,10 +327,10 @@ public class ShapefileByteReader extends CommonByteReader 
{
    * @param row the row to fill.
    */
   private void loadPolygonRow(DataRow row) {
-    double xmin = getByteBuffer().getDouble();
-    double ymin = getByteBuffer().getDouble();
-    double xmax = getByteBuffer().getDouble();
-    double ymax = getByteBuffer().getDouble();
+    /* double xmin = */ getByteBuffer().getDouble();
+    /* double ymin = */ getByteBuffer().getDouble();
+    /* double xmax = */ getByteBuffer().getDouble();
+    /* double ymax = */ getByteBuffer().getDouble();
 
     int numParts = getByteBuffer().getInt();
     int numPoints = getByteBuffer().getInt();
diff --git a/basemap/import.js b/basemap/import.js
index 4338bd7f..fec1e00a 100644
--- a/basemap/import.js
+++ b/basemap/import.js
@@ -132,6 +132,7 @@ export default {
           "database": config.database,
           "databaseSrid": 3857,
           "replaceExisting": true,
+          "cleanCache": true,
         },
       ]
     },

Reply via email to