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

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

commit 2e0f5c053857aa7fb20daf485dc4a06c3fa57be2
Author: Bertil Chapuis <[email protected]>
AuthorDate: Sat Nov 23 13:51:36 2024 +0100

    Fix licensing issues
    
    - Removed unlicensed file
    - Add license header
---
 .../java/org/apache/baremaps/dem/MartiniTest.java    |  19 ++++++++++++++-----
 baremaps-dem/src/test/resources/fuji.png             | Bin 578765 -> 0 bytes
 scripts/generate-flatgeobuf.sh                       |  15 +++++++++++++++
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git 
a/baremaps-dem/src/test/java/org/apache/baremaps/dem/MartiniTest.java 
b/baremaps-dem/src/test/java/org/apache/baremaps/dem/MartiniTest.java
index b978b6a35..ade7dbcbc 100644
--- a/baremaps-dem/src/test/java/org/apache/baremaps/dem/MartiniTest.java
+++ b/baremaps-dem/src/test/java/org/apache/baremaps/dem/MartiniTest.java
@@ -19,20 +19,29 @@ package org.apache.baremaps.dem;
 
 import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 
+import java.io.File;
 import java.io.IOException;
+import java.net.URI;
 import java.nio.file.Path;
 import javax.imageio.ImageIO;
+
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Test;
 
 class MartiniTest {
 
   @Test
+  @Disabled("This test requires an internet connection")
   void generateAMesh() throws IOException {
-    var png = ImageIO.read(
-        Path.of("")
-            .toAbsolutePath()
-            .resolveSibling("baremaps-dem/src/test/resources/fuji.png")
-            .toAbsolutePath().toFile());
+    // Download the image to a temporary file
+    URI uri = 
URI.create("https://raw.githubusercontent.com/mapbox/martini/refs/heads/main/test/fixtures/fuji.png";);
+    File file = File.createTempFile("fuji", ".png", 
Path.of("").toAbsolutePath().toFile());
+    file.deleteOnExit();
+    ImageIO.write(ImageIO.read(uri.toURL()), "png", file);
+
+    // The image is available in the mapbox/martini repository and can be 
downloaded manually.
+    var png = ImageIO.read(file);
     var terrainGrid = Martini.createGrid(png);
     var martini = new Martini(png.getWidth() + 1);
     var tile = martini.createTile(terrainGrid);
diff --git a/baremaps-dem/src/test/resources/fuji.png 
b/baremaps-dem/src/test/resources/fuji.png
deleted file mode 100644
index 9e4e8b766..000000000
Binary files a/baremaps-dem/src/test/resources/fuji.png and /dev/null differ
diff --git a/scripts/generate-flatgeobuf.sh b/scripts/generate-flatgeobuf.sh
index ea5317da6..eb3aa56e1 100755
--- a/scripts/generate-flatgeobuf.sh
+++ b/scripts/generate-flatgeobuf.sh
@@ -1,5 +1,20 @@
 #!/bin/bash
 
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 flatc --java --gen-all \
   --java-package-prefix org.apache.baremaps.flatgeobuf.generated \
   -o baremaps-flatgeobuf/src/main/java \

Reply via email to