I downloaded the Landsat GeoTIFF image from USGS EarthExplorer website. When
I tried to view it on my WorldWind map client, I got ClassCastException.
However, I could view it using the OpenLayers previewer. Below are the
getMap requests from the two viewers:
>From my WorldWind client:
Request: getMap
Buffer = 0
Format = image/png
Filter = null
Filters = null
Width = 512
Height = 512
ViewParams = null
Crs = GEOGCS["WGS84",
DATUM["WGS84",
SPHEROID["WGS84", 6378137.0, 298.257223563]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["Web Map Service CRS","84"]]
Bbox = ReferencedEnvelope[-126.0 : -117.0, 27.0 : 36.0]
Elevation = []
Angle = 0.0
BgColor = java.awt.Color[r=255,g=255,b=255]
Transparent = true
StartIndex = null
FormatOptions = {}
RemoteOwsType = null
RemoteOwsURL = null
SldBody = null
ValidateSchema = false
Sld = null
CQLFilter = null
FeatureId = null
SldVersion = null
Tiled = false
Palette = null
FeatureVersion = null
SRS = CRS:84
Styles = [StyleImpl[ name=raster]]
Layers = [org.geoserver.wms.MapLayerInfo@3aad70ed]
MaxFeatures = null
TilesOrigin = null
Env = {}
Exceptions = SE_XML
Time = []
Version = 1.3
Request = GetMap
BaseUrl = http://172.16.203.30:8080/geoserver/
Get = true
RawKvp = {CRS=CRS:84, BBOX=-126.0,27.0,-117.0,36.0, TRANSPARENT=TRUE,
VERSION=1.3, FORMAT=image/png, SERVICE=WMS, HEIGHT=512, REQUEST=GetMap,
LAYERS=geotiff:LC80420362014047LGN00_B10, STYLES=, WIDTH=512}
RequestCharset = UTF-8
28 Feb 08:18:29 ERROR [geoserver.ows] -
java.lang.ClassCastException: [[B cannot be cast to [[S
at
com.sun.media.jai.opimage.BandMergeOpImage.shortLoop(BandMergeOpImage.java:346)
at
com.sun.media.jai.opimage.BandMergeOpImage.computeRect(BandMergeOpImage.java:204)
at javax.media.jai.PointOpImage.computeTile(PointOpImage.java:914)
at
com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at javax.media.jai.PlanarImage.copyData(PlanarImage.java:2343)
at javax.media.jai.PlanarImage.copyExtendedData(PlanarImage.java:2398)
at javax.media.jai.PlanarImage.getExtendedData(PlanarImage.java:2459)
at
com.sun.media.jai.opimage.MosaicOpImage.computeTile(MosaicOpImage.java:432)
>From OpenLayer previewer:
Request: getMap
Buffer = 0
Format = image/jpeg
Filter = null
Filters = null
Width = 502
Height = 512
ViewParams = null
Crs = PROJCS["WGS 84 / UTM zone 11N",
GEOGCS["WGS 84",
DATUM["World Geodetic System 1984",
SPHEROID["WGS 84", 6378137.0, 298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4326"]],
PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]],
PARAMETER["central_meridian", -117.0],
PARAMETER["latitude_of_origin", 0.0],
PARAMETER["scale_factor", 0.9996],
PARAMETER["false_easting", 500000.0],
PARAMETER["false_northing", 0.0],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH],
AUTHORITY["EPSG","32611"]]
Bbox = ReferencedEnvelope[1796.3671875 : 471303.6328125, 3593670.0 :
4072530.0]
Elevation = []
Angle = 0.0
BgColor = java.awt.Color[r=255,g=255,b=255]
Transparent = false
StartIndex = null
FormatOptions = {}
RemoteOwsType = null
RemoteOwsURL = null
SldBody = null
ValidateSchema = false
Sld = null
CQLFilter = null
FeatureId = null
SldVersion = null
Tiled = false
Palette = null
FeatureVersion = null
SRS = EPSG:32611
Styles = [StyleImpl[ name=raster]]
Layers = [org.geoserver.wms.MapLayerInfo@3aad70ed]
MaxFeatures = null
TilesOrigin = null
Env = {}
Exceptions = SE_XML
Time = []
Version = 1.1.1
Request = GetMap
BaseUrl = http://localhost:8080/geoserver/
Get = true
RawKvp = {BBOX=1796.3671875,3593670,471303.6328125,4072530,
VERSION=1.1.1,
FORMAT=image/jpeg, SERVICE=WMS, HEIGHT=512,
LAYERS=geotiff:LC80420362014047LGN00_B10, REQUEST=GetMap, STYLES=,
SRS=EPSG:32611, WIDTH=502}
RequestCharset = UTF-8
Below is the image info output from gdalinfo:
vriuser@vriuser-VirtualBox:/archive/maps/landsat$ gdalinfo
LC80420362014047LGN00_B10.TIF
gdalinfo: /home/gdal-libraries/libgdal.so.1: no version information
available (required by gdalinfo)
Driver: GTiff/GeoTIFF
Files: LC80420362014047LGN00_B10.TIF
Size is 7831, 7981
Coordinate System is:
PROJCS["WGS 84 / UTM zone 11N",
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",-117],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","32611"]]
Origin = (119085.000000000000000,3952815.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)
Metadata:
AREA_OR_POINT=Point
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 119085.000, 3952815.000) (121d12'23.17"W, 35d38'44.69"N)
Lower Left ( 119085.000, 3713385.000) (121d 5'57.02"W, 33d29'32.04"N)
Upper Right ( 354015.000, 3952815.000) (118d36'49.58"W, 35d42'30.51"N)
Lower Right ( 354015.000, 3713385.000) (118d34'20.99"W, 33d33' 0.49"N)
Center ( 236550.000, 3833100.000) (119d52'22.56"W, 34d36'21.46"N)
Band 1 Block=7831x1 Type=UInt16, ColorInterp=Gray
I also attached the screenshot of the layer information.
Can anyone tell me what was wrong? Why I got ClassCastException with my
viewer? Let me know if you need more information. I am not sure if I can
upload the image file since it is about 125 MB. Let me know if you need the
image.
<http://osgeo-org.1560.x6.nabble.com/file/n5106677/screenshot.jpg>
Many thanks in advance.
Regards,
Tam
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Got-ClassCastException-rendering-Landsat-GeoTIFF-image-tp5106677.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users