From 413762559e97bbfabbecf9d1d804dc041eed62d8 Mon Sep 17 00:00:00 2001 From: Lyn Elisa Goltz Date: Wed, 26 Jul 2023 08:20:36 +0200 Subject: [PATCH 1/2] #1548 - use targed gml namespace if boundedBy/geometry is in gml namespace --- .../main/java/org/deegree/gml/feature/GMLFeatureWriter.java | 4 +++- .../java/org/deegree/gml/geometry/GML3GeometryWriter.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/feature/GMLFeatureWriter.java b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/feature/GMLFeatureWriter.java index 9106377dc9..2bdc28cc1b 100644 --- a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/feature/GMLFeatureWriter.java +++ b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/feature/GMLFeatureWriter.java @@ -371,7 +371,9 @@ else if (pt instanceof EnvelopePropertyType) { writeNilledElement(propName, attributes); } else { - writeStartElementWithNS(propName.getNamespaceURI(), propName.getLocalPart()); + String namespaceURI = GMLSchemaInfoSet.isGMLNamespace(propName.getNamespaceURI()) ? gmlNs + : propName.getNamespaceURI(); + writeStartElementWithNS(namespaceURI, propName.getLocalPart()); if (value != null) { gmlStreamWriter.getGeometryWriter().exportEnvelope((Envelope) value); } diff --git a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/geometry/GML3GeometryWriter.java b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/geometry/GML3GeometryWriter.java index ad10a65128..89ae7781ce 100644 --- a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/geometry/GML3GeometryWriter.java +++ b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/geometry/GML3GeometryWriter.java @@ -119,6 +119,7 @@ import org.deegree.geometry.standard.curvesegments.AffinePlacement; import org.deegree.gml.GMLStreamWriter; import org.deegree.gml.commons.AbstractGMLObjectWriter; +import org.deegree.gml.schema.GMLSchemaInfoSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -1533,7 +1534,7 @@ private void startGeometry(String localName, Geometry geometry) throws XMLStreamException, UnknownCRSException, TransformationException { GMLObjectType gmlType = geometry.getType(); - if (gmlType == null) { + if (gmlType == null || GMLSchemaInfoSet.isGMLNamespace(gmlType.getName().getNamespaceURI())) { writeStartElementWithNS(gmlNs, localName); } else { From 4f754125c951f11557d68383a7e3a0f3cdf2719f Mon Sep 17 00:00:00 2001 From: Lyn Elisa Goltz Date: Thu, 30 Nov 2023 12:58:14 +0100 Subject: [PATCH 2/2] #1548 - enhanced documentation, added hint not mixing gml versions in blob mode --- .../src/main/asciidoc/featurestores.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deegree-services/deegree-webservices-handbook/src/main/asciidoc/featurestores.adoc b/deegree-services/deegree-webservices-handbook/src/main/asciidoc/featurestores.adoc index 000371bf99..ca19fbf0a4 100644 --- a/deegree-services/deegree-webservices-handbook/src/main/asciidoc/featurestores.adoc +++ b/deegree-services/deegree-webservices-handbook/src/main/asciidoc/featurestores.adoc @@ -1653,6 +1653,8 @@ NOTE: In BLOB mode, only spatial and feature id queries can be mapped to SQL WHERE-constraints. All other kinds of filter conditions are performed in memory. See <> for more information. +IMPORTANT: It is not recommended to mix GML versions in BLOB mode: The GML versions supported by WFS should be limited to the GML version of the features in the FeatureStore. Currently it cannot be ensured, that geometries transformed to another GML version are valid against the schema. + ==== Transactions and feature id generation The mapping defined by a __ element generally