Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GetFeature - how to declare wfs, ogc, gml namespaces?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
ca0v
2886 Views, 2 Replies

GetFeature - how to declare wfs, ogc, gml namespaces?

I've asked a very similar question on this same forum but the answer (though accepted) was incomplete.  I have a GetFeature request which declares the wfs, ogc, gml namespaces correctly yet it fails.  When I remove the prefix from the xmlns declaration (e.g. xmlns:ogc -> xmlns, xmlns:gml -> xmlns) the request succeeds.  

 

It even works when I completely remove the xmlns declaration!  Is this a defect or is my request not correct?

 

FAILS:

<wfs:GetFeature service="WFS" version="1.1.0" maxFeatures="500"
xmlns:wfs="http://www.opengis.net/wfs">
  <wfs:Query typeName="Water:WA_HYDRANT" SRSNAME="EPSG:26910">
    <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
      <ogc:Intersects>
        <ogc:PropertyName>Geometry</ogc:PropertyName>
        <gml:Polygon srsName="EPSG:26910"
        xmlns:gml="http://www.opengis.net/gml">
          <gml:exterior>
            <gml:LinearRing>
            	<gml:posList>...</gml:posList>
            </gml:LinearRing>
          </gml:exterior>
        </gml:Polygon>
      </ogc:Intersects>
    </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

WORKS:

<wfs:GetFeature service="WFS" version="1.1.0" maxFeatures="1"
xmlns:wfs="http://www.opengis.net/wfs">
  <wfs:Query typeName="Water:WA_HYDRANT" SRSNAME="EPSG:26910">
    <ogc:Filter xmlns="http://www.opengis.net/ogc">
      <ogc:Intersects>
        <ogc:PropertyName>Geometry</ogc:PropertyName>
        <gml:Polygon srsName="EPSG:26910"
        xmlns="http://www.opengis.net/gml">
          <gml:exterior>
            <gml:LinearRing>
            	<gml:posList>...</gml:posList>
            </gml:LinearRing>
          </gml:exterior>
        </gml:Polygon>
      </ogc:Intersects>
    </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

 

Even this works:

 

WORKS:

<wfs:GetFeature service="WFS" version="1.1.0" maxFeatures="500"
xmlns:wfs="http://www.opengis.net/wfs">
  <wfs:Query typeName="Water:WA_HYDRANT" SRSNAME="EPSG:26910">
    <ogc:Filter>
      <ogc:Intersects>
        <ogc:PropertyName>Geometry</ogc:PropertyName>
        <gml:Polygon srsName="EPSG:26910">
          <gml:exterior>
            <gml:LinearRing>
              <gml:posList>...</gml:posList>
            </gml:LinearRing>
          </gml:exterior>
        </gml:Polygon>
      </ogc:Intersects>
    </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

 

Tags (1)
2 REPLIES 2
Message 2 of 3
ca0v
in reply to: ca0v

Simpler comparision between a working and failing request:

 

WORKS:

<wfs:GetFeature service="WFS" version="1.1.0" maxFeatures="10"
xmlns:wfs="http://www.opengis.net/wfs">
  <wfs:Query typeName="Water:WA_LARGE_VALVE" SRSNAME="EPSG:26910">
    <Filter xmlns="http://www.opengis.net/ogc">
      <Intersects xmlns="http://www.opengis.net/gml">
        <PropertyName>Geometry</PropertyName>
        <Envelope srsName="EPSG:26910">
          <lowerCorner>491784.0 5456759.0</lowerCorner>
          <upperCorner>491809.0 5456805.0</upperCorner>
        </Envelope>
      </Intersects>
    </Filter>
  </wfs:Query>
</wfs:GetFeature>

FAILS (replace Envelope with Polygon):

<wfs:GetFeature service="WFS" version="1.1.0" maxFeatures="1"
xmlns:wfs="http://www.opengis.net/wfs">
  <wfs:Query typeName="Water:WA_LARGE_VALVE" SRSNAME="EPSG:26910">
    <Filter xmlns="http://www.opengis.net/ogc">
		<Intersects xmlns="http://www.opengis.net/gml">
		<PropertyName>Geometry</PropertyName>
		<Polygon srsName="EPSG:26910">
		  <exterior>
		    <LinearRing>
		      <posList>489093.629 5456057.158 489092.66826402
		      5456047.4034839 489089.822976626 5456038.02382838
		      489085.202480615 5456029.37948835 489078.984339059
		      5456021.80266094 489071.407511651 5456015.58451938
		      489062.763171618 5456010.96402337 489053.383516101
		      5456008.11873598 489043.629 5456007.158 489033.874483899
		      5456008.11873598 489024.494828382 5456010.96402337
		      489015.850488349 5456015.58451938 489008.273660941
		      5456021.80266094 489002.055519385 5456029.37948835
		      488997.435023374 5456038.02382838 488994.58973598 5456047.4034839
		      488993.629 5456057.158 488994.58973598 5456066.9125161
		      488997.435023374 5456076.29217162 489002.055519385
		      5456084.93651165 489008.273660941 5456092.51333906
		      489015.850488349 5456098.73148062 489024.494828382
		      5456103.35197663 489033.874483899 5456106.19726402 489043.629
		      5456107.158 489053.383516101 5456106.19726402 489062.763171618
		      5456103.35197663 489071.407511651 5456098.73148062
		      489078.984339059 5456092.51333906 489085.202480615
		      5456084.93651165 489089.822976626 5456076.29217162
		      489092.66826402 5456066.9125161 489093.629
		      5456057.158</posList>
		    </LinearRing>
		  </exterior>
		</Polygon>
		</Intersects>
    </Filter>
  </wfs:Query>
</wfs:GetFeature>

 

Message 3 of 3
ca0v
in reply to: ca0v

Couple problems, first doesn't seem to matter, second seems to be a defect.

 

1. Move the gml declaration into the polygon (does not resolve issue)

2. Add a space after the <posList> (<posList> 489093.629)

 

Now it works.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report