Skip to main content

Questions tagged [cql-filter]

To filter data using the Common Query Language

Filter by
Sorted by
Tagged with
3 votes
2 answers
132 views

How to filter WFS by intersecting polygon

I'm trying to retrive data from a WFS service using a polygon for a filter. Working URL: https://sosgeo.artdata.slu.se/geoserver/SOS/ows?service=wfs&version=2.0.0&request=GetFeature&...
2 votes
2 answers
653 views

Using UNION ALL in GeoServer CQL Filter

I want to combine 2 cql filters of the same layer and output the result on my geoserver layer. It is similar to this SQl query (my case using PostgreSQL): select * from table1 where val = 'a' union ...
1 vote
2 answers
2k views

GeoServer - WMS CQL_FILTER id = 'XXX' works but id IN ('XXX') does not

I have a WMS that I need to filter with CQL_FILTER parameter using an array of srting IDs. The layer is published from a PostGIS Table View which is declared like so: create view mob.daily_origin_all ...
0 votes
1 answer
745 views

Specifying join on multiple datasets in a WFS URL request (CQL/Filter)?

I’m using a WFS and trying to join two/three datasets together in a URL query. Two of the datasets are linked via an aspatial table in the middle like so: | Table 1 | | Table 2 | ...
0 votes
0 answers
52 views

GeoServer CSS point attribute filter removing data but visible on layer

I am trying to create a point layer with the constraints as follows: If [current year] - [year of data point] <= 3 then use square symbol otherwise use circle symbol Regardless of the year of the ...
1 vote
1 answer
99 views

Filtering WFS-features during Download using R

I need to download specific features of the following WFS: "https://www.gds.hessen.de/wfs2/aaa-suite/cgi-bin/alkis/vereinf/wfs" I would like to download 1500 specific features, filtered by &...
0 votes
1 answer
153 views

WFS URL Illegal property name

I've been trying to write a Python script for QGIS to load point-features from this WFS URL: https://geo.api.vlaanderen.be/Adressenregister/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=...
2 votes
1 answer
100 views

Combined cql_filter for multiple layers in WMS request to GeoServer

Is there a way to combine same cql_filters for multiple layers? The cql_filters are the same for most of the layers. The request is getting very long. To optimize it, it would be great to simplify ...
4 votes
2 answers
2k views

Setting CQL_FILTER on WMS in ArcGIS?

Is it at all possible to use a CQL_FILTER on a WMS service in ArcGIS? Ideally we'd be able to programatically change the CQL_FILTER parameter in the WMS URL.
0 votes
1 answer
88 views

Trouble with CQL_Filter with GeoServer 2.18 w/Tomcat 9 over O.S. Debian (same coding worked well under Windows/Geoserver 2.6 w/Jetty)

We've migrated infrastructure from Windows+Jetty+GeoServer 2.6 to Debian10+Tomcat+GeoServer 2.18.0 We had a client application that uses filtered features from WFS using cql_filter=Codigo IN (9999) (...
0 votes
0 answers
107 views

How does getLegendGraphic work with CQL filters?

I have a request I send to get specific layers based on year, type and region. I receive the request for the layers and can display it on the map perfectly. The legend for this layer however, comes ...
1 vote
1 answer
383 views

POLYGON CQL Filter throws error - "NoSuchMethodError" on GeoServer

All spatial query requests perform well on GeoServer 2.19 using CQL filters. But for some reason, I'm getting an internal error with the following POLYGON CQL filter. Hence, the same CQL filter works ...
1 vote
0 answers
305 views

Using CQL filter with different CRS than layer WFS 2.0.0

I'm trying to implement spatial cql_filter such as 'intersects' for version 2.0.0 of WFS from GET or POST HTTP request. A working way of doing it, is by the URL below: "https://wxs.ign.fr/...
5 votes
3 answers
3k views

POST CQL filter (with large geometry) in HTTP body

The size of an URL is limited. Therefore I'm not able to request a WFS with a complex geometry. I read (Geoserver POST filter to WMS layer) that is possible to do in a WMS, but I didn't get it to work....
1 vote
1 answer
112 views

WFS request with DWITHIN operator returning wrong result for states within 1 kilometer

I am trying to retrieve US states from a point within 1 kilometer using a Web Feature Service (WFS) request with a Common Query Language (CQL) filter. I am using the following URL: http://localhost:...
0 votes
1 answer
2k views

CQL_filter parameter on WMS layer doesn't work

