Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm forming a WFS post request like the one below. Notice I have SRSNAME="epsg:4326":

<GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
version="1.1.0" maxFeatures="500">
  <wfs:Query typeName="SewerMainline" SRSNAME="EPSG:3857">
    <Filter xmlns="http://www.opengis.net/ogc">
      <BBOX>
        <PropertyName>LinearGeometry</PropertyName>
        <Envelope srsName="EPSG:4326" xmlns="http://www.opengis.net/gml">
          <lowerCorner>46.226130203549 -119.23339223652</lowerCorner>
          <upperCorner>46.226323539414 -119.23301630567</upperCorner>
        </Envelope>
      </BBOX>
    </Filter>
  </wfs:Query>
</GetFeature>

But the result looks like this. Notice the geometry is still in EPSG:3857 (the DefaultSRS):

<gmgml:FeatureCollection xmlns="http://www.intergraph.com/geomedia/gml"
xmlns:gml="http://www.opengis.net/gml"
xmlns:gmgml="http://www.intergraph.com/geomedia/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation='http://www.intergraph.com/geomedia/gml http://usalvwdgis1:801/WFS1/request.aspx?request=DescribeFeatureType&amp;VERSION=1.1.0&amp;SERVICE=WFS&amp;OUTPUTFORMAT=text/xml;subtype=gml/3.1.1'
numberOfFeatures='4'>
  <gml:boundedBy>
    <gml:Envelope srsName="EPSG:4326">
      <gml:lowerCorner>46.2260082243399 -119.233511477885</gml:lowerCorner>
      <gml:upperCorner>46.2262617590092 -119.232662186944</gml:upperCorner>
    </gml:Envelope>
  </gml:boundedBy>
  <gml:featureMember>
    <gmgml:SewerMainline gml:id="SewerMainline.5635">
      <gmgml:ID1>5635</gmgml:ID1>
      <gmgml:LinearGeometry>
        <gml:LineString srsName="EPSG:4326">
          <gml:posList srsDimension="2">46.2262145488833 -119.233114496317
          46.2262139292097 -119.233327445878</gml:posList>
        </gml:LineString>
      </gmgml:LinearGeometry>
    </gmgml:SewerMainline>
  </gml:featureMember>
</gmgml:FeatureCollection>

I've confirmed the service supports 4326..here is a snippet from GetCapabilities:

<ows:Parameter name="srsName">
  <ows:Value>EPSG:3857</ows:Value>
  <ows:Value>EPSG:4326</ows:Value>
</ows:Parameter>

I also looked at the WFS 1.1.0 spec and the doc on the SRSNAME state the following:

This parameter is used to specify a WFS-supported SRS that should be used for returned feature geometries. The value may be the DefaultSRS or any of the OtherSRS values that a WFS declares it supports in the capabilities document. The SRS may be indicated using EPSG codes or the URL form defined in [2]. If the parameter is not specified then the value of the DefaultSRS for the feature type being queried shall be used.

Where am I going wrong?

share|improve this question
    
Contacted Intergraph and they filed it as a defect: SR 1-408131380 has been updated to CR - Defect / CR - Filed –  ca0v Sep 17 '12 at 14:03

1 Answer 1

I take it you're trying to reproject the data? According to the documentation:

srsName= where is the code for the projection (such as EPSG:4326).

For POST requests, you can add the same code to the Query element.

So you might want to putting it under the Query element.

share|improve this answer
    
I think that documentation relates to GeoServer running WFS 1.0. I tried moving the SRSNAME to the Query and received the same response. –  ca0v Sep 12 '12 at 16:11
    
But you're trying to reproject yes? What WFS server are you using btw? –  R.K. Sep 12 '12 at 16:15
    
GeoMedia. I want the results in the EPSG:4326 projection. I don't think that is the same as reprojecting. –  ca0v Sep 12 '12 at 16:19
    
R.K. - I believe you are correct. The WFS 1.1 Spec does re-state slightly more specifically that "the optional srsName attribute of the <Query> element is used to specify a specific WFS-supported SRS to be used for returned feature geometries. Its value may be the <DefaultSRS> or any of the <OtherSRS> values listed for the feature type in WFS capabilities document. If no srsName value is supplied, then the features shall be returned using the advertised <DefaultSRS> value." –  ca0v Sep 12 '12 at 17:05
    
So your WFS request works now? –  R.K. Sep 12 '12 at 17:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.