Hi list,
I am upgrading GT but having troubles keeping the functionality of my
application.
The issue is I cannot instantiate a GeoTiff reader while since I get stuck
at getting the header info; more specifically while initializing the
SpiHelper of the MaskOverviewProvider.
Similarly to what happened to the OSM guys [1], the root of the problems
seems to be the unavailability of the
URLImageInputStreamSpi at the time of picking the SPI.
With GT-16_M0 I get a ChannelImageInputStream; with GT-15.1
RAFImageInputStreamSpi and both correctly throw an IllegalArgumentException
because the input (a URL) is not supported.
Any suggestion on how to handle this problem?
My code was working with GT 2.7.
Thank you,
-Piero
[1] https://josm.openstreetmap.de/ticket/12108
PS. Relevant stack trace (GT-15.1):
Caused by: org.geotools.data.DataSourceException:
java.lang.IllegalArgumentException: input not a RandomAccessFile!
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:266)
at
com.ebotlution.libs.utils.GeoToolsUtils.gridReaderLayerOf(GeoToolsUtils.java:1961)
... 30 more
Caused by: org.geotools.data.DataSourceException:
java.lang.IllegalArgumentException: input not a RandomAccessFile!
at
org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:491)
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:253)
... 31 more
Caused by: java.lang.IllegalArgumentException:
java.lang.IllegalArgumentException: input not a RandomAccessFile!
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:361)
... 32 more
Caused by: java.lang.IllegalArgumentException: input not a RandomAccessFile!
at
com.sun.imageio.spi.RAFImageInputStreamSpi.createInputStreamInstance(RAFImageInputStreamSpi.java:61)
at
org.geotools.coverage.grid.io.imageio.MaskOverviewProvider$SpiHelper.<init>(MaskOverviewProvider.java:720)
... 35 more
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users