Opened 8 years ago
Last modified 6 years ago
#12108 closed defect
It is not possible to open GeoTiff image — at Initial Version
Reported by: | kendzi | Owned by: | team |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Plugin importimage | Version: | |
Keywords: | template_report geotiff geotools aster | Cc: |
Description
What steps will reproduce the problem?
- Install Import Image plugin
- Open GeoTiff image with elevation from ASTER
What is the expected result?
Image is opened.
What happens instead?
Console show an error. It looks that it is internal error of geotools. The class MaskOverviewProvider$SpiHelper is intentionally converting path into URL and past it to
FileImageInputStreamSpi.createInputStreamInstance
But java 7 is expecting file there:
if (input instanceof File) { try { return new FileImageInputStream((File)input); } catch (Exception e) { return null; } } else { throw new IllegalArgumentException(); }
Console stacktrace:
Nov 16, 2015 7:53:37 PM org.geotools.coverage.grid.io.imageio.MaskOverviewProvider$SpiHelper <init> WARNING: Unable to create a Reader for File: /home/kendzi/Desktop/wycieczka piatek/new.tiff java.lang.IllegalArgumentException at com.sun.imageio.spi.FileImageInputStreamSpi.createInputStreamInstance(FileImageInputStreamSpi.java:60) at org.geotools.coverage.grid.io.imageio.MaskOverviewProvider$SpiHelper.<init>(MaskOverviewProvider.java:720) at org.geotools.coverage.grid.io.imageio.MaskOverviewProvider.<init>(MaskOverviewProvider.java:106) at org.geotools.coverage.grid.io.imageio.MaskOverviewProvider.<init>(MaskOverviewProvider.java:101) at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:357) at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:249) at org.openstreetmap.josm.plugins.ImportImagePlugin.PluginOperations.readGeoTiff(PluginOperations.java:349) at org.openstreetmap.josm.plugins.ImportImagePlugin.PluginOperations.createGridFromFile(PluginOperations.java:120) at org.openstreetmap.josm.plugins.ImportImagePlugin.ImageLayer.createImage(ImageLayer.java:92) at org.openstreetmap.josm.plugins.ImportImagePlugin.ImageLayer.<init>(ImageLayer.java:76) at org.openstreetmap.josm.plugins.ImportImagePlugin.LoadImageAction.actionPerformed(LoadImageAction.java:47) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3320) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:708) at java.awt.EventQueue$4.run(EventQueue.java:706) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) org.geotools.data.DataSourceException: java.lang.IllegalArgumentException at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:262) at org.openstreetmap.josm.plugins.ImportImagePlugin.PluginOperations.readGeoTiff(PluginOperations.java:349) at org.openstreetmap.josm.plugins.ImportImagePlugin.PluginOperations.createGridFromFile(PluginOperations.java:120) at org.openstreetmap.josm.plugins.ImportImagePlugin.ImageLayer.createImage(ImageLayer.java:92) at org.openstreetmap.josm.plugins.ImportImagePlugin.ImageLayer.<init>(ImageLayer.java:76) at org.openstreetmap.josm.plugins.ImportImagePlugin.LoadImageAction.actionPerformed(LoadImageAction.java:47) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3320) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:708) at java.awt.EventQueue$4.run(EventQueue.java:706) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) Caused by: org.geotools.data.DataSourceException: java.lang.IllegalArgumentException at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:487) at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:249) ... 44 more Caused by: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException at org.geotools.coverage.grid.io.imageio.MaskOverviewProvider$SpiHelper.<init>(MaskOverviewProvider.java:729) at org.geotools.coverage.grid.io.imageio.MaskOverviewProvider.<init>(MaskOverviewProvider.java:106) at org.geotools.coverage.grid.io.imageio.MaskOverviewProvider.<init>(MaskOverviewProvider.java:101) at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:357) ... 45 more Caused by: java.lang.IllegalArgumentException at com.sun.imageio.spi.FileImageInputStreamSpi.createInputStreamInstance(FileImageInputStreamSpi.java:60) at org.geotools.coverage.grid.io.imageio.MaskOverviewProvider$SpiHelper.<init>(MaskOverviewProvider.java:720) ... 48 more
Please provide any additional information below. Attach a screenshot if possible.
Build-Date: 2015-11-16 19:50:45 Revision: 9013 Is-Local-Build: true Identification: JOSM/1.5 (9013 SVN en) Linux Ubuntu 15.10 Memory Usage: 982 MB / 5376 MB (677 MB allocated, but free) Java version: 1.7.0_51, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:37775, -Djosm.home=/home/kendzi/josm_dev/, -Dsun.java2d.noddraw=true, -D_jogl.debug.GraphicsConfiguration=true, -Dkendzi3d.opengl.sampleBuffers=true, -Dkendzi3d.opengl.zbuffer=16, -Djogl.debug=false, -Dfile.encoding=UTF-8] Program arguments: [--language=en, /home/kendzi/josm_dev/test.osm] Dataset consistency test: No problems found Plugins: - ImportImagePlugin (31746) - ShowInGoogleMaps (7) - geotools (31744) - jts (31603) - kendzi3d-jogl (41) - kendzi3d-resources (0.0.1) - log4j (31603)
Note:
See TracTickets
for help on using tickets.
Example file