Re: [JPP-Devel] RasterQueryCursorTool
Hi MIchael, thanks for the correction. I have to revise my copy of OJ on Eclipse Peppe Il giorno dom 13 set 2020 alle ore 00:07 Michaud Michael < m.michael.mich...@orange.fr> ha scritto: > Peppe, > > The commited code did not compile. I fixed it in 6454, but please, check > I commented the right line. > > Michaël > ___ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] [jump-pilot:bugs] Re: #498 Most GeoTIFF drivers fail with a simple GeoTIFF image
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml";> OK, I see,The drivers wich did not work still does not work :-(Will do some more test tomorrow.Anyway, I spent several days trying to catch an error to return a more informative message to the user, but without successUsing the apache driver, I get [ERROR] 2020-09-13_00:07:45.190 Index 8000 out of bounds for length 8000That's OK, I can catch it and report it. When using the jai drivers (either TIFF or XTIFF), I just catch a NPE, but looking at the log file, I can see,the same error as with apache (Index 8000 out of bounds for length 8000 ) and before that, an IOException :java.io.IOException: Planar (band-sequential) format TIFF is not supported.I tried to catch those error to return them in the Error dialog instead of the NPE but without success. I'm not sure it is very useful, but I'm quite frustrated because I can't understand when this error is logged and why I can't catch it through the UI. If you have an idea, I would be very interested.Miichaëlenvoyé : 12 septembre 2020 à 15:33de : ede à : "[jump-pilot:bugs] " <4...@bugs.jump-pilot.p.re.sourceforge.net>objet : [jump-pilot:bugs] Re: #498 Most GeoTIFF drivers fail with a simple GeoTIFF imageOn 12.09.2020 11:31, michael michaud wrote:I tried to handle errors in a more friendly way in r6443, but it seems that the best improvement wrt this ticket has been made by changing old jai libray by the new oss version. Thanks EDE.my patchset unfortunately disabled GeoImage framework with forced loaders so all variants actually used the first loader, which is the new oss one. just fixed that in r6446. so please retest.you can check which loader was actually used in the ImageLayerManager (layer context menu).There is still two drivers failing in reading the small_world tiff image. One of them is Apache Commons Imaging.as i wrote above. there is an open ticket in their bug tracker. the latest version, which we include now, still chokes on it.It may be worthwhile keeping this driver if we find images that only this driver can read. Otherwise...that's my reasoning as well. they support some exotic formats.Peppe also fixed Info tools (thanks) and report some more problems. Maybe we should close this ticket and open more specific ones about remaining problems. What do you think ?let's wait for the monoband issue fix and close then. ..ede https://sourceforge.net/p/jump-pilot/bugs/498/";>[bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF imageStatus: open Milestone: OJ_future Created: Sun Aug 30, 2020 08:02 AM UTC by michael michaud Last Updated: Sat Sep 12, 2020 11:54 AM UTC Owner: nobody Attachments:https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif";>small_world.tif (240.6 kB; image/tiff)I often have a bad experience trying to read simple geotiff. To have a more objective view of the situation, I get a very simple image from the test directory of GDAL library and tested it against all our drivers. Image is attached. Here are its main characteristics (I think they are very common one) : small_world.tif size : 400 x 200 Coordinate System : wgs84 (4326) Metadata : AREA_OR_POINT=AREA Image Structure Metadata : INTERLEAVE=BAND 3 bands, Block=400x20, Type=Byte, ColorInterp=RGBI tried to import it with all the image drivers we propose (8 from Open File + ImageRaster Sextante). 3 drivers only could import the image. All others fail throughing a rough java exception. Image Raster don't fail immediately, but it does not display the image and throws NPE if one try to get more information.List of success/failures and exceptions thrownReferenced Image (ImageIO[ext],JAI) : OK ImageIO TIFF Image Reader version 1.0 : OK ImageIO TIFF Image Reader version 1.1 : OK Standard TIFF Image Reader java.lang.IllegalAccessException: class com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.tiff to unnamed module @12405818 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99) at java.base/java.lang.Class.newInstance(Class.java:579) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117) Referenced Image (JAI TIF) java.lang.NullPointerException java.lang.NullPointerException at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80) at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) at javax.media.jai.OpImage.getTile(OpImage.java:1142) at javax.media.jai.PlanarImage.g
[JPP-Devel] RasterQueryCursorTool
Peppe,The commited code did not compile. I fixed it in 6454, but please, check I commented the right line.Michaël ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] SVN: [6454] core/trunk/src/org/openjump/core/ui/plugin/raster/ RasterQueryCursorTool.java
Revision: 6454 http://sourceforge.net/p/jump-pilot/code/6454 Author: michaudm Date: 2020-09-12 22:02:47 + (Sat, 12 Sep 2020) Log Message: --- make the code compilable again Modified Paths: -- core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java Modified: core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java === --- core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java 2020-09-12 21:43:06 UTC (rev 6453) +++ core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java 2020-09-12 22:02:47 UTC (rev 6454) @@ -135,7 +135,7 @@ RasterImageLayer[] ls = (RasterImageLayer[]) wbcontext.getLayerableNamePanel() .selectedNodes(RasterImageLayer.class) .toArray(new RasterImageLayer[] {}); -.toArray(new Layerable[] {}); +//.toArray(new Layerable[] {}); if (ls != null && ls.length > 0) { rLayer = (RasterImageLayer) ls[0]; ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] SVN: [6453] core/trunk
Revision: 6453 http://sourceforge.net/p/jump-pilot/code/6453 Author: michaudm Date: 2020-09-12 21:43:06 + (Sat, 12 Sep 2020) Log Message: --- Add an interiorBorder option to BasicStyle Modified Paths: -- core/trunk/ChangeLog core/trunk/src/com/vividsolutions/jump/util/java2xml/XML2Java.java core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java core/trunk/src/com/vividsolutions/jump/workbench/ui/renderer/style/BasicStyle.java core/trunk/src/com/vividsolutions/jump/workbench/ui/renderer/style/BasicStyle.java2xml core/trunk/src/com/vividsolutions/jump/workbench/ui/renderer/style/XBasicStyle.java core/trunk/src/com/vividsolutions/jump/workbench/ui/renderer/style/XBasicStyle.java2xml core/trunk/src/com/vividsolutions/jump/workbench/ui/style/BasicStylePanel.java core/trunk/src/language/jump.properties core/trunk/src/language/jump_cz.properties core/trunk/src/language/jump_de.properties core/trunk/src/language/jump_es.properties core/trunk/src/language/jump_fi.properties core/trunk/src/language/jump_fr.properties core/trunk/src/language/jump_hu.properties core/trunk/src/language/jump_it.properties core/trunk/src/language/jump_ja_JP.properties core/trunk/src/language/jump_ml.properties core/trunk/src/language/jump_pt.properties core/trunk/src/language/jump_pt_BR.properties core/trunk/src/language/jump_ta_IN.properties core/trunk/src/language/jump_te.properties core/trunk/src/language/jump_zh_CN.properties core/trunk/src/language/jump_zh_HK.properties Modified: core/trunk/ChangeLog === --- core/trunk/ChangeLog2020-09-12 21:09:51 UTC (rev 6452) +++ core/trunk/ChangeLog2020-09-12 21:43:06 UTC (rev 6453) @@ -4,6 +4,9 @@ # 3. be concise but convey the change in a way that ordinary users understand #< 80 chars --># +2020-09-12 mmichaud + * Add an interiorBorder option to BasicStyle + 2020-09-06 ede * upgrade commons imaging to 1.0-alpha2 Modified: core/trunk/src/com/vividsolutions/jump/util/java2xml/XML2Java.java === --- core/trunk/src/com/vividsolutions/jump/util/java2xml/XML2Java.java 2020-09-12 21:09:51 UTC (rev 6452) +++ core/trunk/src/com/vividsolutions/jump/util/java2xml/XML2Java.java 2020-09-12 21:43:06 UTC (rev 6453) @@ -140,9 +140,13 @@ // so when a problem with styling appears data are still loaded if (tag.getName().equalsIgnoreCase("style")){ Logger.warn(msg); - System.out.println(msg); return; //return to avoid further messages } +// [mmichaud 2011-07-04] excludes single-side for compatibility +if (tag.getName().equals("line") && xmlName.equals("interior")) { +Logger.warn(msg); +return; //return to avoid further messages +} // [mmichaud 2011-07-04] Following attributes were introduced in 1.4.1 release. // Skip them to keep compatibility with old project files if (tag.getName().equalsIgnoreCase("layer") && xmlName != null && @@ -150,7 +154,6 @@ xmlName.equalsIgnoreCase("selectable") || xmlName.equalsIgnoreCase("read-only") ) ) { Logger.warn(msg); - System.out.println(msg); return; //return to avoid further messages } else{ Modified: core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java === --- core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java 2020-09-12 21:09:51 UTC (rev 6452) +++ core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java 2020-09-12 21:43:06 UTC (rev 6453) @@ -76,12 +76,7 @@ import com.vividsolutions.jump.workbench.ui.renderer.LayerRendererFactory; import com.vividsolutions.jump.workbench.ui.renderer.RenderingManager; import com.vividsolutions.jump.workbench.ui.renderer.WmsLayerRendererFactory; -import com.vividsolutions.jump.workbench.ui.renderer.style.ArrowLineStringEndpointStyle; -import com.vividsolutions.jump.workbench.ui.renderer.style.ArrowLineStringSegmentStyle; -import com.vividsolutions.jump.workbench.ui.renderer.style.CircleLineStringEndpointStyle; -import com.vividsolutions.jump.workbench.ui.renderer.style.MetricsLineStringSegmentStyle; -import com.vividsolutions.jump.workbench.ui.renderer.style.VertexIndexLineSegmentStyle; -import com.vividsolutions.jump.workbench.ui.renderer.style.VertexXYLineSegment
[JPP-Devel] SVN: [6452] core/trunk/src/org/openjump/core/ui/plugin/raster/ RasterQueryCursorTool.java
Revision: 6452 http://sourceforge.net/p/jump-pilot/code/6452 Author: ma15569 Date: 2020-09-12 21:09:51 + (Sat, 12 Sep 2020) Log Message: --- removed a bug that was giving a null exception if no Sextante raster was selected during pixel inspection Modified Paths: -- core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java Modified: core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java === --- core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java 2020-09-12 13:51:30 UTC (rev 6451) +++ core/trunk/src/org/openjump/core/ui/plugin/raster/RasterQueryCursorTool.java 2020-09-12 21:09:51 UTC (rev 6452) @@ -131,10 +131,10 @@ RasterImageLayer rLayer = null; final WorkbenchContext wbcontext = this.getWorkbench().getContext(); -RasterImageLayer aLayer = null; - -Layerable[] ls = (Layerable[]) wbcontext.getLayerNamePanel() +@SuppressWarnings("unchecked") + RasterImageLayer[] ls = (RasterImageLayer[]) wbcontext.getLayerableNamePanel() .selectedNodes(RasterImageLayer.class) +.toArray(new RasterImageLayer[] {}); .toArray(new Layerable[] {}); if (ls != null && ls.length > 0) { rLayer = (RasterImageLayer) ls[0]; @@ -305,21 +305,21 @@ public void mouseMoved(MouseEvent me) { final WorkbenchContext wbcontext = this.getWorkbench().getContext(); -RasterImageLayer aLayer = null; -for (java.util.Iterator i = wbcontext.getLayerNamePanel() -.selectedNodes(RasterImageLayer.class).iterator(); i.hasNext();) { -aLayer = (RasterImageLayer) i.next(); -} + +for (Object layerable : wbcontext.getLayerableNamePanel().selectedNodes(Layerable.class)) { +Layerable layer = (Layerable)layerable; + +if (layer instanceof RasterImageLayer) { String cellValues = null; try { cellValues = ""; Coordinate tentativeCoordinate = getPanel().getViewport() .toModelCoordinate(me.getPoint()); -for (int b = 0; b < aLayer.getNumBands(); b++) { -Double cellValue = aLayer.getCellValue(tentativeCoordinate.x, +for (int b = 0; b < ((RasterImageLayer) layer).getNumBands(); b++) { +Double cellValue = ((RasterImageLayer) layer).getCellValue(tentativeCoordinate.x, tentativeCoordinate.y, b); if (cellValue != null) { -if (aLayer.isNoData(cellValue)) { +if (((RasterImageLayer) layer).isNoData(cellValue)) { cellValues = cellValues.concat(Double .toString(cellValue)) + "(" @@ -336,23 +336,15 @@ } catch (RasterDataNotFoundException ex) { cellValues = "???"; } catch (IOException e) { -// TODO Auto-generated catch block -e.printStackTrace(); +cellValues = " - "; } catch (NoninvertibleTransformException e) { -// TODO Auto-generated catch block -e.printStackTrace(); +cellValues = " - "; } -name = aLayer.getName(); - -// gContext.getWorkbenchContext() -// .getLayerViewPanel() -// .setToolTipText( -// "(" + name + ") " + VALUE + ": " -// + cellValues.toString()); - +name = ((RasterImageLayer) layer).getName(); getPanel().getContext().setStatusMessage( "[" + LAYER + ": " + name + "] " + VALUE + ": " -+ cellValues.toString()); ++ cellValues.toString());} +} } @Override ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] [jump-pilot:bugs] #498 Most GeoTIFF drivers fail with a simple GeoTIFF image
Peppe, please retest with r6451. ..ede --- ** [bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF image** **Status:** open **Milestone:** OJ_future **Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud **Last Updated:** Sat Sep 12, 2020 11:54 AM UTC **Owner:** nobody **Attachments:** - [small_world.tif](https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif) (240.6 kB; image/tiff) I often have a bad experience trying to read simple geotiff. To have a more objective view of the situation, I get a very simple image from the test directory of GDAL library and tested it against all our drivers. Image is attached. Here are its main characteristics (I think they are very common one) : small_world.tif size : 400 x 200 Coordinate System : wgs84 (4326) Metadata : AREA_OR_POINT=AREA Image Structure Metadata : INTERLEAVE=BAND 3 bands, Block=400x20, Type=Byte, ColorInterp=RGB I tried to import it with all the image drivers we propose (8 from Open File + ImageRaster Sextante). 3 drivers only could import the image. All others fail throughing a rough java exception. Image Raster don't fail immediately, but it does not display the image and throws NPE if one try to get more information. List of success/failures and exceptions thrown Referenced Image (ImageIO[ext],JAI) : OK ImageIO TIFF Image Reader version 1.0 : OK ImageIO TIFF Image Reader version 1.1 : OK Standard TIFF Image Reader java.lang.IllegalAccessException: class com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.tiff to unnamed module @12405818 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99) at java.base/java.lang.Class.newInstance(Class.java:579) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117) Referenced Image (JAI TIF) java.lang.NullPointerException java.lang.NullPointerException at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80) at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) at javax.media.jai.OpImage.getTile(OpImage.java:1142) at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) at javax.media.jai.RenderedImageAdapter.getData(RenderedImageAdapter.java:158) at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1099) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) at javax.media.jai.OpImage.getTile(OpImage.java:1129) at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122) at com.sun.media.jai.opimage.TranslateIntOpImage.getTile(TranslateIntOpImage.java:132) at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343) at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546) at com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:285) at com.vividsolutions.jump.workbench.imagery.ReferencedImageStyle.paint(ReferencedImageStyle.java:61) Referenced Image (JAI TIF) : same error Buffered Image (common) : com.vividsolutions.jump.workbench.imagery.ReferencedImageException: java.lang.ArrayIndexOutOfBoundsException: Index 8000 out of bounds for length 8000 at com.vividsolutions.jump.workbench.imagery.graphic.CommonsImage.initImage(CommonsImage.java:112) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.computeEnvelope(AbstractGraphicImage.java:122) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.getEnvelope(AbstractGraphicImage.java:114) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:125) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:106) at com.vividsolutions.jump.workbench.imagery.ReferencedImageFactoryFileLayerLoader.createImageFeature(ReferencedImageFactoryFileLayerLoader.java:199) at com.vividsolutions.jump.workbench.imagery.ReferencedImageFactoryFileLayerLoader.open(ReferencedImageFactoryFileLayerLoader.java:102) at org.openjump.core.ui.plugin.file.open.OpenFileWizard.run(OpenFileWizard.java:164) GeoTIFF plus (JAI) : java.lang.NullPointerExc
[JPP-Devel] SVN: [6451] core/trunk/etc
Revision: 6451 http://sourceforge.net/p/jump-pilot/code/6451 Author: edso Date: 2020-09-12 13:51:30 + (Sat, 12 Sep 2020) Log Message: --- added oss jai-imageio-core implementation and it's license moved Imageio-Ext to PLUS section minor reformatting Modified Paths: -- core/trunk/etc/readme.txt Added Paths: --- core/trunk/etc/licenses/jai-imageio-core-LICENSE.txt Added: core/trunk/etc/licenses/jai-imageio-core-LICENSE.txt === --- core/trunk/etc/licenses/jai-imageio-core-LICENSE.txt (rev 0) +++ core/trunk/etc/licenses/jai-imageio-core-LICENSE.txt2020-09-12 13:51:30 UTC (rev 6451) @@ -0,0 +1,39 @@ +Copyright (c) 2005 Sun Microsystems, Inc. +Copyright © 2010-2014 University of Manchester +Copyright © 2010-2015 Stian Soiland-Reyes +Copyright © 2015 Peter Hull +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistribution of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +- Redistribution in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +Neither the name of Sun Microsystems, Inc. or the names of +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +This software is provided "AS IS," without a warranty of any +kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND +WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY +EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL +NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF +USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS +DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR +ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, +CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND +REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR +INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +You acknowledge that this software is not designed or intended for +use in the design, construction, operation or maintenance of any +nuclear facility. Property changes on: core/trunk/etc/licenses/jai-imageio-core-LICENSE.txt ___ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Modified: core/trunk/etc/readme.txt === --- core/trunk/etc/readme.txt 2020-09-12 13:47:44 UTC (rev 6450) +++ core/trunk/etc/readme.txt 2020-09-12 13:51:30 UTC (rev 6451) @@ -39,18 +39,15 @@ - https://mariadb.com/kb/en/mariadb/branding-guidelines/ ok_spatialite.png Spatialite icon, dolphin_icon.png (Edgar Soldin) - GPL3 - gpl-3.txt - ImageIO Ext - LGPL3 - lgpl-3.0.txt - except the following dependencies/components: - commons-codec, commons-io, commons-lang, commons-logging (see above) - imageio-ext-streams - partly LGPL2 or 3 - imageio-ext-streams-LICENSE.txt - imageio-ext-tiff - BSD style license - imageio-ext-tiff-BSD-LICENSE.txt JAI core, codec - Java Advanced Imaging Distribution License - jdl-jai.pdf JAI imageio core - BSD style license - jai-core.BSD-LICENSE.txt + jai-imageio-core (standalone) - BSD 3-style with nuclear exception + - jai-imageio-core-LICENSE.txt JAMA - Public Domain - Jdom - Apache-style open source jdom license, - with the acknowledgment clause removed - jdom_license.txt - JMath and its successor projects JMathTools (IO,Plot,Array) - BSD license - - jmath_license.txt + Jdom - Apache-style open source jdom license, with the acknowledgment + clause removed - jdom_license.txt + JMath and its successor projects JMathTools (IO,Plot,Array) + - BSD license - jmath_license.txt Javascript library RHINO - GPL2 - gpl-2.txt JSON-simple - Apache License Version 2.0 - apache_license-2.0.txt JTS Topology Suite - LGPL2 - lgpl-2.1.txt @@ -78,11 +75,6 @@ ( Component name (Author) - License name - License file in "licenses/" folder list of files and dependencies with license if any ) Batik SVG Toolkit - Apache License Version 2.0 - apache_license-2.0.txt - ImageIO Ext (mainly libs needing native support) - LGPL3 - lgpl-3.0.txt - except the following dependencies/components: - imageio-ext-imagereadmt - BSD style license - - imageio-ext-imagereadmt-BSD-LICENSE.txt - turbojpeg-wrapper - BSD style license - LICENSE.libjpegturbo.txt Geoarbores Vertex Symbols Collection (Giuseppe Arut
[JPP-Devel] SVN: [6450] core/trunk/etc/mvn/cmp_core.xml
Revision: 6450 http://sourceforge.net/p/jump-pilot/code/6450 Author: edso Date: 2020-09-12 13:47:44 + (Sat, 12 Sep 2020) Log Message: --- disable imageio-ext inclusion in core Modified Paths: -- core/trunk/etc/mvn/cmp_core.xml Modified: core/trunk/etc/mvn/cmp_core.xml === --- core/trunk/etc/mvn/cmp_core.xml 2020-09-12 13:25:30 UTC (rev 6449) +++ core/trunk/etc/mvn/cmp_core.xml 2020-09-12 13:47:44 UTC (rev 6450) @@ -94,13 +94,13 @@ *.txt - + ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] [jump-pilot:bugs] Re: #498 Most GeoTIFF drivers fail with a simple GeoTIFF image
On 12.09.2020 11:31, michael michaud wrote: > I tried to handle errors in a more friendly way in r6443, but it seems that > the best improvement wrt this ticket has been made by changing old jai libray > by the new oss version. Thanks EDE. my patchset unfortunately disabled GeoImage framework with forced loaders so all variants actually used the first loader, which is the new oss one. just fixed that in r6446. so please retest. you can check which loader was actually used in the ImageLayerManager (layer context menu). > There is still two drivers failing in reading the small_world tiff image. One > of them is Apache Commons Imaging. as i wrote above. there is an open ticket in their bug tracker. the latest version, which we include now, still chokes on it. > It may be worthwhile keeping this driver if we find images that only this > driver can read. Otherwise... that's my reasoning as well. they support some exotic formats. > Peppe also fixed Info tools (thanks) and report some more problems. > Maybe we should close this ticket and open more specific ones about remaining > problems. What do you think ? let's wait for the monoband issue fix and close then. ..ede --- ** [bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF image** **Status:** open **Milestone:** OJ_future **Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud **Last Updated:** Sat Sep 12, 2020 11:54 AM UTC **Owner:** nobody **Attachments:** - [small_world.tif](https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif) (240.6 kB; image/tiff) I often have a bad experience trying to read simple geotiff. To have a more objective view of the situation, I get a very simple image from the test directory of GDAL library and tested it against all our drivers. Image is attached. Here are its main characteristics (I think they are very common one) : small_world.tif size : 400 x 200 Coordinate System : wgs84 (4326) Metadata : AREA_OR_POINT=AREA Image Structure Metadata : INTERLEAVE=BAND 3 bands, Block=400x20, Type=Byte, ColorInterp=RGB I tried to import it with all the image drivers we propose (8 from Open File + ImageRaster Sextante). 3 drivers only could import the image. All others fail throughing a rough java exception. Image Raster don't fail immediately, but it does not display the image and throws NPE if one try to get more information. List of success/failures and exceptions thrown Referenced Image (ImageIO[ext],JAI) : OK ImageIO TIFF Image Reader version 1.0 : OK ImageIO TIFF Image Reader version 1.1 : OK Standard TIFF Image Reader java.lang.IllegalAccessException: class com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.tiff to unnamed module @12405818 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99) at java.base/java.lang.Class.newInstance(Class.java:579) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117) Referenced Image (JAI TIF) java.lang.NullPointerException java.lang.NullPointerException at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80) at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) at javax.media.jai.OpImage.getTile(OpImage.java:1142) at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) at javax.media.jai.RenderedImageAdapter.getData(RenderedImageAdapter.java:158) at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1099) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) at javax.media.jai.OpImage.getTile(OpImage.java:1129) at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122) at com.sun.media.jai.opimage.TranslateIntOpImage.getTile(TranslateIntOpImage.java:132) at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343) at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546) at com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:285) at com.vividsolutions.jump.workbench.imagery.ReferencedImageStyle.paint(ReferencedImageStyle.java:61) Referenced Image (JAI TIF) : same error Buffered Image (common) : com.vividsolutions.jump.workbench.imagery.Ref
[JPP-Devel] SVN: [6449] core/trunk/lib/plus/imageio-ext
Revision: 6449 http://sourceforge.net/p/jump-pilot/code/6449 Author: edso Date: 2020-09-12 13:25:30 + (Sat, 12 Sep 2020) Log Message: --- fix java.lang.NoClassDefFoundError: it/geosolutions/imageio/gdalframework/GDALImageReaderSpi at java.lang.ClassLoader.defineClass1(Native Method). due to missing gdal binding Added Paths: --- core/trunk/lib/plus/imageio-ext/gdal-2.2.0.jar Removed Paths: - core/trunk/lib/plus/imageio-ext/imageio-ext-tiff-1.3.2.jar core/trunk/lib/plus/imageio-ext/jaxb-api-2.4.0-b180830.0359.jar core/trunk/lib/plus/imageio-ext/jaxb-runtime-2.4.0-b180830.0438.jar Added: core/trunk/lib/plus/imageio-ext/gdal-2.2.0.jar === (Binary files differ) Index: core/trunk/lib/plus/imageio-ext/gdal-2.2.0.jar === --- core/trunk/lib/plus/imageio-ext/gdal-2.2.0.jar 2020-09-12 13:23:35 UTC (rev 6448) +++ core/trunk/lib/plus/imageio-ext/gdal-2.2.0.jar 2020-09-12 13:25:30 UTC (rev 6449) Property changes on: core/trunk/lib/plus/imageio-ext/gdal-2.2.0.jar ___ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: core/trunk/lib/plus/imageio-ext/imageio-ext-tiff-1.3.2.jar === (Binary files differ) Deleted: core/trunk/lib/plus/imageio-ext/jaxb-api-2.4.0-b180830.0359.jar === (Binary files differ) Deleted: core/trunk/lib/plus/imageio-ext/jaxb-runtime-2.4.0-b180830.0438.jar === (Binary files differ) ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] SVN: [6448] core/trunk/src/com/vividsolutions/jump/workbench/imagery/ geoimg
Revision: 6448 http://sourceforge.net/p/jump-pilot/code/6448 Author: edso Date: 2020-09-12 13:23:35 + (Sat, 12 Sep 2020) Log Message: --- add some more robustness if gdal is missing Modified Paths: -- core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoImageFactory.java core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoRaster.java Modified: core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoImageFactory.java === --- core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoImageFactory.java 2020-09-12 13:19:58 UTC (rev 6447) +++ core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoImageFactory.java 2020-09-12 13:23:35 UTC (rev 6448) @@ -66,7 +66,9 @@ try { Class.forName("it.geosolutions.imageio.gdalframework.GDALImageReaderSpi"); classGDALImageReaderSpiAvailable = true; -} catch (ClassNotFoundException e) {} // eat it +} catch (NoClassDefFoundError|ClassNotFoundException e) { + Logger.debug(e); +} // eat it } public void setLoader(Object loader) { Modified: core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoRaster.java === --- core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoRaster.java 2020-09-12 13:19:58 UTC (rev 6447) +++ core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoRaster.java 2020-09-12 13:23:35 UTC (rev 6448) @@ -116,7 +116,9 @@ Class.forName("it.geosolutions.imageio.gdalframework.GDALUtilities"); Class.forName("it.geosolutions.imageio.utilities.ImageIOUtilities"); areGDALClassesAvailable = true; -} catch (ClassNotFoundException e) {} // eat it +} catch (NoClassDefFoundError|ClassNotFoundException e) { + Logger.debug(e); +} // eat it } public GeoRaster(String imageFileLocation) { ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] SVN: [6446] core/trunk/src/com/vividsolutions/jump/workbench/imagery/ ImageryLayerDataset.java
Revision: 6446 http://sourceforge.net/p/jump-pilot/code/6446 Author: edso Date: 2020-09-12 13:19:24 + (Sat, 12 Sep 2020) Log Message: --- fix enforced loader ignored by GeoImage/ReferencedImageFactoryFileLayerLoader Modified Paths: -- core/trunk/src/com/vividsolutions/jump/workbench/imagery/ImageryLayerDataset.java Modified: core/trunk/src/com/vividsolutions/jump/workbench/imagery/ImageryLayerDataset.java === --- core/trunk/src/com/vividsolutions/jump/workbench/imagery/ImageryLayerDataset.java 2020-09-12 10:08:13 UTC (rev 6445) +++ core/trunk/src/com/vividsolutions/jump/workbench/imagery/ImageryLayerDataset.java 2020-09-12 13:19:24 UTC (rev 6446) @@ -157,6 +157,13 @@ ReferencedImageFactory imageFactory) { feature.setAttribute(ImageryLayerDataset.ATTR_FACTORY, imageFactory .getClass().getName()); +// GeoImage supports several loaders, set it if one was selected +if (imageFactory instanceof GeoImageFactory) { + Object loader = ((GeoImageFactory) imageFactory).getLoader(); + if (loader != null) +feature.setAttribute(ImageryLayerDataset.ATTR_LOADER, loader.getClass() +.getName()); +} return feature; } ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] SVN: [6447] core/trunk/src/com/vividsolutions/jump/workbench/imagery/ ReferencedImageFactoryFileLayerLoader.java
Revision: 6447 http://sourceforge.net/p/jump-pilot/code/6447 Author: edso Date: 2020-09-12 13:19:58 + (Sat, 12 Sep 2020) Log Message: --- add comment Modified Paths: -- core/trunk/src/com/vividsolutions/jump/workbench/imagery/ReferencedImageFactoryFileLayerLoader.java Modified: core/trunk/src/com/vividsolutions/jump/workbench/imagery/ReferencedImageFactoryFileLayerLoader.java === --- core/trunk/src/com/vividsolutions/jump/workbench/imagery/ReferencedImageFactoryFileLayerLoader.java 2020-09-12 13:19:24 UTC (rev 6446) +++ core/trunk/src/com/vividsolutions/jump/workbench/imagery/ReferencedImageFactoryFileLayerLoader.java 2020-09-12 13:19:58 UTC (rev 6447) @@ -170,6 +170,8 @@ Feature feature = new ReferencedImageFeature( ImageryLayerDataset.getSchema()); feature.setAttribute(ImageryLayerDataset.ATTR_URI, uri.toString()); +// save important attributes, later used ImageryLayerDataset.attachImage() +// to use the proper factory/loader combination ImageryLayerDataset.saveFeatureImgAttribs(feature, referencedImageFactory); feature.setGeometry(new GeometryFactory().createPoint((Coordinate) null)); return feature; ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] [jump-pilot:bugs] #498 Most GeoTIFF drivers fail with a simple GeoTIFF image
I made several tests opening the test files attached to this post in several combinations. I used: OJ 6445 core - OJ 6445 PLUS **OJ 6445 core** It opens all the files without any problem. the DEM (*AsterDEM, geotif *and *mdt25a*) are displayed wella nd also tool (like pixel inspection) works fine. Before opening files. On loading OJ I recognized this new error message: [ERROR] 13:24:49.553 Can't register JP2GDAL readers. java.lang.NoClassDefFoundError: it/geosolutions/imageio/gdalframework/GDALImageReaderSpi at java.lang.ClassLoader.defineClass1(Native Method). *small-world *file is opened displayed well. Pixel inspection tool is not working but other tools (extract part of image, Raster properties etc) seems to work fine **OJ 6445 PLUS** *small-world *file is opened displayed well. Pixel inspection tool is not working but other tools (extract part of image, Raster properties etc) seems to work fine *AsterDem* is opened and displayed wll with no problem to use tools *mdta25a* is not displayed in the view even if an icon (not the correct one) is displayed on the layer tree. None of the tools work. The behaviour of *geotiff *file is random. Sometimes is correctly opened and displayed into the view and the tools work. Other times it is not displayed and the tools don't work. The most common error is this: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.String; related to imageIO classes NB *geotiff *and *mdta25a *are basically the same files. I got geotiff loading mdt25a into QGIS and saving back with a different name. --*With all the files and version of OpenJUMP if the file is loaded and displayed well*-- a) if the layer is displayed into the view. Raster info tool works well and displays all the info about the raste into a table b) if the later is outside the current view. Raster info tool gives back an error possibly due to the matter that Raster Color dept is checked into (displayed) BufferedImage (which actually is created whenever we zoom to a Sextante Layer. java.lang.NullPointerException at org.openjump.core.ui.plugin.raster.RasterImageLayerPropertiesPlugIn.getColorDepth(RasterImageLayerPropertiesPlugIn.java:629) I suspect that the methods getColorDepth(BufferedImage..) and getDPI(BufferedImage..) in the class RasterImageLayerPropertiesPlugin have to be rewritten. Any suggestion? I know that IIOMetadata class can do it but I have never tried. Or Commons imaging? --- ** [bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF image** **Status:** open **Milestone:** OJ_future **Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud **Last Updated:** Sat Sep 12, 2020 10:44 AM UTC **Owner:** nobody **Attachments:** - [small_world.tif](https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif) (240.6 kB; image/tiff) I often have a bad experience trying to read simple geotiff. To have a more objective view of the situation, I get a very simple image from the test directory of GDAL library and tested it against all our drivers. Image is attached. Here are its main characteristics (I think they are very common one) : small_world.tif size : 400 x 200 Coordinate System : wgs84 (4326) Metadata : AREA_OR_POINT=AREA Image Structure Metadata : INTERLEAVE=BAND 3 bands, Block=400x20, Type=Byte, ColorInterp=RGB I tried to import it with all the image drivers we propose (8 from Open File + ImageRaster Sextante). 3 drivers only could import the image. All others fail throughing a rough java exception. Image Raster don't fail immediately, but it does not display the image and throws NPE if one try to get more information. List of success/failures and exceptions thrown Referenced Image (ImageIO[ext],JAI) : OK ImageIO TIFF Image Reader version 1.0 : OK ImageIO TIFF Image Reader version 1.1 : OK Standard TIFF Image Reader java.lang.IllegalAccessException: class com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.tiff to unnamed module @12405818 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99) at java.base/java.lang.Class.newInstance(Class.java:579) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117) Referenced Image (JAI TIF) java.lang.NullPointerException java.lang.NullPointerException at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80) at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) at javax.media.jai.OpImage.addTileToCach
[JPP-Devel] [jump-pilot:bugs] #498 Most GeoTIFF drivers fail with a simple GeoTIFF image
I see that there is a newer version OJ 6344, I will test it. Just to check it is not a OS problem, I use Ubuntu with OpenJDK 1.8 --- ** [bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF image** **Status:** open **Milestone:** OJ_future **Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud **Last Updated:** Sat Sep 12, 2020 10:33 AM UTC **Owner:** nobody **Attachments:** - [small_world.tif](https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif) (240.6 kB; image/tiff) I often have a bad experience trying to read simple geotiff. To have a more objective view of the situation, I get a very simple image from the test directory of GDAL library and tested it against all our drivers. Image is attached. Here are its main characteristics (I think they are very common one) : small_world.tif size : 400 x 200 Coordinate System : wgs84 (4326) Metadata : AREA_OR_POINT=AREA Image Structure Metadata : INTERLEAVE=BAND 3 bands, Block=400x20, Type=Byte, ColorInterp=RGB I tried to import it with all the image drivers we propose (8 from Open File + ImageRaster Sextante). 3 drivers only could import the image. All others fail throughing a rough java exception. Image Raster don't fail immediately, but it does not display the image and throws NPE if one try to get more information. List of success/failures and exceptions thrown Referenced Image (ImageIO[ext],JAI) : OK ImageIO TIFF Image Reader version 1.0 : OK ImageIO TIFF Image Reader version 1.1 : OK Standard TIFF Image Reader java.lang.IllegalAccessException: class com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.tiff to unnamed module @12405818 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99) at java.base/java.lang.Class.newInstance(Class.java:579) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117) Referenced Image (JAI TIF) java.lang.NullPointerException java.lang.NullPointerException at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80) at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) at javax.media.jai.OpImage.getTile(OpImage.java:1142) at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) at javax.media.jai.RenderedImageAdapter.getData(RenderedImageAdapter.java:158) at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1099) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) at javax.media.jai.OpImage.getTile(OpImage.java:1129) at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122) at com.sun.media.jai.opimage.TranslateIntOpImage.getTile(TranslateIntOpImage.java:132) at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343) at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546) at com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:285) at com.vividsolutions.jump.workbench.imagery.ReferencedImageStyle.paint(ReferencedImageStyle.java:61) Referenced Image (JAI TIF) : same error Buffered Image (common) : com.vividsolutions.jump.workbench.imagery.ReferencedImageException: java.lang.ArrayIndexOutOfBoundsException: Index 8000 out of bounds for length 8000 at com.vividsolutions.jump.workbench.imagery.graphic.CommonsImage.initImage(CommonsImage.java:112) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.computeEnvelope(AbstractGraphicImage.java:122) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.getEnvelope(AbstractGraphicImage.java:114) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:125) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:106) at com.vividsolutions.jump.workbench.imagery.ReferencedImageFactoryFileLayerLoader.createImageFeature(ReferencedImageFactoryFileLayerLoader.java:199) at com.vividsolutions.jump.workbench.imagery.ReferencedImageFactoryFileLayerLoader.open(ReferencedImageFactoryFileLayerLoader.java:102) at org.openjump.core.ui.plugin.file.open.OpenFile
[JPP-Devel] [jump-pilot:bugs] #498 Most GeoTIFF drivers fail with a simple GeoTIFF image
thanks for testing Peppe. i actually made sure that the monoband geotiff you sent once me would properly load after the switch still. talking about the attached. wrt. to closing this ticket - yeah let's clear up the monoband issue and close then. Attachments: - [geotiff.zip](https://sourceforge.net/p/jump-pilot/bugs/_discuss/thread/e45ff882e3/344a/attachment/geotiff.zip) (303.3 kB; application/x-zip-compressed) --- ** [bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF image** **Status:** open **Milestone:** OJ_future **Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud **Last Updated:** Sat Sep 12, 2020 10:23 AM UTC **Owner:** nobody **Attachments:** - [small_world.tif](https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif) (240.6 kB; image/tiff) I often have a bad experience trying to read simple geotiff. To have a more objective view of the situation, I get a very simple image from the test directory of GDAL library and tested it against all our drivers. Image is attached. Here are its main characteristics (I think they are very common one) : small_world.tif size : 400 x 200 Coordinate System : wgs84 (4326) Metadata : AREA_OR_POINT=AREA Image Structure Metadata : INTERLEAVE=BAND 3 bands, Block=400x20, Type=Byte, ColorInterp=RGB I tried to import it with all the image drivers we propose (8 from Open File + ImageRaster Sextante). 3 drivers only could import the image. All others fail throughing a rough java exception. Image Raster don't fail immediately, but it does not display the image and throws NPE if one try to get more information. List of success/failures and exceptions thrown Referenced Image (ImageIO[ext],JAI) : OK ImageIO TIFF Image Reader version 1.0 : OK ImageIO TIFF Image Reader version 1.1 : OK Standard TIFF Image Reader java.lang.IllegalAccessException: class com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.tiff to unnamed module @12405818 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99) at java.base/java.lang.Class.newInstance(Class.java:579) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117) Referenced Image (JAI TIF) java.lang.NullPointerException java.lang.NullPointerException at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80) at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) at javax.media.jai.OpImage.getTile(OpImage.java:1142) at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) at javax.media.jai.RenderedImageAdapter.getData(RenderedImageAdapter.java:158) at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1099) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) at javax.media.jai.OpImage.getTile(OpImage.java:1129) at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122) at com.sun.media.jai.opimage.TranslateIntOpImage.getTile(TranslateIntOpImage.java:132) at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343) at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546) at com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:285) at com.vividsolutions.jump.workbench.imagery.ReferencedImageStyle.paint(ReferencedImageStyle.java:61) Referenced Image (JAI TIF) : same error Buffered Image (common) : com.vividsolutions.jump.workbench.imagery.ReferencedImageException: java.lang.ArrayIndexOutOfBoundsException: Index 8000 out of bounds for length 8000 at com.vividsolutions.jump.workbench.imagery.graphic.CommonsImage.initImage(CommonsImage.java:112) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.computeEnvelope(AbstractGraphicImage.java:122) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.getEnvelope(AbstractGraphicImage.java:114) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:125) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:106) at com.vividsolutions.jump.workbench.imagery.ReferencedImage
[JPP-Devel] [jump-pilot:bugs] #498 Most GeoTIFF drivers fail with a simple GeoTIFF image
I would like to find a solution with I imageio-ext 1.3.2. It seems to work faster and to use less memory. Otherwise I am OK to downgrade to the last working version (1.1.13) Attachments: - [mdt25a.tif](https://sourceforge.net/p/jump-pilot/bugs/_discuss/thread/e45ff882e3/ff7b/attachment/mdt25a.tif) (986.3 kB; image/tiff) --- ** [bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF image** **Status:** open **Milestone:** OJ_future **Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud **Last Updated:** Sat Sep 12, 2020 10:20 AM UTC **Owner:** nobody **Attachments:** - [small_world.tif](https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif) (240.6 kB; image/tiff) I often have a bad experience trying to read simple geotiff. To have a more objective view of the situation, I get a very simple image from the test directory of GDAL library and tested it against all our drivers. Image is attached. Here are its main characteristics (I think they are very common one) : small_world.tif size : 400 x 200 Coordinate System : wgs84 (4326) Metadata : AREA_OR_POINT=AREA Image Structure Metadata : INTERLEAVE=BAND 3 bands, Block=400x20, Type=Byte, ColorInterp=RGB I tried to import it with all the image drivers we propose (8 from Open File + ImageRaster Sextante). 3 drivers only could import the image. All others fail throughing a rough java exception. Image Raster don't fail immediately, but it does not display the image and throws NPE if one try to get more information. List of success/failures and exceptions thrown Referenced Image (ImageIO[ext],JAI) : OK ImageIO TIFF Image Reader version 1.0 : OK ImageIO TIFF Image Reader version 1.1 : OK Standard TIFF Image Reader java.lang.IllegalAccessException: class com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.tiff to unnamed module @12405818 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99) at java.base/java.lang.Class.newInstance(Class.java:579) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117) Referenced Image (JAI TIF) java.lang.NullPointerException java.lang.NullPointerException at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80) at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) at javax.media.jai.OpImage.getTile(OpImage.java:1142) at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) at javax.media.jai.RenderedImageAdapter.getData(RenderedImageAdapter.java:158) at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1099) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) at javax.media.jai.OpImage.getTile(OpImage.java:1129) at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122) at com.sun.media.jai.opimage.TranslateIntOpImage.getTile(TranslateIntOpImage.java:132) at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343) at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546) at com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:285) at com.vividsolutions.jump.workbench.imagery.ReferencedImageStyle.paint(ReferencedImageStyle.java:61) Referenced Image (JAI TIF) : same error Buffered Image (common) : com.vividsolutions.jump.workbench.imagery.ReferencedImageException: java.lang.ArrayIndexOutOfBoundsException: Index 8000 out of bounds for length 8000 at com.vividsolutions.jump.workbench.imagery.graphic.CommonsImage.initImage(CommonsImage.java:112) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.computeEnvelope(AbstractGraphicImage.java:122) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.getEnvelope(AbstractGraphicImage.java:114) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:125) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:106) at com.vividsolutions.jump.workbench.imagery.ReferencedImageFactoryFileLayerLoader.createImageFeature(ReferencedImageFactoryFileLayerLoader.java:199)
[JPP-Devel] [jump-pilot:bugs] #498 Most GeoTIFF drivers fail with a simple GeoTIFF image
we lost the ability (version OJ 6443) to load TIFF DEM (mono band rasters). I tested with several TIFF DEM, including the one I attached here. None is load. AFAIR we had the same problem when we moved to imageIO-ext 1.1.13 to 1.1.16 (OJ 1.15). So we had to downgrade to imageio-ext-tiff-1.1.13.jar. I tried to cancel imageio-ext-tiff-1.3.2.jar and substitute it with imageio-ext-tiff-1.1.13.jar on version OJ 6443 (keeping the others to ver. 1.3.2) and everything goes fine. I suggest to keep this bug ticket open until we solve this problem This is the message of error that I recognized: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.String; at it.geosolutions.imageio.plugins.tiff.TIFFField.getAsString(TIFFField.java:1164) at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.initializeFromMetadata(TIFFImageReader.java:1286) at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:831) at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:788) at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.getWidth(TIFFImageReader.java:1046) at org.openjump.core.rasterimage.OverviewsUtils.addOverviews(OverviewsUtils.java:65) at org.openjump.core.rasterimage.OverviewsUtils.getOverviews(OverviewsUtils.java:45) at org.openjump.core.rasterimage.RasterImageIO.loadImage(RasterImageIO.java:142) at org.openjump.core.rasterimage.RasterImageLayer.reLoadImage(RasterImageLayer.java:548) at org.openjump.core.rasterimage.RasterImageLayer.createImage(RasterImageLayer.java:385) at org.openjump.core.rasterimage.RasterImageRenderer.renderHook(RasterImageRenderer.java:107) --- ** [bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF image** **Status:** open **Milestone:** OJ_future **Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud **Last Updated:** Sat Sep 12, 2020 09:31 AM UTC **Owner:** nobody **Attachments:** - [small_world.tif](https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif) (240.6 kB; image/tiff) I often have a bad experience trying to read simple geotiff. To have a more objective view of the situation, I get a very simple image from the test directory of GDAL library and tested it against all our drivers. Image is attached. Here are its main characteristics (I think they are very common one) : small_world.tif size : 400 x 200 Coordinate System : wgs84 (4326) Metadata : AREA_OR_POINT=AREA Image Structure Metadata : INTERLEAVE=BAND 3 bands, Block=400x20, Type=Byte, ColorInterp=RGB I tried to import it with all the image drivers we propose (8 from Open File + ImageRaster Sextante). 3 drivers only could import the image. All others fail throughing a rough java exception. Image Raster don't fail immediately, but it does not display the image and throws NPE if one try to get more information. List of success/failures and exceptions thrown Referenced Image (ImageIO[ext],JAI) : OK ImageIO TIFF Image Reader version 1.0 : OK ImageIO TIFF Image Reader version 1.1 : OK Standard TIFF Image Reader java.lang.IllegalAccessException: class com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.tiff to unnamed module @12405818 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99) at java.base/java.lang.Class.newInstance(Class.java:579) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117) Referenced Image (JAI TIF) java.lang.NullPointerException java.lang.NullPointerException at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80) at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) at javax.media.jai.OpImage.getTile(OpImage.java:1142) at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) at javax.media.jai.RenderedImageAdapter.getData(RenderedImageAdapter.java:158) at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1099) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) at javax.media.jai.OpImage.getTile(OpImage.java:1129) at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122) at com.sun.media.jai.opimage.TranslateIntOpImage.getTile(TranslateIntOpImage.java:132) at javax.media.jai.PlanarImage.copyData(Pl
[JPP-Devel] SVN: [6445] core/trunk/src/com/vividsolutions/jump/workbench/imagery/ geotiff/GeoTIFFImage.java
Revision: 6445 http://sourceforge.net/p/jump-pilot/code/6445 Author: edso Date: 2020-09-12 10:08:13 + (Sat, 12 Sep 2020) Log Message: --- add that GeoTIFF reader utilizes JAI XTIFF reader Modified Paths: -- core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java Modified: core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java === --- core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java 2020-09-12 09:57:10 UTC (rev 6444) +++ core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java 2020-09-12 10:08:13 UTC (rev 6445) @@ -79,6 +79,6 @@ } public String getLoader() { -return null; +return "JAI XTIFF"; } } \ No newline at end of file ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] SVN: [6444] core/trunk/src/com/vividsolutions/jump/workbench/imagery/ geotiff/GeoReferencedRaster.java
Revision: 6444 http://sourceforge.net/p/jump-pilot/code/6444 Author: edso Date: 2020-09-12 09:57:10 + (Sat, 12 Sep 2020) Log Message: --- some cleanup Modified Paths: -- core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoReferencedRaster.java Modified: core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoReferencedRaster.java === --- core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoReferencedRaster.java 2020-09-12 09:09:22 UTC (rev 6443) +++ core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoReferencedRaster.java 2020-09-12 09:57:10 UTC (rev 6444) @@ -79,16 +79,7 @@ */ protected void fetchRaster() throws Exception { URI uri = new URI(imageFileLocation); -// JAI loading streams is slower than fileload, hence we check if we really -// try to open a compressed file first -//if (CompressedFile.isArchive(uri) || CompressedFile.isCompressed(uri)) { -// InputStream is = CompressedFile.openFile(uri); -// if (!(is instanceof SeekableStream)) -//is = SeekableStream.wrapInputStream(is, true); -// src = JAI.create("stream", is); -//} else { -// src = JAI.create("fileload", uri.getPath()); -//} + createJAIRenderedOP(uri); } @@ -117,7 +108,10 @@ true); decs = ImageCodec.getDecoderNames((SeekableStream) is2); FileUtil.close(is2); -System.out.println(Arrays.toString(decs)); +//System.out.println(Arrays.toString(decs)); + +// JAI loading streams is slower than fileload, hence we check if we really +// try to open a compressed file first if (CompressedFile.isArchive(uri) || CompressedFile.isCompressed(uri)) { InputStream input = CompressedFile.openFile(uri); if (!(input instanceof SeekableStream)) ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] [jump-pilot:bugs] #498 Most GeoTIFF drivers fail with a simple GeoTIFF image
I tried to handle errors in a more friendly way in r6443, but it seems that the best improvement wrt this ticket has been made by changing old jai libray by the new oss version. Thanks EDE. There is still two drivers failing in reading the small_world tiff image. One of them is Apache Commons Imaging. It may be worthwhile keeping this driver if we find images that only this driver can read. Otherwise... Peppe also fixed Info tools (thanks) and report some more problems. Maybe we should close this ticket and open more specific ones about remaining problems. What do you think ? --- ** [bugs:#498] Most GeoTIFF drivers fail with a simple GeoTIFF image** **Status:** open **Milestone:** OJ_future **Created:** Sun Aug 30, 2020 08:02 AM UTC by michael michaud **Last Updated:** Tue Sep 08, 2020 07:26 AM UTC **Owner:** nobody **Attachments:** - [small_world.tif](https://sourceforge.net/p/jump-pilot/bugs/498/attachment/small_world.tif) (240.6 kB; image/tiff) I often have a bad experience trying to read simple geotiff. To have a more objective view of the situation, I get a very simple image from the test directory of GDAL library and tested it against all our drivers. Image is attached. Here are its main characteristics (I think they are very common one) : small_world.tif size : 400 x 200 Coordinate System : wgs84 (4326) Metadata : AREA_OR_POINT=AREA Image Structure Metadata : INTERLEAVE=BAND 3 bands, Block=400x20, Type=Byte, ColorInterp=RGB I tried to import it with all the image drivers we propose (8 from Open File + ImageRaster Sextante). 3 drivers only could import the image. All others fail throughing a rough java exception. Image Raster don't fail immediately, but it does not display the image and throws NPE if one try to get more information. List of success/failures and exceptions thrown Referenced Image (ImageIO[ext],JAI) : OK ImageIO TIFF Image Reader version 1.0 : OK ImageIO TIFF Image Reader version 1.1 : OK Standard TIFF Image Reader java.lang.IllegalAccessException: class com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset cannot access class com.sun.imageio.plugins.tiff.TIFFImageReaderSpi (in module java.desktop) because module java.desktop does not export com.sun.imageio.plugins.tiff to unnamed module @12405818 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99) at java.base/java.lang.Class.newInstance(Class.java:579) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.createFeatureFactory(ImageryLayerDataset.java:236) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:117) Referenced Image (JAI TIF) java.lang.NullPointerException java.lang.NullPointerException at com.sun.media.jai.util.SunCachedTile.(SunCachedTile.java:80) at com.sun.media.jai.util.SunTileCache.add(SunTileCache.java:257) at javax.media.jai.OpImage.addTileToCache(OpImage.java:1087) at javax.media.jai.OpImage.getTile(OpImage.java:1142) at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085) at javax.media.jai.RenderedImageAdapter.getData(RenderedImageAdapter.java:158) at javax.media.jai.ScaleOpImage.computeTile(ScaleOpImage.java:1099) at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904) at javax.media.jai.OpImage.getTile(OpImage.java:1129) at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122) at com.sun.media.jai.opimage.TranslateIntOpImage.getTile(TranslateIntOpImage.java:132) at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343) at javax.media.jai.RenderedOp.copyData(RenderedOp.java:2299) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525) at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546) at com.vividsolutions.jump.workbench.imagery.geoimg.GeoImage.paint(GeoImage.java:285) at com.vividsolutions.jump.workbench.imagery.ReferencedImageStyle.paint(ReferencedImageStyle.java:61) Referenced Image (JAI TIF) : same error Buffered Image (common) : com.vividsolutions.jump.workbench.imagery.ReferencedImageException: java.lang.ArrayIndexOutOfBoundsException: Index 8000 out of bounds for length 8000 at com.vividsolutions.jump.workbench.imagery.graphic.CommonsImage.initImage(CommonsImage.java:112) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.computeEnvelope(AbstractGraphicImage.java:122) at com.vividsolutions.jump.workbench.imagery.graphic.AbstractGraphicImage.getEnvelope(AbstractGraphicImage.java:114) at com.vividsolutions.jump.workbench.imagery.ImageryLayerDataset.attachImage(ImageryLayerDataset.java:125) at com.vivi
[JPP-Devel] SVN: [6443] core/trunk/src
Revision: 6443 http://sourceforge.net/p/jump-pilot/code/6443 Author: michaudm Date: 2020-09-12 09:09:22 + (Sat, 12 Sep 2020) Log Message: --- Improve error handling for image drivers Modified Paths: -- core/trunk/src/com/vividsolutions/jump/workbench/imagery/ReferencedImageFactoryFileLayerLoader.java core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoImage.java core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java core/trunk/src/com/vividsolutions/jump/workbench/imagery/graphic/CommonsImage.java core/trunk/src/com/vividsolutions/jump/workbench/imagery/graphic/CommonsImageFactory.java core/trunk/src/com/vividsolutions/jump/workbench/imagery/graphic/IOGraphicImage.java core/trunk/src/com/vividsolutions/jump/workbench/imagery/graphic/JAIGraphicImage.java core/trunk/src/language/jump.properties core/trunk/src/language/jump_cz.properties core/trunk/src/language/jump_de.properties core/trunk/src/language/jump_es.properties core/trunk/src/language/jump_fi.properties core/trunk/src/language/jump_fr.properties core/trunk/src/language/jump_hu.properties core/trunk/src/language/jump_it.properties core/trunk/src/language/jump_ja_JP.properties core/trunk/src/language/jump_ml.properties core/trunk/src/language/jump_pt.properties core/trunk/src/language/jump_pt_BR.properties core/trunk/src/language/jump_ta_IN.properties core/trunk/src/language/jump_te.properties core/trunk/src/language/jump_zh_CN.properties core/trunk/src/language/jump_zh_HK.properties Modified: core/trunk/src/com/vividsolutions/jump/workbench/imagery/ReferencedImageFactoryFileLayerLoader.java === --- core/trunk/src/com/vividsolutions/jump/workbench/imagery/ReferencedImageFactoryFileLayerLoader.java 2020-09-12 09:05:16 UTC (rev 6442) +++ core/trunk/src/com/vividsolutions/jump/workbench/imagery/ReferencedImageFactoryFileLayerLoader.java 2020-09-12 09:09:22 UTC (rev 6443) @@ -34,9 +34,11 @@ import java.util.HashSet; import java.util.Map; +import com.vividsolutions.jump.workbench.Logger; import org.openjump.core.ccordsys.srid.SRIDStyle; import org.openjump.core.ccordsys.utils.ProjUtils; import org.openjump.core.ui.io.file.AbstractFileLayerLoader; +import org.openjump.core.ui.util.ExceptionUtil; import org.openjump.core.ui.util.TaskUtil; import com.vividsolutions.jts.geom.Coordinate; @@ -53,6 +55,7 @@ import com.vividsolutions.jump.workbench.model.Layer; import com.vividsolutions.jump.workbench.model.LayerManager; import com.vividsolutions.jump.workbench.model.Prioritized; +import org.saig.jump.lang.I18N; public class ReferencedImageFactoryFileLayerLoader extends AbstractFileLayerLoader implements Prioritized { @@ -99,8 +102,17 @@ layerManager.setFiringEvents(true); } Feature feature; -feature = createImageFeature(imageFactory, uri, -getImageryLayerDataset(layer)); +try { + feature = createImageFeature(imageFactory, uri, + getImageryLayerDataset(layer)); +} catch(Exception e) { + throw new ReferencedImageException(I18N.getMessage( + "com.vividsolutions.jump.workbench.imagery.ReferencedImageException", + new Object[]{uri, imageFactory.getTypeName() + + " (" + imageFactory.getDescription() + ")"}) + "\n\n" + e.getMessage(), + e + ); +} // only add layer if no exception occured if (targetLayer == null) { Modified: core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoImage.java === --- core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoImage.java 2020-09-12 09:05:16 UTC (rev 6442) +++ core/trunk/src/com/vividsolutions/jump/workbench/imagery/geoimg/GeoImage.java 2020-09-12 09:09:22 UTC (rev 6443) @@ -78,10 +78,10 @@ throws ReferencedImageException { try { gtr = new GeoReferencedRaster(location, reader); + // Try to access data and fail fast if not possible + gtr.src.getData(); } catch (Exception ex) { dispose(); - String causemsg = ex.getCause() != null ? "\n" - + ex.getCause().getMessage() : ""; throw new ReferencedImageException(ex); } } Modified: core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java === --- core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java 2020-09-12 09:05:16 UTC (rev 6442) +++ core/trunk/src/com/vividsolutions/jump/workbench/imagery/geotiff/GeoTIFFImage.java 2020-09-12 09:09:22 UTC (rev 6443) @@ -57,14 +57,16 @@ try { gtr = new GeoTIFFRaster(location); rasterPainter = new RasterPainter(gtr); -} cat
[JPP-Devel] SVN: [6442] core/trunk/src/com/vividsolutions/jump/util/StringUtil.java
Revision: 6442 http://sourceforge.net/p/jump-pilot/code/6442 Author: michaudm Date: 2020-09-12 09:05:16 + (Sat, 12 Sep 2020) Log Message: --- Improve splitting text for long error messages Modified Paths: -- core/trunk/src/com/vividsolutions/jump/util/StringUtil.java Modified: core/trunk/src/com/vividsolutions/jump/util/StringUtil.java === --- core/trunk/src/com/vividsolutions/jump/util/StringUtil.java 2020-09-11 19:17:31 UTC (rev 6441) +++ core/trunk/src/com/vividsolutions/jump/util/StringUtil.java 2020-09-12 09:05:16 UTC (rev 6442) @@ -94,18 +94,15 @@ */ public static String split(String s, int n) { StringBuilder b = new StringBuilder(); -boolean wrapPending = false; - +int index = 0; for (int i = 0; i < s.length(); i++) { -if (((i % n) == 0) && (i > 0)) { -wrapPending = true; -} char c = s.charAt(i); +index++; -if (wrapPending && (c == ' ')) { +if (c == '\n' || (index >= n && (c == ' '))) { b.append("\n"); -wrapPending = false; +index = 0; } else { b.append(c); } ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel