deegree3
deegree3 copied to clipboard
MultiSurface geometries produces Exception
As mentioned in https://sourceforge.net/p/deegree/mailman/message/35957186/ there seems to be a problem when serving MultiSuface geometries that are stored in a PostGIS database. This results in a ServiceException with following message: Unknown WKB type 12
The INSPIRE application schema for hydrography physical waters contains the FeatureType Shore, which requires a geometry of MultiSurfacePropertyType. So we stored the geometries as MultiSurface in PostGIS. Storing the geometries as MultiPolygon doesn't work as the GML contains MultiPolygon geometries, which in turn isn't valid against the schema.
I browsed some source code of deegree and it seems that MultiSurfaces are genarally supported. But I couldn't find a way to produce a schema valid GML.
We are using deegree 3.4-RC3 and PostGIS 2.1.3.
Is the issue reproducible with the workspace available at https://github.com/de-bkg/deegree-workspace-dlm250-inspire ?
In that workspace we experienced the the issues. But it's getting something weird. We switched back storing the geometries in PostGIS as multi polygon. Unfortunately or better luckily the issue was gone and deegree returns now MultiSurface as expected by the data model.
So currently we're not sure what was the root cause. Nevertheless deegree can't handle (multi) surface PostGIS-Geometries. This should be easy to reproduce using the FeatureType Mapping of hy:Shore and simulating data.
@DirkThalheim Can you provide some testdata?
You can use the workspace https://github.com/de-bkg/deegree-workspace-dlm250-inspire to reproduce the issue.
Setup the database with https://github.com/de-bkg/deegree-workspace-dlm250-inspire/blob/master/_sql/setup_hypw.sql and add following testdata:
CREATE TABLE hypw.shore_test
(
localid text NOT NULL,
composition_nilreason text,
composition_nil boolean,
composition_fk text,
composition_href text,
delineationknown boolean,
delineationknown_nilreason text,
delineationknown_nil boolean,
beginlifespanversion timestamp without time zone,
geometry geometry(Geometry,4258),
CONSTRAINT shore_test_pkey PRIMARY KEY (localid)
) WITH ( OIDS=FALSE );
INSERT INTO hypw.shore_test (localid, geometry) VALUES ('1', ST_GeomFromText('SRID=4258;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(0 0, 4 0, 4 4, 0 4, 0 0),(1 1, 3 3, 3 1, 1 1)),((10 10, 14 12, 11 10, 10 10),(11 11, 11.5 11, 11 11.5, 11 11)))'));
Adjust the FeatureTypeMapping of hy-p:Shore to <FeatureTypeMapping name="hy-p:Shore" table="hypw.shore_test">
Request the service with: wfs_dlm250?service=WFS&request=GetFeature&VERSION=2.0.0&TYPENAMES=hy-p:Shore&COUNT=1