12

You can set the parameter resultType to "hits" and you will get the number of features in the query similar to the count() function in SQL. HTTP Get request example: http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=topp:states&version=1.1.0&resultType=hits HTTP Post request example with a filter: <wfs:GetFeature service="WFS"...


9

Your feature ID looks suspiciously random as in randomly generated by Geoserver. The reason for that is that Geoserver (GeoTools actually) cannot pick a unique identifier from the datastore. This document, though vague, explains what GeoTools consider a fid: http://old.geotools.org/What-is-a-FID_63486.html Solution: if you are using postgis define a ...


9

The WFS BBOX works in "bbox vs bbox" mode for performance reasons, if you want the more accurate geometry intersection you can use a OGC Filter or CQL filter with the intersection operator. As for the other question, WFS won't consider SLD, only WMS does. The SLD can have filters in rules, including spatial ones (uncommon but not impossible) but mind, they ...


7

WFS version 1.0.0 supports officially only the default SRS/CRS both for input and output. However, many WFS server brands have backported the srsName parameter that came with WFS 1.1.0 at least for output. With some WFS servers srsName may work also for defining the input geometry but let's assume that it is not possible and concentrate on WFS 1.1.0. As far ...


6

I've solved my problem. For using GET request should use OpenLayers.Protocol.HTTP instead OpenLayers.Protocol.WFS. wfs_options = { url: 'http://fakeurl/tinyows.cgi?', params: { request: "GetFeature", service: "wfs", version: "1.0.0", typeName: "layername" }, format: new OpenLayers.Format.GML({ ...


6

Here is a typical request payload for a GetFeature with the viewparams included in the xml: <?xml version='1.0' encoding='utf-8'?> <GetFeature xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:gml='http://www.opengis.net/gml' xmlns:ogc='http://www.opengis.net/ogc' wfs:viewParams='keyOne:ValueOne;keyTwo:ValueTwo' xmlns:wfs='http://...


5

Provided you are using WFS 1.1 you can set resultype=hits and this will return just the number of records that match your query. I can't recall if GeoServer has back ported this to 1.0 but the standard doesn't support it.


5

You can check within which polygon, if any, your point is by using Contains filter. <wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:topp="http://www.openplans.org/topp" xmlns:wfs="http://www.opengis.net/wfs" xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="...


5

Here is an example of the syntax for DWITHIN http://demo.opengeo.org/geoserver/wfs?request=getfeature&version=1.0.0&service=wfs&typename=topp:states&outputformat=json&cql_filter=DWITHIN(the_geom,Point(-88 38),0.1,kilometers) Note that DWITHIN takes three parameters: reference geometry, distance, and distance unit. However, GeoServer ...


5

You are correct- you first need to know which layers ('sublayers') exist in the group layer. If this is your own server and you already know what the sublayers are, you can skip to the end of this howto. Otherwise, to find them programmatically, ajax call a url constructed like this: http://<your server and/or port>/geoserver/<workspace>/wms?...


4

