[Geoserver-users] IndexOutOfBoundsException

When trying to view coverages using the openlayers client provided with
GeoServer 1.7.2 (I didn't check for 1.7.1 if it's exactly the same error,
but I also had problems), I see a white screen and an exception :
"All factories fail for the operation ImageRead" ... Caused by ...
IndexOutOfBoundsException at
com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage. If I
zoom far enough, I get rid of the error and see the maps, but zooming out
shows the problem again.

The data I'm trying to display is a set of four tif + tfw files for which I
created overviews using gdaladdo (the data is read-only, it creates a
.tif.ovr file), then grouped in a mosaic using gdaltindex -tileindex.

Viewing a single tif + tfw file for which I created overviews works fine.
It also works for a mosaic of four tif + tfw files without overviews.
Sometimes in these 2 cases I have an exception :
NumberFormatException : empty String at
sun.misc.FloatingDecimal.readJavaFormatString, but resending the request
solves this problem.

Attached a part of the log file showing the error :
http://www.nabble.com/file/p21663083/ImageIndexOutOfBounds.log
ImageIndexOutOfBounds.log

How to get rid of the IndexOutOfBoundsException ?
--
View this message in context: http://www.nabble.com/IndexOutOfBoundsException-tp21663083p21663083.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I was generating the overviews using
gdaladdo -r mode file.tif 2 4 8 16
and saw in the man page of gdaladdo that the 'mode' downsampling algorithm
wasn't implemented yet. Nevertheless, trying "-r nearest" gives the same
IndexOutOfBoundsException.
I converted my tif + tfw files to geotiff ones, generated overviews in those
geotiff files, and made the mosaic, it works.
The only problem is that I have to create geotiff files, instead of using
the tif + tfw which already exist, increasing the amount of data to maintain
and the disk space needed.

I think the problem might come from the .tif.ovr files, that geoserver
doesn't handle yet. Or does it ?

acangi wrote:

When trying to view coverages using the openlayers client provided with
GeoServer 1.7.2 (I didn't check for 1.7.1 if it's exactly the same error,
but I also had problems), I see a white screen and an exception :
"All factories fail for the operation ImageRead" ... Caused by ...
IndexOutOfBoundsException at
com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage. If I
zoom far enough, I get rid of the error and see the maps, but zooming out
shows the problem again.

The data I'm trying to display is a set of four tif + tfw files for which
I created overviews using gdaladdo (the data is read-only, it creates a
.tif.ovr file), then grouped in a mosaic using gdaltindex -tileindex.

Viewing a single tif + tfw file for which I created overviews works fine.
It also works for a mosaic of four tif + tfw files without overviews.
Sometimes in these 2 cases I have an exception :
NumberFormatException : empty String at
sun.misc.FloatingDecimal.readJavaFormatString, but resending the request
solves this problem.

Attached a part of the log file showing the error :
http://www.nabble.com/file/p21663083/ImageIndexOutOfBounds.log
ImageIndexOutOfBounds.log

How to get rid of the IndexOutOfBoundsException ?

--
View this message in context: http://www.nabble.com/IndexOutOfBoundsException-tp21663083p21702577.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

acangi ha scritto:

I was generating the overviews using gdaladdo -r mode file.tif 2 4 8 16
and saw in the man page of gdaladdo that the 'mode' downsampling algorithm
wasn't implemented yet. Nevertheless, trying "-r nearest" gives the same
IndexOutOfBoundsException.
I converted my tif + tfw files to geotiff ones, generated overviews in those
geotiff files, and made the mosaic, it works. The only problem is that I have to create geotiff files, instead of using
the tif + tfw which already exist, increasing the amount of data to maintain
and the disk space needed.

Mumble, that error makes me think not all of your .tif files had the
overviews ready. In order for the mosaic plugin to work the images all
need to have the very same structure, that is, same native resolution,
same set of overviews. If only one is missing an overview level you'll
get exactly that error.

I think the problem might come from the .tif.ovr files, that geoserver
doesn't handle yet. Or does it ?

Not sure... are these Erdas style overviews? If so the GDAL plugin might
read them. Simone?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea Aime wrote:

I think the problem might come from the .tif.ovr files, that geoserver
doesn't handle yet. Or does it ?

Not sure... are these Erdas style overviews? If so the GDAL plugin might
read them. Simone?

Those .tif.ovr files are created by GDAL. It has on option to leave the original tiffs untouched and create overviews as a separate file. So new enough GDAL itself can for sure read them but if Geoserver GDAL plugin is made from a bit older components it does necessarily support them.

-Jukka Rahkonen-

Rahkonen Jukka ha scritto:

Andrea Aime wrote:

I think the problem might come from the .tif.ovr files, that
geoserver doesn't handle yet. Or does it ?

Not sure... are these Erdas style overviews? If so the GDAL plugin
might read them. Simone?

