[Geoserver-users] Failed to load some geotiff files when adding new data store.

Hi,

I am trying to add a new store for GEOTIFF data source. When I clicked
Save, I got this error:
"Could not list layers for this store, an error occurred retrieving them:
Failed to create reader from
file:///home/vriuser/Downloads/landsat/grampians_oli_2014019_geo.tif and
hints null". I inspected the tomcat catalina.out file and saw the following
stack trace:
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: org.geotools.data.DataSourceException: [J cannot be cast to
it.geosolutions.imageioimpl.plugins.tiff.TIFFIFD
        at
org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:399)
        at
org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:210)
        ... 126 more
Caused by: java.lang.ClassCastException: [J cannot be cast to
it.geosolutions.imageioimpl.plugins.tiff.TIFFIFD
        at
it.geosolutions.imageioimpl.plugins.tiff.TIFFImageMetadata.getIFDAsTree(TIFFImageMetadata.java:196)
        at
it.geosolutions.imageioimpl.plugins.tiff.TIFFImageMetadata.getNativeTree(TIFFImageMetadata.java:226)
        at
it.geosolutions.imageioimpl.plugins.tiff.TIFFImageMetadata.getAsTree(TIFFImageMetadata.java:214)
        at
it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.getImageMetadata(TIFFImageReader.java:1193)
        at
org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:275)
        ... 127 more
30 Jan 13:58:12 INFO [geoserver.web] - Getting list of coverages for saved
store file:///home/vriuser/Downloads/landsat/grampians_oli_2014019_geo.tif
java.lang.RuntimeException: Could not list layers for this store, an error
occurred retrieving them: Failed to create reader from
file:///home/vriuser/Downloads/landsat/grampians_oli_2014019_geo.tif and
hints null
        at
org.geoserver.web.data.layer.NewLayerPageProvider.getItemsInternal(NewLayerPageProvider.java:150)
        at
org.geoserver.web.data.layer.NewLayerPageProvider.getItems(NewLayerPageProvider.java:58)
        at
org.geoserver.web.wicket.GeoServerDataProvider.fullSize(GeoServerDataProvider.java:236)
        at
org.geoserver.web.wicket.GeoServerTablePanel$PagerDelegate.updateMatched(GeoServerTablePanel.java:562)
        at
org.geoserver.web.wicket.GeoServerTablePanel$PagerDelegate.<init>(GeoServerTablePanel.java:555)
        at
org.geoserver.web.wicket.GeoServerTablePanel.<init>(GeoServerTablePanel.java:219)

I was able to load other Geotiff files before and not sure what is wrong
with this file. This file was downloaded from NASA Earth Observatory web
site:

http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=82934&src=ve

I used gdalinfo to verify the file and here is the output from gdalinfo:

