Dear list.
I’m using GeoServer 2.5.1 and get the following message when I want to display a layer group in KML format: “java.lang.NullPointerException: Unable to transform referenced envelope, crs has not yet been provided”.
However, forcing GeoServer to automatically compute the bounding box of one of the underlying layer before resetting the bounding box to its original value seems to solve the problems.
Here is the situation when the bug occurs:
1: the first layer, “watermark_world” is a vector layer (polygon), coming from PostGIS, whose extent is “ -180,-90,180,90”. It is in EPSG:4326
2: the second layer “of the group is a geotiff layer called “image” with bbox “0,0,2,2” . Its CRS is also EPSG:4326
3: I publish the vector layer “watermark_world” under a new name “watermark_image1” with the same bounding box as “image1”.
4: I create a layer group gathering “image1” and “watermark_image1” together, having the same bounding box as ”image 1”
Problem 1: the BoudingBox can be displayed in OpenLayers, but not in KML. Error message: “"java.lang.NullPointerException: Unable to transform referenced envelope, crs has not yet been provided”
Problem 2: the same error message appears when trying to compute automatically the bounding box of the group
The following workaround solution actually fixes the bug:
Work around 1: The problem is solved by editing the bounding box of “watermark_image1” layer by clicking on “Compute from data” and “Compute from native bounds” (it then displays “ -180,-90,180,90”) and resetting the bounding box field to its original values.
Work around 2: The same trick applies when creating “watermark_image1” . It solve the problem when groups are generated via the REST interface.
Maybe this problem could be investigated further?
Best regards,
Franck
Franck Theeten
Database Manager
ICT
Royal Museum for Central Africa
3080 Tervuren
Belgium
0032/2/769-56-24