HI List,
I have a single band Geotiff of type 32bit (floating points) created by
mosaicing some ASC files together. I'm using the standard GeoTiff reader in
GeoServer to read it.
I originally used this line (note the "Predictor=2"):
gdal_translate -of GTiff -co TILED=YES -co COMPRESS=DEFLATE -co ZLEVEL=9
> -co *PREDICTOR=2* -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -a_srs EPSG:27700
> height.vrt height.tif
But that got me the below error:
Error rendering coverage on the fast path
> org.geotools.coverage.processing.CoverageProcessingException:
> java.lang.RuntimeException: javax.imageio.IIOException: 32-bit samples are
> not supported for Horizontal differencing Predictor
java.lang.RuntimeException: javax.imageio.IIOException: 32-bit samples are
> not supported for Horizontal differencing Predictor
> javax.imageio.IIOException: 32-bit samples are not supported for
> Horizontal differencing Predictor
> 32-bit samples are not supported for Horizontal differencing Predictor
Ok, that makes sense. So I changed the Predictor to 3 which is designed for
floating point data.
The GDAL documentation (http://www.gdal.org/frmt_gtiff.html) says:
> "PREDICTOR=[1/2/3]: Set the predictor for LZW or DEFLATE compression. The
> default is 1 (no predictor), 2 is horizontal differencing and 3 is floating
> point prediction."
gdal_translate -of GTiff -co TILED=YES -co COMPRESS=DEFLATE -co ZLEVEL=9
> -co *PREDICTOR=3* -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -a_srs EPSG:27700
> height.vrt height.tif
Except now I get this error:
> Error rendering coverage on the fast path
> org.geotools.coverage.processing.CoverageProcessingException:
> java.lang.RuntimeException: javax.imageio.IIOException: Illegal value for
> Predictor in TIFF file
> java.lang.RuntimeException: javax.imageio.IIOException: Illegal value for
> Predictor in TIFF file
> javax.imageio.IIOException: Illegal value for Predictor in TIFF file
> Illegal value for Predictor in TIFF file
Surely Predictor=3 should work? In the end I had to change it back to the
default (predictor=1) to get it to work. But the resultant file is
significantly larger.
All three predictors work fine in ArcGIS and QGIS.
Is this an unsupported GDAL feature or a bug?
Cheers,
Jonathan
--
This transmission is intended for the named addressee(s) only and may
contain confidential, sensitive or personal information and should be
handled accordingly. Unless you are the named addressee (or authorised to
receive it for the addressee) you may not copy or use it, or disclose it to
anyone else. If you have received this transmission in error please notify
the sender immediately. All email traffic sent to or from us, including
without limitation all GCSX traffic, may be subject to recording and/or
monitoring in accordance with relevant legislation.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users