GeoMedia Discussions

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
New Contributor
Posts: 4
Registered: ‎09-23-2019
Accepted Solution

WFS version 2.0.0 OGC Filter URL

[ Edited ]

Good day, 

 

I have WFS service with 2 features (Substation and Cables). I would like to use GetFeature with Filter.

I have an error when I try to do the following request: (I want to filter out cable by CALCULATED_LENGTH which is more than 500).

 

http://tramgisapp.tnb.my/TNBWebGIS_WFS/service.svc/get?service=wfs&version=2.0.0&request=GetFeature&typeNames=ProposedCable&FILTER=<Filter >

<PropertyIsGreaterThan>
<PropertyName>CALCULATED_LENGTH</PropertyName>
<Literal>500</Literal></PropertyIsGreaterThan>
</Filter>

 

 

Error:

 

<ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1  http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" version="2.0.0 ">

<Exception exceptionCode="NoApplicableCode">
<ExceptionText>
<![CDATA[
An unexpected error occurred. Original message: 'Filter in provided namespace is not supported.'
]]>
</ExceptionText>
</Exception>
</ExceptionReport>
 

 

Maybe I am using OGC Filtering wrongly.

 

In Attachments:

 

1) Response from request=GetCapabilities

2) Response from request=DescribeFeatureType

3) Response from request=GetFeature&typeNames=ProposedCable&count=5

 

Thank you, in advance.

Super Contributor
Posts: 457
Registered: ‎10-12-2015

Re: WFS version 2.0.0 OGC Filter URL

Some samples I've had success with in the past:

 

 

 

http://2019netserver/HEDLWFS/WFS?request=getfeature&service=wfs&version=1.1.0&typename=ucgml:V_POLE_PT&Filter=(<Filter xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>POLE_TYPE</PropertyName><Literal>HARDWOOD</Literal></PropertyIsEqualTo></Filter>)

Note: That one was Networks WFS, not WebMap WFS, but should be fairly similar.

 

I think this next one is WebMap one (sorry, I don't have WebMap up at the moment to verify)

 

http://MyServer/MyWFS/WFS?request=getfeature&service=wfs&version=1.1.0&typename=HV_Line,HV_Cable&Filter=(<Filter xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>CIRCUIT1</PropertyName><Literal>HV_PLAINS - P22 - TE TEKO</Literal></PropertyIsEqualTo></Filter>)(<Filter xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>CIRCUIT1</PropertyName><Literal>HV_PLAINS - P22 - TE TEKO</Literal></PropertyIsEqualTo></Filter>)

 

An older one, I had url encoded the filter. I think it worked, though I think it was a geometry MBR filter by the looks.

http://nzsfserver2014/wfsLINZ2003/service.svc/get?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAMES=gmgml:CRS_PARCEL&SRSName=EPSG:4326&Filter=<Filter xmlns="http://www.opengis.net/fes/2.0">%3CBBOX+%3E%3CValueReference%3EGeometry%3C%2FValueReference%3E%3Cgml%3AEnvelope+srsName%3D%22EPSG%3A4326%22+xmlns%3Agml%3D%22http%3A%2F%2Fwww%2Eopengis%2Enet%2Fgml%22%3E%3Cgml%3AlowerCorner%3E%2D41%2E282951+174%2E750925%3C%2Fgml%3AlowerCorner%3E%3Cgml%3AupperCorner%3E%2D41%2E282566+174%2E751361%3C%2Fgml%3AupperCorner%3E%3C%2Fgml%3AEnvelope%3E%3C%2FBBOX%3E</Filter>&OUTPUTFORMAT=application%2Fvnd.google-earth.kml%2Bxml
New Contributor
Posts: 4
Registered: ‎09-23-2019

Re: WFS version 2.0.0 OGC Filter URL

Shaun, thank you so much.

 

First example has worked for me. I was missing  xmlns="http://www.opengis.net/ogc" after Filter.

 

Thanks again.