Those .tif.ovr files are created by GDAL. It has on option to leave
the original tiffs untouched and create overviews as a separate file.
So new enough GDAL itself can for sure read them but if Geoserver
GDAL plugin is made from a bit older components it does necessarily
support them.

The GDAL version used is still old, 1.4 I believe, so no, these
external overviews won't be supported as far as I know.
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Ciao,
geoserver does not handle external overviews at the moment.

Notice also that the GDAL extensions do not include geotiff support at
the moment, since we already have a geotiff plugin.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

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

On Thu, Jan 29, 2009 at 7:27 PM, Andrea Aime <aaime@anonymised.com> wrote:

Rahkonen Jukka ha scritto:

Andrea Aime wrote:

I think the problem might come from the .tif.ovr files, that
geoserver doesn't handle yet. Or does it ?

Not sure... are these Erdas style overviews? If so the GDAL plugin
might read them. Simone?

Those .tif.ovr files are created by GDAL. It has on option to leave
the original tiffs untouched and create overviews as a separate file.
So new enough GDAL itself can for sure read them but if Geoserver
GDAL plugin is made from a bit older components it does necessarily
support them.

The GDAL version used is still old, 1.4 I believe, so no, these
external overviews won't be supported as far as I know.
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Looking at the old exception,
it seems to me that the problem you are experiencing is simply that
you created external overviews (which are not handled at the moment)
for the various tiff of your mosaic.
Then you configured the mosaic to look for those external overvies
which cause it to choke since the overviews where not embedded in the
tiff file (that why the message:

Caused by: java.lang.IndexOutOfBoundsException: imageIndex out of bounds!
  at com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage(TIFFImageReader.java:307)

Notice that adding support for external overviews would not be too
difficult to achcieve.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

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

On Wed, Jan 28, 2009 at 10:39 AM, acangi <aca@anonymised.com> wrote:

I was generating the overviews using
gdaladdo -r mode file.tif 2 4 8 16
and saw in the man page of gdaladdo that the 'mode' downsampling algorithm
wasn't implemented yet. Nevertheless, trying "-r nearest" gives the same
IndexOutOfBoundsException.
I converted my tif + tfw files to geotiff ones, generated overviews in those
geotiff files, and made the mosaic, it works.
The only problem is that I have to create geotiff files, instead of using
the tif + tfw which already exist, increasing the amount of data to maintain
and the disk space needed.

I think the problem might come from the .tif.ovr files, that geoserver
doesn't handle yet. Or does it ?

acangi wrote:

When trying to view coverages using the openlayers client provided with
GeoServer 1.7.2 (I didn't check for 1.7.1 if it's exactly the same error,
but I also had problems), I see a white screen and an exception :
"All factories fail for the operation ImageRead" ... Caused by ...
IndexOutOfBoundsException at
com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader.seekToImage. If I
zoom far enough, I get rid of the error and see the maps, but zooming out
shows the problem again.

The data I'm trying to display is a set of four tif + tfw files for which
I created overviews using gdaladdo (the data is read-only, it creates a
.tif.ovr file), then grouped in a mosaic using gdaltindex -tileindex.

Viewing a single tif + tfw file for which I created overviews works fine.
It also works for a mosaic of four tif + tfw files without overviews.
Sometimes in these 2 cases I have an exception :
NumberFormatException : empty String at
sun.misc.FloatingDecimal.readJavaFormatString, but resending the request
solves this problem.

Attached a part of the log file showing the error :
http://www.nabble.com/file/p21663083/ImageIndexOutOfBounds.log
ImageIndexOutOfBounds.log

How to get rid of the IndexOutOfBoundsException ?

--
View this message in context: http://www.nabble.com/IndexOutOfBoundsException-tp21663083p21702577.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Thank you for your replies. That was it : geoserver doesn't handle external
overviews yet.
I made a copy of my tif and tfw files such as I could use them read/write,
gdaladdo puts the overviews IN the tiff files without external overviews,
and it works.

Simone Giannecchini wrote:

Looking at the old exception,
it seems to me that the problem you are experiencing is simply that
you created external overviews (which are not handled at the moment)
for the various tiff of your mosaic.
Then you configured the mosaic to look for those external overvies
which cause it to choke since the overviews where not embedded in the
tiff file

Support for external overviews would be interesting, it would allow me not
to make a hard copy of my (heavy) R/O data.

Simone Giannecchini wrote:

Notice that adding support for external overviews would not be too
difficult to achieve.

Geotiff and tif+tfw performances look like similar to me...how would it
compare to a pyramid structure? Maybe this would allow me not to create
overviews in the tif files, and thus not to make a copy of the data ?
--
View this message in context: http://www.nabble.com/IndexOutOfBoundsException-tp21663083p21743665.html
Sent from the GeoServer - User mailing list archive at Nabble.com.