[Geoserver-users] Cannot publish layer from ImageMosaicJDBC store

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 [ ]>

&mapping;

&connect;

pgraster.connect.xml.inc:

pgraster.mapping.xml.inc:

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]


Hi Philippe,

Nope, the result is the same (I tried with both capitalized and lowercased column names); anyway these column names go all in some SQL queries and table names are not case sensitive (afaik) in PostgreSQL… In a 1st approach, I thought the issue is somehow the result of the 32bits values in the raster… but no, the original GeoTIFF raster is well published by the same GeoServer as a simple, static GeoTIFF layer as disk file…

By the way:

· I also tried the ImageMosaic (TimeSeries, i.e. GeoTIFF file on disk) following the GeoServer tutorial, with the same GeoTIFF: the Store is well created without errors, but when I try to add a new layer from this store the GUI doesn’t display any item in the layers list…

· I was able to publish on QGIS the raster layer from the same PostGIS layer which fails with GeoServer…

Actually it is pretty frustrating to get just a “division by zero” java error from the “ImageMosaicJDBCReader”; I think all one could do in such a case is to open the code source of this extension…

Thanks,

Victor

From: GrandNord [mailto:grandnord4reg@…84…]
Sent: mardi 13 janvier 2015 16:23
To: victor sinceac
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Cannot publish layer from ImageMosaicJDBC store

Victor,

I’ve been working with various settings in a setting similar to yours ( PG9.3, GeoServer 2.6.1 on CentOS).

I have had success with both multi and and single band GeoTiff sources. In all cases I had upgraded the PG JDBC driver to the latest 9.3. I did not have to set bytea_output.

Looking through your files, it looks like there might be an issue with the tileTableNameAttribute in your coverage definition XML file: it is spelled “TileTable” in there, but appears to be inserted as “tiletable” ( all lower case ) in your mosaic table. Depending on your PG setup, this might be an issue, which I encountered once.

Hopefully it really is that simple. Let me know if it isn’t and I’ll take another look.

Philippe

On Jan 10, 2015, at 09:46, victor sinceac <Victor.Sinceac@…5188…> wrote:

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 [ ]>

&mapping;

&connect;

pgraster.connect.xml.inc:

pgraster.mapping.xml.inc:

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

No, the rasters are stored in Postgis tables.

A 2nd study of the debug logs (see below) shows something strange:

DEBUG [imagemosaic.jdbc] - Reading mosaic from insat3a

DEBUG [imagemosaic.jdbc] - Highest res 0.1171875 -0.1171875

DEBUG [imagemosaic.jdbc] - Creating mosaic to comply with envelope GeneralEnvelope[(33.5, -60.0), (34.0859375, 60.0)]

While the mosaic metadata table contains:

select name, tiletable, minx, miny, maxx, maxy from mosaic;

name; tiletable; minx; miny; maxx; maxy

insat3a; raster_hdf5; 33.5; -60; 153.5; 60

insat3a; o_5_raster_hdf5; 33.5; -60; 153.5; 60

A direct query in the raster table returns also correct envelope for each raster tile (the original, unique geotiff is 1024x1024 and is tiled in 512x512 on upload):

SELECT ST_AsText((ST_Envelope(rast))) FROM raster_hdf5;

“POLYGON((33.5 0, 33.5 60, 93.5 60, 93.5 0, 33.5 0))”

“POLYGON((93.5 0, 93.5 60, 153.5 60, 153.5 0, 93.5 0))”

“POLYGON((33.5 -60, 33.5 0, 93.5 0, 93.5 -60, 33.5 -60))”

“POLYGON((93.5 -60, 93.5 0, 153.5 0, 153.5 -60, 93.5 -60))”

Thus I wonder how is computed the GeneralEnvelope value of xmax=34.0859375 < xmin (instead 153.5 as provided).

max>xmin is obviously wrong and SHALL anyway generate errors (maybe more explicit than “/ by zero” ;o)

But I still cannot understand where GeoServer got the wrong xmax value from…

Victor

From: GrandNord [mailto:grandnord4reg@…84…]
Sent: mercredi 14 janvier 2015 00:45
To: victor sinceac
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Cannot publish layer from ImageMosaicJDBC store

Are you storing the rasters as out-db? I am wrestling with issues of my own in that situation.

NB: default install of PG is most definitely case sensitive. You need to change some settings to make it otherwise.

Philippe

On Jan 13, 2015, at 12:59, victor sinceac <Victor.Sinceac@…5188…> wrote:

Hi Philippe,

Nope, the result is the same (I tried with both capitalized and lowercased column names); anyway these column names go all in some SQL queries and table names are not case sensitive (afaik) in PostgreSQL… In a 1st approach, I thought the issue is somehow the result of the 32bits values in the raster… but no, the original GeoTIFF raster is well published by the same GeoServer as a simple, static GeoTIFF layer as disk file…

By the way:

· I also tried the ImageMosaic (TimeSeries, i.e. GeoTIFF file on disk) following the GeoServer tutorial, with the same GeoTIFF: the Store is well created without errors, but when I try to add a new layer from this store the GUI doesn’t display any item in the layers list…

· I was able to publish on QGIS the raster layer from the same PostGIS layer which fails with GeoServer…

Actually it is pretty frustrating to get just a “division by zero” java error from the “ImageMosaicJDBCReader”; I think all one could do in such a case is to open the code source of this extension…

Thanks,

Victor

From: GrandNord [mailto:grandnord4reg@…84…]
Sent: mardi 13 janvier 2015 16:23
To: victor sinceac
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Cannot publish layer from ImageMosaicJDBC store

Victor,

I’ve been working with various settings in a setting similar to yours ( PG9.3, GeoServer 2.6.1 on CentOS).

I have had success with both multi and and single band GeoTiff sources. In all cases I had upgraded the PG JDBC driver to the latest 9.3. I did not have to set bytea_output.

Looking through your files, it looks like there might be an issue with the tileTableNameAttribute in your coverage definition XML file: it is spelled “TileTable” in there, but appears to be inserted as “tiletable” ( all lower case ) in your mosaic table. Depending on your PG setup, this might be an issue, which I encountered once.

Hopefully it really is that simple. Let me know if it isn’t and I’ll take another look.

Philippe

On Jan 10, 2015, at 09:46, victor sinceac <Victor.Sinceac@…5188…> wrote:

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 area; 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 [ ]>

&mapping;

&connect;

pgraster.connect.xml.inc:

pgraster.mapping.xml.inc:

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