[Geoserver-users] Error when publishing a layer of store type GeoPackage

Greeting Everyone,

I am using the GeoServer with GeoNode implementation using Docker.
I was trying to publish a layer from a GeoPackage Store type and when i click on Compute from data or save the layer i get this error message

aused by: java.io.IOException: Error occured calculating bounds for City_Boundary
    at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1305)
    at org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:508)
    ... 134 more
Caused by: java.io.IOException: org.locationtech.jts.io.ParseException: Unknown WKB type 12
    at org.geotools.geopkg.geom.GeoPkgGeomReader.read(GeoPkgGeomReader.java:175)
    at org.geotools.geopkg.geom.GeoPkgGeomReader.get(GeoPkgGeomReader.java:108)
    at org.geotools.geopkg.GeoPkgDialect.geometry(GeoPkgDialect.java:184)
    at org.geotools.geopkg.GeoPkgDialect.geometry(GeoPkgDialect.java:188)
    at org.geotools.geopkg.GeoPkgDialect.decodeGeometryEnvelope(GeoPkgDialect.java:132)
    at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1291)
    ... 135 more
Caused by: org.locationtech.jts.io.ParseException: Unknown WKB type 12
    at org.locationtech.jts.io.WKBReader.readGeometry(WKBReader.java:235)
    at org.locationtech.jts.io.WKBReader.read(WKBReader.java:156)
    at org.geotools.geopkg.geom.GeoPkgGeomReader.read(GeoPkgGeomReader.java:171)
    ... 140 more

Can someone guide me on how to debug this issue ?

``

Hi Mohammed,

I think it doesn’t like the coordinates you have in your data layer.

You may be able to get it to work by declaring the coordinate system and “compute from SRS bounds” rather than “compute from data”.

Or you fix whatever is wrong with the geopackage.

Maybe you have multisurfaces or similar per http://osgeo-org.1560.x6.nabble.com/MultiSurface-td5328628.html

Cheers.

···

From: Mohammed Alnajdi <mohdnagfy@…84…>
Sent: Thursday, 22 October 2020 5:38 AM
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] Fwd: Error when publishing a layer of store type GeoPackage

Greeting Everyone,

I am using the GeoServer with GeoNode implementation using Docker.

I was trying to publish a layer from a GeoPackage Store type and when i click on Compute from data or save the layer i get this error message

aused by: java.io.IOException: Error occured calculating bounds for City_Boundary
    at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1305)
    at org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:508)
    ... 134 more
Caused by: java.io.IOException: org.locationtech.jts.io.ParseException: Unknown WKB type 12
    at org.geotools.geopkg.geom.GeoPkgGeomReader.read(GeoPkgGeomReader.java:175)
    at org.geotools.geopkg.geom.GeoPkgGeomReader.get(GeoPkgGeomReader.java:108)
    at org.geotools.geopkg.GeoPkgDialect.geometry(GeoPkgDialect.java:184)
    at org.geotools.geopkg.GeoPkgDialect.geometry(GeoPkgDialect.java:188)
    at org.geotools.geopkg.GeoPkgDialect.decodeGeometryEnvelope(GeoPkgDialect.java:132)
    at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1291)
    ... 135 more
Caused by: org.locationtech.jts.io.ParseException: Unknown WKB type 12
    at org.locationtech.jts.io.WKBReader.readGeometry(WKBReader.java:235)
    at org.locationtech.jts.io.WKBReader.read(WKBReader.java:156)
    at org.geotools.geopkg.geom.GeoPkgGeomReader.read(GeoPkgGeomReader.java:171)
    ... 140 more
Can someone guide me on how to debug this issue ?

It seems that your data contains MultiCurves (WKB Type 12) which are not currently supported by JTS which is the underlying library used by GeoServer to parse the data in a GeoPackage. It’s possible that you can rewrite the data as a simpler linestring if you want to work around this or you can look into adding support for a wider range of geometry types in JTS and GeoTools which would feed into GeoServer.

Ian

···

Ian Turton