Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid GML geometry if server locale is DE #37

Closed
lgoltz opened this issue Jun 20, 2016 · 2 comments
Closed

Invalid GML geometry if server locale is DE #37

lgoltz opened this issue Jun 20, 2016 · 2 comments
Assignees
Labels

Comments

@lgoltz
Copy link
Contributor

lgoltz commented Jun 20, 2016

If the locale of the server running the teamengine is DE some tests failes due to invalid GML geometries:

Here an example request from the test intersectsPolygon:

<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" service="WFS" startIndex="0" version="2.0.0">
  <wfs:Query xmlns:ns53="http://www.deegree.org/app" typeNames="ns53:osm_protected_area">
    <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">
      <fes:Intersects>
        <fes:ValueReference xmlns:tns="http://www.deegree.org/app">tns:geometry</fes:ValueReference>
        <gml:Polygon xmlns:gml="http://www.opengis.net/gml/3.2" gml:id="d1e1" srsName="urn:ogc:def:crs:EPSG::4326">
          <gml:exterior>
            <gml:LinearRing>
              <gml:posList>63,39 -24,04 63,39 -13,62 66,46 -13,62 66,46 -24,04 63,39 -24,04</gml:posList>
            </gml:LinearRing>
          </gml:exterior>
        </gml:Polygon>
      </fes:Intersects>
    </fes:Filter>
  </wfs:Query>
</wfs:GetFeature>

The gml:posLists contains a list of coordinates with commas instead of of points.

The following tests are concerned:

  • bboxWithDefaultExtent
  • invalidGeometryOperand
  • nonSpecificBBOX
  • intersectsPolygon

All of them creates the geometry node by Extents.envelopeAsGML():

Document gmlEnv = Extents.envelopeAsGML(featureInfo.get(featureType)
                .getGeoExtent());

This is part of geomatics-geotk [1].

As workaround the server locale can be set to EN, but it is preferred to fix this.

[1] https://github.com/opengeospatial/geomatics-geotk/blob/master/src/main/java/org/opengis/cite/geomatics/Extents.java

@dstenger dstenger added the bug label Jun 20, 2016
@bermud bermud changed the title Invalid GML geometry if server locale is DE Invalid GML geometry if server locale is DE Jul 13, 2016
@rjmartell
Copy link
Contributor

rjmartell commented Nov 10, 2016

The org.opengis.geometry.Envelope is created by the DataSampler from geometry elements in the data sample (Extents::calculateEnvelope); these are ok. But java.text.DecimalFormat is locale-sensitive so this is probably the source of the error.

@rjmartell
Copy link
Contributor

Fixed in geomatics-geotk-1.14. Format decimal values using Locale.ROOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants