github-advanced-security[bot] commented on code in PR #884:
URL: 
https://github.com/apache/incubator-baremaps/pull/884#discussion_r1701703376


##########
baremaps-raster/src/test/java/org/apache/baremaps/raster/ChaikinSmootherTest.java:
##########
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+package org.apache.baremaps.raster;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import org.junit.jupiter.api.Test;
+import org.locationtech.jts.geom.Coordinate;
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.LineString;
+
+class ChaikinSmootherTest {

Review Comment:
   ## Unused classes and interfaces
   
   Unused class: ChaikinSmootherTest is not referenced within this codebase. If 
not used as an external API it should be removed.
   
   [Show more 
details](https://github.com/apache/incubator-baremaps/security/code-scanning/1532)



##########
baremaps-raster/src/test/java/org/apache/baremaps/raster/MartiniTest.java:
##########
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package org.apache.baremaps.raster;
+
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+
+import java.io.IOException;
+import java.nio.file.Path;
+import javax.imageio.ImageIO;
+import org.junit.jupiter.api.Test;
+
+class MartiniTest {

Review Comment:
   ## Unused classes and interfaces
   
   Unused class: MartiniTest is not referenced within this codebase. If not 
used as an external API it should be removed.
   
   [Show more 
details](https://github.com/apache/incubator-baremaps/security/code-scanning/1535)



##########
baremaps-raster/src/test/java/org/apache/baremaps/raster/ContourTracerPolygonTest.java:
##########
@@ -0,0 +1,224 @@
+/*
+ * 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.
+ */
+
+package org.apache.baremaps.raster;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.List;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+import org.locationtech.jts.geom.Geometry;
+
+class ContourTracerPolygonTest {

Review Comment:
   ## Unused classes and interfaces
   
   Unused class: ContourTracerPolygonTest is not referenced within this 
codebase. If not used as an external API it should be removed.
   
   [Show more 
details](https://github.com/apache/incubator-baremaps/security/code-scanning/1534)



##########
baremaps-raster/src/test/java/org/apache/baremaps/raster/HillShadeRenderer.java:
##########
@@ -0,0 +1,159 @@
+/*
+ * 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.
+ */
+
+package org.apache.baremaps.raster;
+
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.nio.file.Path;
+import javax.imageio.ImageIO;
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+public class HillShadeRenderer extends JFrame {
+
+  private BufferedImage originalImage;
+  private double[] grid;
+  private JSlider altitudeSlider;
+  private JSlider azimuthSlider;
+  private JSlider scaleSlider;
+  private JCheckBox isSimpleCheckbox;
+  private JLabel imageLabel;
+  private JLabel altitudeLabel;
+  private JLabel azimuthLabel;
+  private JLabel scaleLabel;
+
+  public HillShadeRenderer() throws IOException {
+    super("Hillshade Display");
+    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+    // Load the image
+    originalImage = ImageIO.read(
+        Path.of("")
+            .toAbsolutePath()
+            
.resolveSibling("baremaps/baremaps-raster/src/test/resources/fuji.png")
+            .toAbsolutePath().toFile());
+    grid = ElevationUtils.imageToGrid(originalImage, 
ElevationUtils::pixelToElevationStandard);
+
+    // Create UI components
+    altitudeSlider = new JSlider(JSlider.VERTICAL, 0, 90, 45);
+    azimuthSlider = new JSlider(JSlider.VERTICAL, 0, 360, 315);
+    scaleSlider = new JSlider(JSlider.HORIZONTAL, 1, 100, 10); // Scale from 
0.1 to 10.0
+    isSimpleCheckbox = new JCheckBox("Simple Algorithm", true);
+    imageLabel = new JLabel();
+    altitudeLabel = new JLabel("Sun Altitude: 45°");
+    azimuthLabel = new JLabel("Sun Azimuth: 315°");
+    scaleLabel = new JLabel("Scale: 1.0");
+
+    // Set up sliders
+    altitudeSlider.setMajorTickSpacing(15);
+    altitudeSlider.setPaintTicks(true);
+    altitudeSlider.setPaintLabels(true);
+
+    azimuthSlider.setMajorTickSpacing(45);
+    azimuthSlider.setPaintTicks(true);
+    azimuthSlider.setPaintLabels(true);
+
+    scaleSlider.setMajorTickSpacing(10);
+    scaleSlider.setPaintTicks(true);
+    scaleSlider.setPaintLabels(true);
+
+    // Add listeners
+    ChangeListener listener = new ChangeListener() {
+      public void stateChanged(ChangeEvent e) {

Review Comment:
   ## Missing Override annotation
   
   This method overrides [ChangeListener.stateChanged](1); it is advisable to 
add an Override annotation.
   
   [Show more 
details](https://github.com/apache/incubator-baremaps/security/code-scanning/1536)



##########
baremaps-raster/src/test/java/org/apache/baremaps/raster/ContourTracerLineStringTest.java:
##########
@@ -0,0 +1,224 @@
+/*
+ * 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.
+ */
+
+package org.apache.baremaps.raster;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.List;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+import org.locationtech.jts.geom.Geometry;
+
+class ContourTracerLineStringTest {

Review Comment:
   ## Unused classes and interfaces
   
   Unused class: ContourTracerLineStringTest is not referenced within this 
codebase. If not used as an external API it should be removed.
   
   [Show more 
details](https://github.com/apache/incubator-baremaps/security/code-scanning/1533)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to