Wednesday, 1 June 2016

How to filter big datasets in Geoserver WMS?


Is there a good way to filter datasets with approx 50,000 features in Geoserver? I'd have to select between 100 and 200 features based on ids. These ids are different from the FeatureIds. Couldn't find an "IN" operator similar to SQL in OGC Filter Encoding Standard. Combining multiple PropertyIsEqualTo operators performs really poorly.




Answer



Ah. In that case, you could use GeoServer's WMS CQL filter support, i.e.:


http:///wms?service=WMS&version=1.1.1&request=GetMap&....&cql_filter=IN ('id_1','id_2','id_3')

More information is available at http://geoserver.org/display/GEOSDOC/WMS+vendor+parameters


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...