I am trying to filter my WMS layer using CQL_filter parameter as: wms_layer = new OpenLayers.Layer.WMS( "Larisa","http://localhost/geoserver/gwc/service/wms", { layers: '...
0 votes
2 answers
3k views

Error filtering WFS data using cql_filter

I use cql_filter to find input values but an error occurs: Uncaught (in promise) SyntaxError: Unexpected token '<', "<?xml vers"... is not valid JSON This is error message in XML: <?...
0 votes
0 answers
100 views

Label polygons with count of intersecting points in GeoServer

I have two spatial layers in a GeoServer instance - polygons (administrative boundaries) and points (resource locations) - and would like to define a layer style (ideally using the CSS format) which ...
1 vote
1 answer
714 views

GeoServer Raster WMS Layer update/filter like CQL, ECQL

I have added the raster layer from GeoServer as a WMS source. There is an HTML filter to apply changes with GeoServer Raster WMS Layer, which is not working with RasterSymbolizer, and CQL filter. Like ...
2 votes
0 answers
2k views

Add CQL filter into GetFeatureInfo request in OpenLayers 2

I have made a WMS layer using OpenLayers 2 and GeoServer and I display the layer using a specific CQL filter. Now I want to use a WMSGetFeatureInfo request in order to get specific data on click. ...
1 vote
1 answer
351 views

Show result of only one CQL filter in OpenLayers?

I am using with OL3. I can dynamically change URL CQL WFS layer from my GeoServer but I want to know how to use map.removelayer before adding another CQL and zoom extend to selected CQL feature. Below ...
0 votes
0 answers
294 views

How do I take user input and apply to a GeoServer CQL filter using Leaflet?

I'm very new to any kind of coding so please bear with me. I have a layer on GeoServer that I can apply a specific CQL filter to as shown below: var wmsLayer = L.Geoserver.wms("http://localhost:...
4 votes
4 answers
15k views

Adding WMS layer with CQL filter

I would like to add to my leaflet's web map layer from my WMS service (Geoserver), but I need to use CQL filter in GetMap link: localhost/geoserver/my_location/wms?(...)&CQL_FILTER=[...] Is it ...
2 votes
0 answers
94 views

Sort granules using provided list of featureids in WMS request to GeoServer

Quick question on GeoServer image mosaics (using ImageMosaic plugin) with overlapping rasters: I’m filtering the WMS query by featureid and ideally the order in which the rasters are ‘stacked’ would ...
0 votes
1 answer
984 views

Geoserver INTERSECTS CQL filter only looks at one polygon in multipolygon

I have a pretty typical store called region which contains various multipolygons such as countries, regions within countries, multinational regions such as EU, and so on. Some of these are single ...
1 vote
1 answer
69 views

Syntax for Masking Polygons which do not contain line using cross-layer filtering in GeoServer

I have two vector layers in GeoServer. One is a polygon like; and another one is a polyline like; By cross-layer filtering, I want to select only those polygons from 1st layer which are crossed by ...
1 vote
1 answer
718 views

Leaflet show or hide layers WFS cql_filter

I use the library Leaflet-WFST. So I have both WMS and WFS layers. With WMS, everything is simple there is cql_filter. I am writing a code where cql_filter is applied when clicking on the checkbox, ...
0 votes
0 answers
403 views

How to properly filter items using a CQL expression on a GET /wfs3/collections/{collectionId}/items? endpoint

I'm trying to filter items at a WFS3 GET endpoint served by a QGIS Server project (single layer - single PostGIS table) using the OGC Common Query Language. While this is working perfectly fine, ...
0 votes
1 answer
558 views

Zoomfit to the selected polygon of WMS Layer using Leaflet Js

I have problem in zoom fitting the selected polygon of WMS Layer. For example, I have a World shapefile. I make a dropdown menu for country names, I did when I choose a country from dropdown menu only ...
0 votes
1 answer
1k views

How to add CQL_FILTER to WMTS layer on GeoServer?

I have a wmts layer on GeoServer and I tried to add some CQL_FILTER to my request but it's not working. Whatever I added to uri, geoserver always return result but in some cases it shouldn't. Here's ...
2 votes
1 answer
1k views

Using a CQL Intersects filter with WFS GetFeature request in JavaScript

I am using OpenLayers to create a web app which allows users to define a polygon as an area of interest, and then query the features which fall within the bounding box and return the data to present ...
2 votes
1 answer
2k views

Add a CQL Filter to a WMS Layer in QGIS

I have a WMS Layer published by a geoserver instance. It has the capability of being filtered by a CQL Filter via GetMap CQL_FILTER query parameter. Adding it to QGIS works, but I can't find a place ...
2 votes
2 answers
307 views

How increase speed of counting CQL.toFilter("CONTAINS(the_geom, POINT (lat lon))") on GeoTools with Java

How can I increase speed of counting? I want to select points which is included by shape (GIS shapefile .shp). I have 5 million points and 10 shape files. qry="CONTAINS(the_geom, POINT (69....
2 votes
2 answers
534 views

CQL filter causing slowness in Java \ Geoserver app

I have a Java application that includes an OpenLayers map with WMS tiles pulled from Geoserver. Geoserver and the Java app are looking at the same MySQL database. In the Java application I have a ...
1 vote
0 answers
142 views

GeoServer: Cross layer filtering with current bbox

I have two layers "building" and "soil" on a French region and I have about 1 million land and 500,000 buildings. I am trying to filter on the WMS query to get the land with the ...
0 votes
0 answers
1k views

WFS GetFeature with cql_filter=Intersects not working for cascaded layers

I have a cascaded (WFS store) layer in my GeoServer. I want to download the data of the layer in Excel format for a provided polygon. In a normal scenario I export the data as below: https://my-...
0 votes
1 answer
93 views

Optional parameters in PointSymbolizer href

I am trying to build a dynamic url for a PointSymbolizer: /api/icons?foo=${strUrlEncode("foo")}&bar=${strUrlEncode("bar")} The problem I am running into is that the ...
2 votes
2 answers
4k views

Using CQL in OpenLayers 3?

I'm trying to make a search engine in OpenLayers 3 by GeoServer features and WFS. To do this should I use a CQL filter? This is my connection code if GeoServer mediates OL3 would you be so kind as ...
2 votes
2 answers
1k views

Using filter functions in cql_filter throws "... cannot be cast to org.opengis.filter.Filter"

I'm trying to use CQL filters in WFS, like (with proper URL encoding): &cql_filter=strEqualsIgnoreCase(name, 'Jane Doe') &cql_filter=strMatches(name, '(?i).* doe') But this tells me, e.g.: ...
1 vote
1 answer
989 views

How to fix cql_filter problem with unicode characters in GeoServer 2.17.2?

I am using GeoServer 2.17.2 and OpenLayers v6.4.3, I can not get result when my cql_filter query is consist of unicode characters, I found out this issue can solve by add a code in tomcat server.xml, ...
1 vote
2 answers
4k views

CQL filter not displaying in leaflet.js

I have a CQL filter that only displays a certain number of points, however when I try to apply the CQL to my existing leaflet map through the options for a layer nothing displays. No errors are thrown ...
0 votes
0 answers
309 views

Error getting GeoJSON data from GeoServer with CQL filter

I have a problem obtaining GeoJSON data from GeoServer with CQL filter. When I do the normal query, I get some results, then it's OK ("totalFeatures":2081). https://mygeoserver/ows?service=...
3 votes
1 answer
1k views

Make POST request for WMS in Leaflet for big values of cql_filter

I am passing a spatial query such as CONTAINS(geom, POLYGON((// geometry))) in the cql_filter, but for big polygons GET request the allowed URI length is violated and hence my requests is getting HTTP ...
1 vote
1 answer
505 views

Geoserver cql filter, closing single quote in URL is not read

I got a very strange behavior when using CQL filter. Here's the URL result when using AJAX http://localhost/geoserver/visualization/ows?service=WFS&version=1.1.0&request=GetFeature&...
2 votes
1 answer
371 views

GeoServer CQL Filter doesnt work with Unicode

I'm using CQL filter to extract certain data from my GeoServer layer. var source = new ol.source.Vector({ loader: function (extent, resolution, projection) { var url = "http://...
1 vote
1 answer
194 views

CQL to XML with string substitution using geotools?

I have some cql attr > PLACEHOLDER that I want to convert to valid XML using geotools. I have heard of terms like filter functions that can somehow replace the placeholder with a function, but not ...
0 votes
1 answer
764 views

zoomToExtent (getDataExtend) combined CQL filter, does not work [duplicate]

I'm using openlayers 2.12 and geoserver 2.1.3. I created a search functionality for a vector layer that contains points/lines/polygons. I used CQL that dynamically gets data from a form. When I ...
3 votes
1 answer
957 views

PyQGIS add WMS layer with CQL_FILTER

I'd like to add a WMS layer through my QGIS plugin with custom CQL_FILTER parameters. My problem is, that the CQL_FILTER parameters are not passed to the GeoServer (I can see it in the GeoServer log ...
1 vote
1 answer
223 views

WMS - Multiple paramters in CQL_FILTER not working?

I'm doing a WMS request with 2 cql_filters. This is the resultant query: ?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=...
2 votes
1 answer
507 views

Get WMS service properties for cql filtering?

From a wms service I know its url and a layer name called: CATAST_Pol_Municipio https://idena.navarra.es/ogc/wms I need to apply a cql_filter on a GetMap request on that layer, filtering by ...