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

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

commit 820c83932ca54d1c3dd5eacf7f71dfd020aaf0fa
Author: Bertil Chapuis <[email protected]>
AuthorDate: Fri Dec 1 23:19:13 2023 +0100

    Null geom produce errors in postgis
---
 .../java/org/apache/baremaps/tilestore/postgres/PostgresTileStore.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/baremaps-core/src/main/java/org/apache/baremaps/tilestore/postgres/PostgresTileStore.java
 
b/baremaps-core/src/main/java/org/apache/baremaps/tilestore/postgres/PostgresTileStore.java
index cc436116..cf2c5d12 100644
--- 
a/baremaps-core/src/main/java/org/apache/baremaps/tilestore/postgres/PostgresTileStore.java
+++ 
b/baremaps-core/src/main/java/org/apache/baremaps/tilestore/postgres/PostgresTileStore.java
@@ -164,7 +164,7 @@ public class PostgresTileStore implements TileStore {
               .replace("$zoom", String.valueOf(zoom));
           var querySqlWithParams = String.format(
               "SELECT ST_AsMVTGeom(t.geom, ST_TileEnvelope(?, ?, ?)) AS geom, 
t.tags, t.id " +
-                  "FROM (%s) AS t WHERE t.geom && ST_TileEnvelope(?, ?, ?, 
margin => (64.0/4096))",
+                  "FROM (%s) AS t WHERE t.geom IS NOT NULL AND t.geom && 
ST_TileEnvelope(?, ?, ?, margin => (64.0/4096))",
               querySql);
           layerSql.append(querySqlWithParams);
 

Reply via email to