Questions tagged [cql-filter]

To filter data using the Common Query Language

Filter by
Sorted by
Tagged with
1
vote
1answer
35 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
0answers
26 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
1answer
83 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
1answer
36 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 ...
0
votes
1answer
328 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 | ...
2
votes
1answer
149 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 ...
1
vote
1answer
239 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 ...
0
votes
1answer
376 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
2answers
99 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
2answers
437 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 ...
0
votes
0answers
88 views

GeoServer property desciptor is null did you request a property that does not exist - problem with raster in group

In GeoServer 2.9.1 I have thematic groups configured. Each group consists of a series of vector layers and each of them has at least one raster. In version 2.9.1 cql filter deals with them perfectly ...
1
vote
0answers
51 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
0answers
227 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
1answer
21 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 ...
1
vote
2answers
3k 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
2answers
936 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
1answer
176 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
2answers
3k 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 ...
1
vote
1answer
907 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
0answers
132 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=...
2
votes
1answer
537 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 ...
2
votes
2answers
188 views

How to use UNION ALL in GeoServer CQL Filter?

Basically 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'...
1
vote
1answer
123 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
1answer
102 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
1answer
130 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
1answer
745 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
1answer
840 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
1answer
125 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=...
1
vote
1answer
96 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 ...
1
vote
0answers
339 views

SLD styling based on Cql filter result

I am using Geoserver 2.4.4 with a PostGIS database. I have 2 layers configured, one of them represents some polygons. I am trying to put a label inside the polygon with the number of the features of ...
2
votes
2answers
1k views

Leaflet polygon (multi polygon) to CQL equivelent

I am using leaflet with geoserver. I want to set up a CQL filter to do an intersect but having an issue with getting the geometry from leaflet polygon to cql polygon. For instance, the feature has ...
0
votes
0answers
239 views

Highlight the filtered Features using CQL_FILTER on map

I have a WMS service with multiple layers which I am consuming within a single source through Layers Param. I need to filter features for few layers from the service. I am able to get the updated ...
2
votes
0answers
49 views

CQL filter not quite properly formatted

I am trying to use the following CQL filter in Geoserver for extracting all polygons (layer1) intersecting a line (layer2): http://XXX.XX.X.XX:8080/geoserver/workspace/wfs?service=wfs&version=1.1....
2
votes
2answers
1k views

Geoserver CQL Cross Layer Intersection Failing

I am having trouble forming a properly formatted CQL request using geoServer cross layer filer functions and was hoping others could assist. My request is as follows: http://localhost:8080/geoserver/...
0
votes
2answers
4k views

OpenLayers ECQL BBOX and INTERSECTS: Can I set SRS name?

I am using GeoServer and am trying to understand one problem: Using this statement returns successfully the polygon intersecting with my BBOX. The layer is EPSG:2193 http://myserver/fwsys/wms?service=...
2
votes
1answer
1k views

GeoServer WMS service CQL filter query with Mapbox GL

Is there any way to query WMS tile layer for Mapbox GL? map.addLayer({ 'id': 'wms-test-layer', 'type': 'raster', 'source': { 'type': 'raster', 'tiles': [ '...
1
vote
0answers
153 views

Geomesa BBOX query provide result only for whole world BBOX

I am running command line query to get bounding box data. The geomesa query is returning result only if the bounding box is "BBOX(geom, -180, -90, 180, 90.0)". For any other parameter, it is returning ...
3
votes
3answers
9k 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
2answers
126 views

Geotools CQL to OGC filter

I'm trying to convert a CQL filter to OCG. I followed this example: https://blog.ianturton.com/geotools/code/ogc/2015/03/18/Generating-OGC-Filters.html In line with org.geotools.xml.Configuration ...
2
votes
1answer
1k views

Is it possible to use SELECT DISTINCT in a GeoServer CQL_FILTER statement?

I'm running a query on a GeoServer WFS layer, using a CQL_FILTER. This results in duplicates, whereas I only want to see one instance of each matching result. The query I'm running is: &...
1
vote
1answer
367 views

How to specify a polygon's coordinate reference system in a CQL_FILTER geometric filter?

The CQL tutorial page contains an example showing how a polygon can be used in a DISJOINT query: DISJOINT(the_geom, POLYGON((-90 40, -90 45, -60 45, -60 40, -90 40)) What is the syntax for ...
1
vote
1answer
64 views

WFS filter on entire row?

With PostgreSQL I can query an entire row for a string: SELECT * FROM table_name WHERE table_name::text LIKE '%string%'; Is there an equivalent (CQL?) for a Geoserver WFS serving PostGIS data? I've ...
0
votes
1answer
345 views

Geoserver cql_filter on wms json/vector requests

I'm trying to make a cql filtered wms request for a non image based format like geojson or mapbox vector but the filters aren't applying. If i change the format to image/png the filters behave as ...
0
votes
1answer
842 views

Geoserver CQL file queryCollection limit

I'm using GeoServer 2.9.0 and I need to get some result using CQL_FILTER, intersects between polygon and line String layer, cql query is as follow: INTERSECTS(geom, collectGeometries(queryCollection('...
1
vote
1answer
205 views

Is it possible to take advantage of lowercase index on column using CQL filter on WFS?

I am querying a WFS housed in geoserver - the data itself lives in a postgresql database. I would like to run case insensitive queries against the WFS and see there is an option to specify ...
2
votes
0answers
425 views

GeoServer CQL cross layer filtering: querySingle/queryCollection for non-geometry attribute return

I have only been able to find examples where geometry attributes are returned from cross layer filtering functions, but the GeoServer documentation says: A common use case is to extract a geometry-...
2
votes
2answers
339 views

OpenLayers3: catch invalid CQL filter exception

My code is following: var filterParams = { 'FILTER': null, 'CQL_FILTER': null, 'FEATUREID': null }; if (filter.length > 0) { filterParams["CQL_FILTER"] = filter; lyr.getSource()...
1
vote
2answers
272 views

How to override the memory limits in GeoServer cross layer filtering?

According to this document retrieving of minimum features and coordinates can be override by using QUERY_LAYER_MAX_FEATURES and GEOMETRY_COLLECT_MAX_COORDINATES. This can be done using JVM system ...
1
vote
1answer
828 views

Is it possible to do a CQL filtering on an array field in a Postgis DB

I have a Postgis (2.2.3 in PostgreSQL 9.5) database with a view that has aggregate array fields. I can filter on these fields directly on the DB with Select * from myschema."ViewWithArrays" v where ...
2
votes
1answer
661 views

How to select features which overlap one geometry but are disjoint from another?

Given a point layer and a polygon layer (P1) in GeoServer, the following CQL Filter selects points which intersect the polygon P1: CQL_FILTER = "Within(geom,POLYGON((P1_coordinates)))"; The ...