Hi again,
Adding more details after extra tries (with same unsuccessful result):
- Tried with different input GeoTIFF: single GeoTIFF, 2 or more
GeoTIFF of same coverage and different content, single or multi-band, etc.
- Tried to replace the native PG8.4jdbc driver of GeoServer with
latest PG9.3jdbc41 driver
- Tried also “ALTER DATABASE name SET bytea_output TO ‘escape’”
- The same PostGIS raster can be well published/viewed on QGIS desktop
client
Thanks,
Victor
From: victor sinceac
Sent: jeudi 8 janvier 2015 16:07
To: 'geoserver-users@lists.sourceforge.net'
Subject: Cannot publish layer from ImageMosaicJDBC store
Hi group,
I tried to follow the manual “Mastering GeoServer” in order to serve raster
tiles from a Postgis raster table.
I was able to create a store of type ImageMosaicJDBC on GeoServer from PostGIS
raster.
The corresponding layer is well listed for the created store.
But when I click the Publish button, the GeoServer raises errors on the GUI
(i.e. all the log lines beginning from the following line - see full GeoServer
logs below).
2015-01-08 14:46:46,542 ERROR [wicket.RequestCycle] - Error occurred while
building the resources for the configuration page
Does someone found the same behavior, or well could someone help ?
Full details below.
GeoServer 2.6.1 on CentOS/PostGres9.3+PostGIS2.1 on Win8
Many Thanks,
Victor
----------------------------------------------------------------------------------------------------
The GeoTIFF rasters loaded in PostGIS have from 1 to 3 bands encoded as
float32b, in PPSG:4326 and cover all the same are; E.g.:
> gdalinfo INSAT-3A_4326_IR_1024x1024x16f.tif
Driver: GTiff/GeoTIFF
Files: INSAT-3A_4326_IR_1024x1024x16f.tif
Size is 1024, 1024
Coordinate System is:
GEOGCS["WGS 84", DATUM["Not_specified_based_on_WGS_84_ellipsoid", SPHEROID["WGS
84",6378137,298.257223563, AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6030"]], PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]]
Origin = (33.500000000000000,60.000000000000000)
Pixel Size = (0.117187500000000,-0.117187500000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_DATETIME=2013:07:01 00:00:00
TIFFTAG_DOCUMENTNAME=INSAT-3A : 2013:07:01 00:00:00
TIFFTAG_IMAGEDESCRIPTION=INSAT-3A Visible (Albedo), Infra-Red (┬░C),
Water-Vapor (┬░C)
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 33.5000000, 60.0000000) ( 33d30' 0.00"E, 60d 0' 0.00"N)
Lower Left ( 33.5000000, -60.0000000) ( 33d30' 0.00"E, 60d 0' 0.00"S)
Upper Right ( 153.5000000, 60.0000000) (153d30' 0.00"E, 60d 0' 0.00"N)
Lower Right ( 153.5000000, -60.0000000) (153d30' 0.00"E, 60d 0' 0.00"S)
Center ( 93.5000000, 0.0000000) ( 93d30' 0.00"E, 0d 0' 0.01"N)
Band 1 Block=1024x2 Type=Float32, ColorInterp=Gray
I loaded all the rasters with scripts generated with raster2pgsql:
> raster2pgsql -t 512x512 -s 4326 -d -F -l 5 -I -M blabla.tif raster_hdf5 >
> blabla.sql
The raster pixels have well the right, expected values and positions:
I then created the metadata tables:
CREATE TABLE mosaic (NAME varchar(254) not null, TileTable varchar(254)not
null, minX FLOAT8,minY FLOAT8, maxX FLOAT8, maxY FLOAT8, resX FLOAT8, resY
FLOAT8, primary key (NAME,TileTable));
INSERT INTO mosaic(name, tiletable, maxx, maxy, minx, miny, resx, resy) VALUES
('insat3a', 'raster_hdf5', 153.5, 60.0, 33.5, -60.0, 0.1171875,-0.1171875);
INSERT INTO mosaic(name, tiletable, maxx, maxy, minx, miny, resx, resy) VALUES
('insat3a', 'o_5_raster_hdf5', 153.5, 60.0, 33.5, -60.0, 0.5859375,-0.5859375);
I then created the xml files for the raster store:
hdf5.pgraster.xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE ImageMosaicJDBCConfig [
<!ENTITY mapping PUBLIC "mapping" "pgraster.mapping.xml.inc">
<!ENTITY connect PUBLIC "connect" "pgraster.connect.xml.inc">]>
<config version="1.0">
<coverageName name="insat3a"/>
<coordsys name="EPSG:4326"/>
<!-- interpolation 1 = nearest neighbour, 2 = bilinear, 3 = bicubic -->
<scaleop interpolation="1"/>
<verify cardinality="false"/>
&mapping;
&connect;
</config>
pgraster.connect.xml.inc:
<connect>
<!-- value DBCP or JNDI -->
<dstype value="DBCP"/>
<!-- <jndiReferenceName value=""/> -->
<username value="..." />
<password value="..." />
<jdbcUrl value="jdbc:postgresql:...." />
<driverClassName value="org.postgresql.Driver"/>
<maxActive value="10"/>
<maxIdle value="0"/>
</connect>
pgraster.mapping.xml.inc:
<spatialExtension name="pgraster"/>
<mapping>
<masterTable name="mosaic" >
<coverageNameAttribute name="name"/>
<maxXAttribute name="maxX"/>
<maxYAttribute name="maxY"/>
<minXAttribute name="minX"/>
<minYAttribute name="minY"/>
<resXAttribute name="resX"/>
<resYAttribute name="resY"/>
<tileTableNameAtribute name="TileTable" />
</masterTable>
<tileTable>
<blobAttributeName name="rast" />
</tileTable>
</mapping>
A priori GeoServer retrieves well the mosaic proprieties from PostGIS (see
coverage, projection in full logs below).
Full GeoServer logs are as follows:
2015-01-08 14:46:46,538 DEBUG [jdbc.custom] - getNumOverviews Method
2015-01-08 14:46:46,538 DEBUG [jdbc.custom] - getLevelInfo Method
2015-01-08 14:46:46,538 DEBUG [jdbc.custom] - getLevelInfo Method
2015-01-08 14:46:46,538 DEBUG [jdbc.custom] - getNumOverviews Method
2015-01-08 14:46:46,538 DEBUG [jdbc.custom] - getLevelInfo Method
2015-01-08 14:46:46,539 DEBUG [util.CoverageUtils] - Zero length string
java.lang.NumberFormatException: Zero length string
at java.lang.Integer.decode(Integer.java:949)
at java.awt.Color.decode(Color.java:729)
at
org.geoserver.data.util.CoverageUtils.getCvParamValue(CoverageUtils.java:335)
at
org.geoserver.data.util.CoverageUtils.getParameters(CoverageUtils.java:127)
at
org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:968)
at
org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:856)
at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:320)
at
org.geoserver.web.data.layer.NewLayerPage$7.onClick(NewLayerPage.java:261)
[....]
2015-01-08 14:46:46,540 DEBUG [geotools.util] - CRSConverterFactory can be
applied from Strings to CRS only.
2015-01-08 14:46:46,540 DEBUG [geotools.util] - InterpolationConverterFactory
can be applied from Strings to Interpolation only.
2015-01-08 14:46:46,540 DEBUG [util.CoverageUtils] - Failed to convert to
java.awt.Color
java.lang.RuntimeException: Failed to convert to java.awt.Color
at
org.geoserver.data.util.CoverageUtils.getCvParamValue(CoverageUtils.java:374)
at
org.geoserver.data.util.CoverageUtils.getParameters(CoverageUtils.java:127)
at
org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:968)
at
org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:856)
at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:320)
at
org.geoserver.web.data.layer.NewLayerPage$7.onClick(NewLayerPage.java:261)
[...]
2015-01-08 14:46:46,540 INFO [imagemosaic.jdbc] - ----PARAMS START-------
2015-01-08 14:46:46,541 INFO [imagemosaic.jdbc] - ReadGridGeometry2D:
GridGeometry2D[GridEnvelope2D[0..4, 0..-1025], PARAM_MT["Affine",
PARAMETER["num_row", 3],
PARAMETER["num_col", 3],
PARAMETER["elt_0_0", 0.1171875],
PARAMETER["elt_0_2", 33.55859375],
PARAMETER["elt_1_1", 0.1171875],
PARAMETER["elt_1_2", 60.05859375]]]
2015-01-08 14:46:46,541 INFO [imagemosaic.jdbc] - OutputTransparentColor: null
2015-01-08 14:46:46,541 INFO [imagemosaic.jdbc] - BackgroundColor: null
2015-01-08 14:46:46,541 INFO [imagemosaic.jdbc] - ----PARAMS END-------
2015-01-08 14:46:46,541 DEBUG [imagemosaic.jdbc] - Reading mosaic from insat3a
2015-01-08 14:46:46,541 DEBUG [imagemosaic.jdbc] - Highest res 0.1171875
-0.1171875
2015-01-08 14:46:46,541 DEBUG [imagemosaic.jdbc] - Creating mosaic to comply
with envelope GeneralEnvelope[(33.5, -60.0), (34.0859375, 60.0)] crs
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"]] dim java.awt.Rectangle[x=0,y=0,width=5,height=-1024]
2015-01-08 14:46:46,542 ERROR [wicket.RequestCycle] - Error occurred while
building the resources for the configuration page
java.lang.RuntimeException: Error occurred while building the resources for the
configuration page
at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:330)
at
org.geoserver.web.data.layer.NewLayerPage$7.onClick(NewLayerPage.java:261)
at
org.geoserver.web.wicket.SimpleAjaxLink$1.onClick(SimpleAjaxLink.java:46)
[....]
Caused by: java.lang.ArithmeticException: / by zero
at
org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.decimationOnReadingControl(AbstractGridCoverage2DReader.java:639)
at
org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.setReadParams(AbstractGridCoverage2DReader.java:389)
at
org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.setReadParams(AbstractGridCoverage2DReader.java:300)
at
org.geotools.gce.imagemosaic.jdbc.ImageMosaicJDBCReader.loadTiles(ImageMosaicJDBCReader.java:439)
at
org.geotools.gce.imagemosaic.jdbc.ImageMosaicJDBCReader.read(ImageMosaicJDBCReader.java:316)
at
org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.read(AbstractGridCoverage2DReader.java:241)
at
org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:227)
at
org.geoserver.catalog.SingleGridCoverage2DReader.read(SingleGridCoverage2DReader.java:141)
at
org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:968)
at
org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:856)
at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:320)
... 107 more
2015-01-08 14:46:46,543 DEBUG [wicket.MarkupContainer] - Add faviconLink to
[Page class = org.geoserver.web.GeoServerErrorPage, id = 34, version = 0]
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users