Sunday, 26 August 2018

geoserver - Map Preview Not Displaying until Zoom


When I try to view an Image Mosaic Layer with this URL


http://:/geoserver/sde/wms?service=WMS&version=1.1.0&request=GetMap&layers=sde:postgis_rasters&styles=&bbox=-130.122893538754,20.1788770013997,-60.8601260210627,52.8168963842564&width=768&height=361&srs=EPSG:4269&format=application/openlayers#toggle

The raster doesn't show: enter image description here


When I change Tiling to "Tiled", I get the first row of tiles: enter image description here


But if I zoom in or out (doesn't matter if Tiling is "Single" or "Tiled") the full raster displays: enter image description here


How can I get the raster to show up completely without zooming in or out? This doesn't happen when I add individual geotiffs, only when I used Image Mosaic.


EDIT - geoserver.log shows the following error when I hit the above url corresponding to the first blank screen shot:



2015-11-25 11:16:46,173 INFO [geoserver.wms] -
Request: getServiceInfo
2015-11-25 11:16:46,184 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the fast path
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:345)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:260)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:132)
at org.geoserver.wms.GetMap.executeInternal(GetMap.java:504)
at org.geoserver.wms.GetMap.run(GetMap.java:248)
at org.geoserver.wms.GetMap.run(GetMap.java:119)

at org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:320)
at sun.reflect.GeneratedMethodAccessor315.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.geoserver.kml.WebMapServiceKmlInterceptor.invoke(WebMapServiceKmlInterceptor.java:34)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.geoserver.gwc.wms.CacheSeedingWebMapService.invoke(CacheSeedingWebMapService.java:62)

....
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.geoserver.platform.ServiceException: java.lang.ArrayIndexOutOfBoundsException: 8 >= 8

at org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:1054)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:343)
... 117 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 8 >= 8
at java.util.Vector.elementAt(Vector.java:470)
at java.awt.image.renderable.ParameterBlock.getObjectParameter(ParameterBlock.java:549)
at org.geotools.image.ImageWorker.affine(ImageWorker.java:4083)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.affine(GridCoverageRenderer.java:636)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.symbolize(GridCoverageRenderer.java:452)
at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:948)

at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:765)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:947)
... 118 more

Here is gdalinfo on one of the tifs in the mosaic they should all be pretty much the same as it's a timeseries:


Driver: GTiff/GeoTIFF
Files: lilac_leaf_prism_19861231.tif
Size is 1405, 621
Coordinate System is:
GEOGCS["NAD83",

DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010002,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4269"]]
Origin = (-125.020833333333329,49.937500000002032)
Pixel Size = (0.041666666666670,-0.041666666666670)

Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left (-125.0208333, 49.9375000) (125d 1'15.00"W, 49d56'15.00"N)
Lower Left (-125.0208333, 24.0625000) (125d 1'15.00"W, 24d 3'45.00"N)
Upper Right ( -66.4791667, 49.9375000) ( 66d28'45.00"W, 49d56'15.00"N)
Lower Right ( -66.4791667, 24.0625000) ( 66d28'45.00"W, 24d 3'45.00"N)
Center ( -95.7500000, 37.0000000) ( 95d45' 0.00"W, 37d 0' 0.00"N)

Band 1 Block=1405x2 Type=Int16, ColorInterp=Gray
NoData Value=-9999

EDIT: I recently found that the problem only occurs when the width and height is set smaller than 1405 x 621 which is the number of pixels in the raster. For instance, &width=768&height=361 exhibits the above symptoms, but &width=1500&height=700 doesn't.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...