diff --git a/ch.res_ear.samthiriot.knime.shapefilesaswkt.feature/feature.xml b/ch.res_ear.samthiriot.knime.shapefilesaswkt.feature/feature.xml index d7189b6..1b34a9d 100644 --- a/ch.res_ear.samthiriot.knime.shapefilesaswkt.feature/feature.xml +++ b/ch.res_ear.samthiriot.knime.shapefilesaswkt.feature/feature.xml @@ -2,7 +2,7 @@ @@ -712,8 +712,6 @@ Public License instead of this License. But first, please read diff --git a/ch.res_ear.samthiriot.knime.shapefilesaswkt/META-INF/MANIFEST.MF b/ch.res_ear.samthiriot.knime.shapefilesaswkt/META-INF/MANIFEST.MF index 28c0473..095c50f 100644 --- a/ch.res_ear.samthiriot.knime.shapefilesaswkt/META-INF/MANIFEST.MF +++ b/ch.res_ear.samthiriot.knime.shapefilesaswkt/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Automatic-Module-Name: ch.res.ear.samthiriot.knime.shapefilesaswkt Bundle-Name: KNIME Spatial Processing Nodes Bundle-SymbolicName: ch.res_ear.samthiriot.knime.shapefilesaswkt;singleton:=true -Bundle-Version: 1.3.8.qualifier +Bundle-Version: 1.3.9.qualifier Bundle-ClassPath: ., target/classes/, lib/aircompressor-0.20.jar, @@ -160,8 +160,7 @@ Require-Bundle: org.eclipse.core.resources, org.knime.workbench;bundle-version="4.6.0", org.junit, org.json;bundle-version="20140107.0.0";visibility:=reexport, - org.knime.core, - org.eclipse.jface.notifications;bundle-version="0.5.200" + org.knime.core Bundle-ActivationPolicy: lazy Export-Package: ch.res_ear.samthiriot.knime.dialogs, ch.res_ear.samthiriot.knime.shapefilesaswkt, diff --git a/ch.res_ear.samthiriot.knime.shapefilesaswkt/src/ch/res_ear/samthiriot/knime/shapefilesaswkt/write/write_to_geotiff/WriteWKTToGeoTIFFNodeModel.java b/ch.res_ear.samthiriot.knime.shapefilesaswkt/src/ch/res_ear/samthiriot/knime/shapefilesaswkt/write/write_to_geotiff/WriteWKTToGeoTIFFNodeModel.java index 155f1bf..cbf7fe4 100644 --- a/ch.res_ear.samthiriot.knime.shapefilesaswkt/src/ch/res_ear/samthiriot/knime/shapefilesaswkt/write/write_to_geotiff/WriteWKTToGeoTIFFNodeModel.java +++ b/ch.res_ear.samthiriot.knime.shapefilesaswkt/src/ch/res_ear/samthiriot/knime/shapefilesaswkt/write/write_to_geotiff/WriteWKTToGeoTIFFNodeModel.java @@ -420,58 +420,71 @@ else if (maxValue * 1.001 < Double.MAX_VALUE) exec.setProgress(0.3, "creation of the grid data"); // prepare the future data - final WritableRaster raster = RasterFactory.createBandedRaster( + WritableRaster raster = null; + try { + raster = RasterFactory.createBandedRaster( typePrecise, width, height, bandsColIdx.length, null); + } catch (RuntimeException e) { + throw new RuntimeException("error when initializing a banded raster", e); + } // set the default values (if necessary) - if (inputPopulation.size() < pixels) { - exec.setMessage("defining default value "+missingValue); - fillRasterWithDefault(exec, minX, minY, maxX, maxY, bandsColIdx, type, raster, missingValue); + try { + if (inputPopulation.size() < pixels) { + exec.setMessage("defining default value "+missingValue); + fillRasterWithDefault(exec, minX, minY, maxX, maxY, bandsColIdx, type, raster, missingValue); + } + exec.checkCanceled(); + } catch (RuntimeException e) { + throw new RuntimeException("error when initializing default values", e); } - exec.checkCanceled(); - + // read the data - exec.setProgress(0.4, "reading pixels"); - itRow = inputPopulation.iterator(); - while (itRow.hasNext()) { - DataRow row = itRow.next(); - final int x = ((IntValue)row.getCell(idxColX)).getIntValue(); - final int y = ((IntValue)row.getCell(idxColY)).getIntValue(); - - switch (type) { - case DataBuffer.TYPE_INT: - for (int b=0; b