From 45fe356f52fdc4c07c4287bd726d72024df8bf2e Mon Sep 17 00:00:00 2001 From: Giuseppe Aruta <69568435+ma15569@users.noreply.github.com> Date: Mon, 19 Aug 2024 18:34:35 +0200 Subject: [PATCH] Update AddRasterImageLayerWizard.java --- .../openjump/core/rasterimage/AddRasterImageLayerWizard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/openjump/core/rasterimage/AddRasterImageLayerWizard.java b/src/org/openjump/core/rasterimage/AddRasterImageLayerWizard.java index 21a000409..9ab58fce8 100644 --- a/src/org/openjump/core/rasterimage/AddRasterImageLayerWizard.java +++ b/src/org/openjump/core/rasterimage/AddRasterImageLayerWizard.java @@ -221,7 +221,7 @@ private void addImage(WorkbenchContext context, Envelope envelope, // The style must be stored as SLD file with the same name of the layer. if (rLayer.getNumBands() == 1) {// Currently OpenJUMP can read/write symbology only for // monoband raster files - String sldS = new File(imageFileName).getAbsolutePath().replace("tif", "sld"); + String sldS = org.openjump.util.UriUtil.removeExtension(imageFileName) + ".sld"; File sldFile = new File(sldS); if (sldFile.exists() && !sldFile.isDirectory()) { try {