You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by bc...@apache.org on 2023/06/09 19:15:12 UTC

[incubator-baremaps] branch 688-export created (now 82b2169c)

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

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


      at 82b2169c Fix null pointer exception related to bounds

This branch includes the following new commits:

     new 82b2169c Fix null pointer exception related to bounds

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-baremaps] 01/01: Fix null pointer exception related to bounds

Posted by bc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 82b2169c71604a74c77290f60cdb4d698e5adaf1
Author: Bertil Chapuis <bc...@gmail.com>
AuthorDate: Fri Jun 9 21:14:58 2023 +0200

    Fix null pointer exception related to bounds
---
 .../org/apache/baremaps/workflow/tasks/ExportVectorTiles.java    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java
index 7828a049..33c8d1e5 100644
--- a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java
+++ b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java
@@ -60,11 +60,12 @@ public record ExportVectorTiles(
     var datasource = context.getDataSource(tileset.getDatabase());
     var sourceTileStore = sourceTileStore(tileset, datasource);
     var targetTileStore = targetTileStore(tileset);
-
-    var envelope =
-        new Envelope(
+    
+    var envelope = tileset.getBounds().size() == 4
+        ? new Envelope(
             tileset.getBounds().get(0), tileset.getBounds().get(2),
-            tileset.getBounds().get(1), tileset.getBounds().get(3));
+            tileset.getBounds().get(1), tileset.getBounds().get(3))
+        : new Envelope(-180, 180, -85.0511, 85.0511);
 
     var count = TileCoord.count(envelope, tileset.getMinzoom(), tileset.getMaxzoom());