GeoServer
  1. GeoServer
  2. GEOS-4072

GMLPPIO does not encode the geometries SRS

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.x
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      For some reason the GML output is completely missing the SRS in the geometry properties.
      I'm sure the srs is properly declared in the collections to be encoded at the schema level, but missing at the geometry userdata level (which should not be required, either, that has never been a supported convention)

      What's odd is that the gml2 and gml3 outputs straight from the WFS contain the srs, even when the collection comes straight out of a shapefile (another source that does not put the srs in the geometry userdata). So how comes it works there and not for gml ppio? I guess some configuration bits are missing?

      For an example see the ReprojectionTest in the WPS module

        Issue Links

          Activity

          Hide
          Andrea Aime added a comment -

          Btw, I think I saw a thread related to this topic on the geotools mailing list lately

          Show
          Andrea Aime added a comment - Btw, I think I saw a thread related to this topic on the geotools mailing list lately
          Hide
          Andrea Aime added a comment -

          Oh gosh, just checked, even WFS works just by accident.
          The thing is, the old GML2 encoder has a special property to set the SRS, the gml3 encoder works only if the CRS is set in the user data and that normally works because the reprojecting feature collection used to flip the axis sticks that userdata property while it's reprojecting.
          But the following request, where no reprojection is needed, just misses all the srsName in the geometries

          http://demo.opengeo.org/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp:states&maxFeatures=50&srsName=EPSG:4326

          This sounds like a fundamental problem, the bindings fail to use the information contained in the attribute declaration...

          Show
          Andrea Aime added a comment - Oh gosh, just checked, even WFS works just by accident. The thing is, the old GML2 encoder has a special property to set the SRS, the gml3 encoder works only if the CRS is set in the user data and that normally works because the reprojecting feature collection used to flip the axis sticks that userdata property while it's reprojecting. But the following request, where no reprojection is needed, just misses all the srsName in the geometries http://demo.opengeo.org/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=topp:states&maxFeatures=50&srsName=EPSG:4326 This sounds like a fundamental problem, the bindings fail to use the information contained in the attribute declaration...
          Hide
          Rini Angreani added a comment -

          Attached patch that offers a fix for this in the related issue: http://jira.codehaus.org/secure/attachment/50401/srsName.patch
          It uses userData though, which is dodgy.

          Show
          Rini Angreani added a comment - Attached patch that offers a fix for this in the related issue: http://jira.codehaus.org/secure/attachment/50401/srsName.patch It uses userData though, which is dodgy.
          Hide
          Rini Angreani added a comment -

          I committed my changes for GEOT-2707 which should fix this.
          Or leave it open for a proper solution (not involving userData).

          Show
          Rini Angreani added a comment - I committed my changes for GEOT-2707 which should fix this. Or leave it open for a proper solution (not involving userData).
          Hide
          Andrea Aime added a comment -

          Verified as fixed, added tests to double check the thing stays in that state

          Show
          Andrea Aime added a comment - Verified as fixed, added tests to double check the thing stays in that state
          Hide
          Andrea Aime added a comment -

          Mass transition all resolved issue that did not see any further comment in the last month to closed status

          Show
          Andrea Aime added a comment - Mass transition all resolved issue that did not see any further comment in the last month to closed status

            People

            • Assignee:
              Justin Deoliveira
              Reporter:
              Andrea Aime
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: