[OpenLayers-Users] Problems with large datasets, WFS, alternatives.

Andreas Hocevar ahocevar at opengeo.org
Thu Mar 10 16:32:44 EST 2011

Hey Phil,

with WFS, you can do a GetFeature request for only the attributes you're interested in, e.g. by using something like


inside the <wfs:Query>. In OpenLayers, you have to set propertyNames in the protocol options to get this. This is an array of the names of the fields you want to have included in the response.


On Mar 10, 2011, at 13:17 , Phil Scadden wrote:

>> so you need a getfeatureinfo call from wms, that returns exactly a
>> feature' attributes.
> Getfeatureinfo doesnt cut it because I am querying by polygon - and also 
> returns geometry in gml. I was looking for a way to make the WFS call 
> without getting back geometry.
> My WMS select plan would be something like this:
> WMSselect = new OpenLayers.Layers.WMS etc with a filter that ensures no 
> features selected.
> Add to map.
> On select what I want would be WFS call that returns without geometry.
>   Change the filter on WMSselect so it filters for the ids returned by 
> WFS. Refresh the WMSselect display.
> Looking at the WFS specification, it should be possible to specify which 
> properties are returned (excluding geometry) through the query 
> specification. I cant see how to use this in Openlayers though.
> -- 
> Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
> Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232
> Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

More information about the Users mailing list