I think this could be by two reasons: You must set the plugin parameter paging to false to show data always, not depending of the map view. In other way you can take a look at the Geoserver layer to set the parameters "Encuadre Lat/Lon" properly ( sorry i don't know the parameter name in english) . Try like this: { ptype: "gxp_featuremanager",id: "...


4

It's likely the axis flipping biting you, you should flip coordinates in WFS 1.1 and 2.0 filters: http://docs.geoserver.org/stable/user/services/wfs/basics.html#axis-ordering


4

You can setup OUTPUTFORMAT declarations which leverage MapServer's use of OGR for custom output formats (including CSV, GeoJSON). See the documentation for further details. Update: this does not appear to be the case for GetPropertyValue requests, only GetFeature requests.


3

A look at the source code seems to show the POST is hard coded in in WFS protocol. /* part from source with own comments v2.11: lib/OpenLayers/Protocol/WFS/v1.js */ read: function(options) { OpenLayers.Protocol.prototype.read.apply(this, arguments); options = OpenLayers.Util.extend({}, options); OpenLayers.Util.applyDefaults(options, this....


3

For others who come across this question, here's what I've learned so far: PostGIS and the geography data type appear to be red herrings. In WFS 1.0, you can't project on the fly and the BBOX is expected to be specified in the same projection as the features. In WFS 1.1, reprojection is supported, but by default the BBOX is interpreted as CRS84. Unlike ...


3

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.


3

The link below contains an example using an OpenLayers2 DrawFeature control that allows to select features via a circle. It can help using WFS GetFeature to retrieve some datas using polygon or linestring drawing tools ows.js : Ease OGC Web Services (OWS) calls with javascript.


3

There are two possibilities here - to reproject on the server use WFS 1.1 and set the required SRS in the request to 900913 (i.e. ask GeoServer to do the reprojection on the fly) or tell the client how to do the reprojection by including the relevant projection information from proj4js in your openlayers code. The first option will be quicker and easier. ...


3

Well, you can try CQL-filters for attribute-based queries on WMS. Look this thread for how to filter features of a wms. Afterwards you may select features from your WFS obtained from this WMS. BTW.: the GetFeature-control is designed for selecting features by mouse rather then by any query. To select a feature you may use the SelectFeature-control. Loop the ...


3

Did I understood you right, that you basically want to request two layers in one Request? If so then just use "typeName" instead of "typeNames". See this request of two layers at the same time ( bvv:gmd_ex and bvv:lkr_ex ): http://geoserv.weichand.de:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeName=bvv:gmd_ex,bvv:lkr_ex&...


3

This error is trying to tell you a FilterFunction is not a Filter which means that it doesn't evaluate to true or false. The CQL filter is used to select some or all of the features in the data store, but you are trying to use it transform a features' geometry instead. The usual way to achieve what you are trying is to get GeoServer to return your selected ...


3

That is not supposed to work. SortBy is defined in the WFS 1.1.0 standard as The SORTBY parameter is used to specify a list of property names whose values should be used to order (upon presentation) the set of feature instances that satify the query. The value of the SORTBY parameter shall have the form “PropertyName [A|D][,PropertyName [A|D],…]” ...


3

I think you are being bitten by loose bounding box comparisons since technically this polygon doesn't intersect any features. POLYGON((123664.03100000322 210489.5150000006, 123705.24599999934 210489.5150000006, 123705.24599999934 210587.86800000072, 123664.03100000322 210587.86800000072, 123664.03100000322 210489.5150000006)) But if I ...


3

Having a look at the whole data of the mu:MaritimeBoundary feature type and BBOX gives a hint. The red geometry is your BBOX and green line is the maritime boundary. The WfS server does not return data because your BBOX does not intersect with any feature. This request with a BBOX the goes further to the North returns data. http://inspire.maaamet.ee/arcgis/...


2

I encountered the same problem for native SRS' before (similarly used some Dutch reference systems) but had not have time to figure out if its %100 geoserver's fault. Probably it is. It seems like it is not re-projecting to the declared SRS. Now I looked for if the support is available and it looks like it is supported in Geotools version 2.4.1 (so I would ...


2

Using the WMSGetFeatureInfo method, the way to pass along viewparams is by using vendorparams and and assigning the viewparams in the eventlistener before the callback function retrieving the "click result" from the WMS layer click_info = new OpenLayers.Control.WMSGetFeatureInfo({ title: 'Identify features by clicking', layers: queryableMapLayers,...


2

Looking at the source of the WFS.fromWMSLayer function, it looks like you should pass in your viewparams as an additional option: protocol: OpenLayers.Protocol.WFS.fromWMSLayer(test, {viewparams: 'x:'+myX+';y:'+myY}), Check the URL that is called when you select a feature - and hopefully the ...


2

One approach would be to use the OGC Common Query Language (CQL) to generate your expressions and then use the OpenLayers CQL parser to convert to an OGC Filter. A description of the process can be found here.


2

Check you have the correct projection parameters for Rijksdriehoeksstelsel. For long, proj4 has had some parameters missing, causing a slight shift. Full story can be found below: http://oegeo.wordpress.com/2008/05/20/note-to-self-the-one-and-only-rd-projection-string/ Furthermore, you may have to overwrite the projection of your base layer to EPSG:3857 ...


2

So is the polygon in north america? Mind that WFS 1.1 assumes by default a lat/lon axis order, so you might have to flip coordinates. See also this: http://docs.geoserver.org/latest/en/user/services/wfs/basics.html#axis-ordering


Only top voted, non community-wiki answers of a minimum length are eligible