2

I'm having problems forming a GET query for WebMap spatial data using WFS 1.1.0. My query looks like this:

http://USGVDCALIX2/WFS/Request.aspx?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&MAXFEATURES=500&FILTER=<Filter xmlns="http://www.opengis.net/ogc"><BBOX><PropertyName>Geometry</PropertyName><Box srsName="EPSG:4326" xmlns="http://www.opengis.net/gml"><Envelope srsName="EPSG:4326"><lowerCorner>-72.742129821777 43.944567565918</lowerCorner><upperCorner>72.545288391113 44.148836975098</upperCorner></Envelope></Box></BBOX></Filter>&TYPENAME=Counties

But the result is:

<ExceptionReport xmlns="http://www.opengis.net/ows" version="1.1.0"><Exception exceptionCode="GWMWFS.GeometryUtility" locator="GWMWFS.GeometryUtility"><ExceptionText>Unsupported geometry type.</ExceptionText></Exception></ExceptionReport>

According to this GeoMedia WebMap Professional 6.1 is WFS 1.1.0 compliant. And according to this my query looks valid.

So does this error suggest that WebMap is unable to do a BBOX query against a polygon? Should the query be formed differently? Links to WebMap WFS 1.1.0 filter examples would be welcome!

1

You need to check what geometry types the WFS server supports. Do a GetCapabilities request and check //ogc:GeometryOperands, which provides a list of supported geometry types.

Update: as well, make sure your WFS GetFeature request has proper referencing to namespaces, and of geometry types.

http://host/path?service=WFS&version=1.1.0&request=GetFeature&typename=$typename&filter=<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><ogc:BBOX><ogc:PropertyName>$geometry_name</ogc:PropertyName><gml:Envelope><gml:lowerCorner>47 -5</gml:lowerCorner><gml:upperCorner>55 20</gml:upperCorner></gml:Envelope></ogc:BBOX></ogc:Filter>

Where $typename is the name of the FeatureType you wish to query, and $geometry_name is the name of the geometry of the FeatureType.

  • Thank you. I did this using usgvdcalix2/WFS/… and it reports the following capabilities: gml:Envelope, gml:Point, gml:LineString, gml:Polygon, gml:Arc, gml:Circle It also report the following Spatial Ops: <ogc:SpatialOperators> <ogc:SpatialOperator name="BBOX"/> <ogc:SpatialOperator name="Disjoint"/> <ogc:SpatialOperator name="Intersects"/> <!-- <ogc:SpatialOperator name="Contains"/> --> <ogc:SpatialOperator name="Within"/> </ogc:SpatialOperators> – ca0v May 11 '12 at 16:14
0

Remove the <Box> element..it is enough to have only the <Envelope> element:

http://usgvdcalix2/WFS/Request.aspx?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&MAXFEATURES=500&FILTER=<Filter xmlns="http://www.opengis.net/ogc"><BBOX><PropertyName>Geometry</PropertyName><Envelope srsName="EPSG:4326" xmlns="http://www.opengis.net/gml"><lowerCorner>43.944567565918 -72.742129821777</lowerCorner><upperCorner>44.148836975098 -72.545288391113</upperCorner></Envelope></BBOX></Filter>&TYPENAME=Counties

Also, for WFS 1.1.0 ESPG:4326 is correctly interpreted as lat/lon not lon/lat so reverse those values.

As far as other examples go, here are some non-spatial examples provided by Intergraph support:

http://somehost/request.aspx?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=SwPipe&SRSNAME=EPSG:4326&FILTER=<Filter xmlns="http://www.opengis.net/ogc"><PropertyIsLike wildCard="*" singleChar="!" escapeChar="\"><PropertyName>Construction</PropertyName><Literal>ABS</Literal></PropertyIsLike></Filter>

http://somehost/request.aspx?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=GND1_NAME_INFORMATION&SRSNAME=EPSG:4326&FILTER=<Filter xmlns="http://www.opengis.net/ogc"><PropertyIsLike wildCard="*" singleChar="!" escapeChar="\"><PropertyName>FEATURE_COUNTRY_CD</PropertyName><Literal>RS</Literal></PropertyIsLike></Filter>

http://somehost/request.aspx?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=GND1_NAME_INFORMATION&Filter=<Filter xmlns="http://www.opengis.net/ogc"><PropertyIsLike wildCard="*" singleChar="_" escapeChar="\"><PropertyName>NAME_READING_ORDER</PropertyName><Literal>Philadelphia*</Literal></PropertyIsLike></Filter>

http://somehost/Request.aspx?VERSION=1.1.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=gmgml:States&SRSName=EPSG:4326&Filter=<Filter xmlns="http://www.opengis.net/ogc"><And><PropertyIsGreaterThan><PropertyName>Population</PropertyName><Literal>1000000</Literal></PropertyIsGreaterThan><PropertyIsGreaterThan><PropertyName>SqMiles</PropertyName><Literal>10000</Literal></PropertyIsGreaterThan></And></Filter>
  • Interesting note I ran across in GeoMedia documentation. It states, "if the WMS version is 1.3.0, the authority is EPSG, and the EPSG code range is >=4000 and <5000, the default is Y,X, else, the default is X,Y." – ca0v Aug 14 '12 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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