Skip to content

Commit

Permalink
Merge pull request deegree#1550 from lat-lon/fixUnboundGmlNamespace-1548
Browse files Browse the repository at this point in the history
Use targed gml namespace if boundedBy/geometry is in gml namespace
  • Loading branch information
stephanr authored Nov 30, 2023
2 parents c424244 + 4f75412 commit 0539679
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<anchor-filtering>> 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 _<FeatureTypeMapping>_ element generally
Expand Down

0 comments on commit 0539679

Please sign in to comment.