gdalinfo grampians_oli_2014019_geo.tif
Driver: GTiff/GeoTIFF
Files: grampians_oli_2014019_geo.tif
Size is 4800, 4800
Coordinate System is:
PROJCS["WGS 84 / UTM zone 54S",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",141],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32754"]]
Origin = (572107.500000000000000,5924567.500000000000000)
Pixel Size = (15.000000000000000,-15.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_DATETIME=2014:01:23 13:08:10
  TIFFTAG_IMAGEDESCRIPTION=IDL TIFF file
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_SOFTWARE=Adobe Photoshop CS6 (Macintosh)
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 572107.500, 5924567.500) (141d48'30.69"E, 36d49'19.23"S)
Lower Left ( 572107.500, 5852567.500) (141d48'55.67"E, 37d28'15.48"S)
Upper Right ( 644107.500, 5924567.500) (142d36'56.26"E, 36d48'49.61"S)
Lower Right ( 644107.500, 5852567.500) (142d37'46.15"E, 37d27'45.16"S)
Center ( 608107.500, 5888567.500) (142d13' 2.20"E, 37d 8'34.90"S)
Band 1 Block=4800x13 Type=Byte, ColorInterp=Red
Band 2 Block=4800x13 Type=Byte, ColorInterp=Green
Band 3 Block=4800x13 Type=Byte, ColorInterp=Blue
Band 4 Block=4800x13 Type=Byte, ColorInterp=Undefined

If you want obtain the file to test for yourself, you can download it from
the above link and there are two geotiff download links at the bottom of the
image. I am not sure if this a data or software error. Any help on this
issue is greatly appreciated. Many thanks in advance.

Thanks,
Tam

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-some-geotiff-files-when-adding-new-data-store-tp5101048.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao,
I believe I have seen this error with some geotiff because of some
tiff field which where not mapped in the underlying ImageIO TIff
reader.

I will test the data to make sure it is not a new bug/missing mapping.

I would try to do this. I would use gdal_translate to rewrite the tiff
using gdal which usually cleans up many errors in the tiff headers.

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Thu, Jan 30, 2014 at 11:47 PM, tt5430 <tt9488@anonymised.com> wrote:

Hi,

I am trying to add a new store for GEOTIFF data source. When I clicked
Save, I got this error:
"Could not list layers for this store, an error occurred retrieving them:
Failed to create reader from
file:///home/vriuser/Downloads/landsat/grampians_oli_2014019_geo.tif and
hints null". I inspected the tomcat catalina.out file and saw the following
stack trace:
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: org.geotools.data.DataSourceException: [J cannot be cast to
it.geosolutions.imageioimpl.plugins.tiff.TIFFIFD
        at
org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:399)
        at
org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:210)
        ... 126 more
Caused by: java.lang.ClassCastException: [J cannot be cast to
it.geosolutions.imageioimpl.plugins.tiff.TIFFIFD
        at
it.geosolutions.imageioimpl.plugins.tiff.TIFFImageMetadata.getIFDAsTree(TIFFImageMetadata.java:196)
        at
it.geosolutions.imageioimpl.plugins.tiff.TIFFImageMetadata.getNativeTree(TIFFImageMetadata.java:226)
        at
it.geosolutions.imageioimpl.plugins.tiff.TIFFImageMetadata.getAsTree(TIFFImageMetadata.java:214)
        at
it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.getImageMetadata(TIFFImageReader.java:1193)
        at
org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:275)
        ... 127 more
30 Jan 13:58:12 INFO [geoserver.web] - Getting list of coverages for saved
store file:///home/vriuser/Downloads/landsat/grampians_oli_2014019_geo.tif
java.lang.RuntimeException: Could not list layers for this store, an error
occurred retrieving them: Failed to create reader from
file:///home/vriuser/Downloads/landsat/grampians_oli_2014019_geo.tif and
hints null
        at
org.geoserver.web.data.layer.NewLayerPageProvider.getItemsInternal(NewLayerPageProvider.java:150)
        at
org.geoserver.web.data.layer.NewLayerPageProvider.getItems(NewLayerPageProvider.java:58)
        at
org.geoserver.web.wicket.GeoServerDataProvider.fullSize(GeoServerDataProvider.java:236)
        at
org.geoserver.web.wicket.GeoServerTablePanel$PagerDelegate.updateMatched(GeoServerTablePanel.java:562)
        at
org.geoserver.web.wicket.GeoServerTablePanel$PagerDelegate.<init>(GeoServerTablePanel.java:555)
        at
org.geoserver.web.wicket.GeoServerTablePanel.<init>(GeoServerTablePanel.java:219)

I was able to load other Geotiff files before and not sure what is wrong
with this file. This file was downloaded from NASA Earth Observatory web
site:

http://earthobservatory.nasa.gov/NaturalHazards/view.php?id=82934&src=ve

I used gdalinfo to verify the file and here is the output from gdalinfo:

gdalinfo grampians_oli_2014019_geo.tif
Driver: GTiff/GeoTIFF
Files: grampians_oli_2014019_geo.tif
Size is 4800, 4800
Coordinate System is:
PROJCS["WGS 84 / UTM zone 54S",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",141],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32754"]]
Origin = (572107.500000000000000,5924567.500000000000000)
Pixel Size = (15.000000000000000,-15.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_DATETIME=2014:01:23 13:08:10
  TIFFTAG_IMAGEDESCRIPTION=IDL TIFF file
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_SOFTWARE=Adobe Photoshop CS6 (Macintosh)
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 572107.500, 5924567.500) (141d48'30.69"E, 36d49'19.23"S)
Lower Left ( 572107.500, 5852567.500) (141d48'55.67"E, 37d28'15.48"S)
Upper Right ( 644107.500, 5924567.500) (142d36'56.26"E, 36d48'49.61"S)
Lower Right ( 644107.500, 5852567.500) (142d37'46.15"E, 37d27'45.16"S)
Center ( 608107.500, 5888567.500) (142d13' 2.20"E, 37d 8'34.90"S)
Band 1 Block=4800x13 Type=Byte, ColorInterp=Red
Band 2 Block=4800x13 Type=Byte, ColorInterp=Green
Band 3 Block=4800x13 Type=Byte, ColorInterp=Blue
Band 4 Block=4800x13 Type=Byte, ColorInterp=Undefined

If you want obtain the file to test for yourself, you can download it from
the above link and there are two geotiff download links at the bottom of the
image. I am not sure if this a data or software error. Any help on this
issue is greatly appreciated. Many thanks in advance.

Thanks,
Tam

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-some-geotiff-files-when-adding-new-data-store-tp5101048.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends. Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Ciao,

Thanks for your help, Simone. I could load the file after I used
gdal_translate to rewrite it. I am not sure what was wrong with header.
However, I was able to view the original file using the "Image Viewer" on my
Linux ubuntu box. Is it considered a bug in geoServer's geoTiff library?
Anyway, thanks a lot for your help. It worked!

Regards,
Tam

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-some-geotiff-files-when-adding-new-data-store-tp5101048p5101249.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Dear Tam,
please, read below...

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Fri, Jan 31, 2014 at 5:36 PM, tt5430 <tt9488@anonymised.com> wrote:

Ciao,

Thanks for your help, Simone. I could load the file after I used
gdal_translate to rewrite it.

cool

I am not sure what was wrong with header.

I believe there was strange metadata, maybe not even strictly
geospatial, which was not correctly parse by GeoServer

However, I was able to view the original file using the "Image Viewer" on my
Linux ubuntu box.

That does not indicate anything most part of the time

Is it considered a bug in geoServer's geoTiff library?

At least it woulbe a good material for a request for enhancement.

Could you please file a JIRA for GeoServer to fix this problem?

Anyway, thanks a lot for your help. It worked!

Regards,
Tam

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-some-geotiff-files-when-adding-new-data-store-tp5101048p5101249.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Simone,

I’d like to submit a JIRA for this issue to geoServer but I could not find anywhere on the forum that I can write a JIRA. Can you show me how?

Regards,

Tam

···

On Mon, Feb 3, 2014 at 11:12 AM, Simone Giannecchini [via OSGeo.org] <[hidden email]> wrote:

Dear Tam,
please, read below…

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax:
+39 0584 1660272
mob:
+39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Fri, Jan 31, 2014 at 5:36 PM, tt5430 <[hidden email]> wrote:

Ciao,

Thanks for your help, Simone. I could load the file after I used
gdal_translate to rewrite it.

cool

I am not sure what was wrong with header.

I believe there was strange metadata, maybe not even strictly
geospatial, which was not correctly parse by GeoServer

However, I was able to view the original file using the “Image Viewer” on my
Linux ubuntu box.

That does not indicate anything most part of the time

Is it considered a bug in geoServer’s geoTiff library?

At least it woulbe a good material for a request for enhancement.

Could you please file a JIRA for GeoServer to fix this problem?

Anyway, thanks a lot for your help. It worked!

Regards,
Tam


View this message in context: http://osgeo-org.1560.x6.nabble.com/Failed-to-load-some-geotiff-files-when-adding-new-data-store-tp5101048p5101249.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk


Geoserver-users mailing list

[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk


Geoserver-users mailing list

[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users


If you reply to this email, your message will be added to the discussion below:

http://osgeo-org.1560.x6.nabble.com/Failed-to-load-some-geotiff-files-when-adding-new-data-store-tp5101048p5101663.html

To unsubscribe from Failed to load some geotiff files when adding new data store., click here.
NAML

On Tue, Feb 4, 2014 at 6:02 PM, tt5430 <tt9488@anonymised.com> wrote:

Hi Simone,

I'd like to submit a JIRA for this issue to geoServer but I could not find
anywhere on the forum that I can write a JIRA. Can you show me how?

Go to this site, http://jira.codehaus.org/browse/GEOS, follow the
instructions to register, then log in, and a blue "Create issue" button
will appear a the top of the page

Cheers
Andrea

--
== Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information ==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------