Questions tagged [cql-filter]

To filter data using the Common Query Language

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 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:...
user avatar
  • 111
0 votes
0 answers
15 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) (...
user avatar
2 votes
0 answers
36 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 ...
user avatar
  • 21
0 votes
1 answer
58 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 ...
user avatar
  • 1
1 vote
1 answer
34 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 ...
user avatar
1 vote
1 answer
85 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, ...
user avatar
0 votes
0 answers
52 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, ...
user avatar
  • 6,698
0 votes
1 answer
58 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 ...
user avatar
  • 11
0 votes
1 answer
119 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 ...
user avatar
2 votes
1 answer
258 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 ...
user avatar
2 votes
2 answers
141 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....
user avatar
1 vote
0 answers
57 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 ...
user avatar
0 votes
0 answers
327 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-...
user avatar
  • 1
1 vote
1 answer
526 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 ...
user avatar
  • 191
1 vote
1 answer
292 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, ...
user avatar
  • 791
1 vote
1 answer
330 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 ...
user avatar
1 vote
1 answer
991 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 ...
user avatar
  • 3,497
0 votes
0 answers
156 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=...
user avatar
2 votes
2 answers
247 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'...
user avatar
  • 257
1 vote
1 answer
168 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&...
user avatar
  • 257
2 votes
1 answer
125 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://...
user avatar
  • 257
1 vote
1 answer
144 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=...
user avatar
  • 399
1 vote
1 answer
134 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 ...
user avatar
  • 399
0 votes
0 answers
259 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 ...
user avatar
2 votes
0 answers
56 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....
user avatar
0 votes
1 answer
382 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 | ...
user avatar
2 votes
1 answer
630 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 ...
user avatar
1 vote
0 answers
166 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 ...
user avatar
  • 11
0 votes
1 answer
27 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 ...
user avatar
2 votes
2 answers
147 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 ...
user avatar
  • 137
1 vote
1 answer
460 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 ...
user avatar
  • 20.5k
1 vote
1 answer
67 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 ...
user avatar
0 votes
1 answer
369 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 ...
user avatar
0 votes
1 answer
960 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('...
user avatar
  • 133
1 vote
1 answer
224 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 ...
user avatar
  • 1,386
2 votes
0 answers
455 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-...
user avatar
  • 21
1 vote
1 answer
903 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 ...
user avatar
2 votes
1 answer
755 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 ...
user avatar
  • 20.5k
2 votes
1 answer
914 views

GeoServer CQL Filter IN and strToLowerCase

I am trying to query GeoServer with a CQL Filter using the IN clause. If I send a request like this I get data back. http://server.com/geoserver/server/wfs?service=wfs&version=1.0.0&request=...
user avatar
  • 169
2 votes
1 answer
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': [ '...
user avatar
1 vote
2 answers
296 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 ...
user avatar
1 vote
1 answer
138 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 ...
user avatar
1 vote
0 answers
962 views

Cross layer Filtering in Geoserver still getting error Could not parse CQL filter list. Function not found. Parsing :

Im trying to apply cross filter to retrieve the layer1 (where des= land) interects with layer2 as follows http://localhost:2211/geoserver/wfs?service=WFS&version=1.0.0&outputFormat=...
user avatar
3 votes
1 answer
253 views

Geoserver CQL + SQL Server Plugin - .Filter Statement

Does anyone know why GeoServer's SQL Server Plugin when making a WFS request with a spatial cql/ecql predicate ends up adding a SQL .Filter to the generated query in addition to the spatial predicate ...
user avatar
  • 329
1 vote
1 answer
2k views

Trying to perform A WFS CQL_FILTER for multiple TYPENAMES with different GEOM name identifiers

Using a WFS service https://geo.onroerenderfgoed.be/geoserver/wfs I want to retrieve the features with a CQL INTERSECT query. I need to get results from 2 TYPENAME: vioe_geoportaal:vast_htp,...
user avatar
1 vote
0 answers
506 views

Why is DWITHIN filtering my data with native EPSG 4326 with meters instead of degrees?

Ok so I have a PostgreSQL Table, to which I added a PostGIS geometry column using: SELECT AddGeometryColumn ('public','my_table','geom',4326,'POINT',2); Followed by: UPDATE public.my_table SET geom ...
user avatar
2 votes
1 answer
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: &...
user avatar
  • 20.5k
2 votes
2 answers
2k views

WFS GetFeature request with CQL_FILTERS with SPATIAL OPERATORS does not retrieve correct results

I have a WFS service : https://services.ovam.be/geoserver/wfs?REQUEST=GetCapabilities&SERVICE=WFS Where I'm trying the following: http://services.ovam.be/geoserver/wfs?SERVICE=WFS&REQUEST=...
user avatar
0 votes
1 answer
521 views

OGC WFS CQL Filter XML

Does WFS (specifically we are using geoserver) allow for a 'CQL Filter' to be specified when making a XML request? All the examples that I'm finding are for KVP requests. I don't see why you ...
user avatar
  • 103
0 votes
1 answer
430 views

CQL Concatenation

I would like to use concatenation on a CQL filter being passed to Geoserver, if the filter I was trying to achieve were for Postgres it would look like this: house_name||house_number||streetname ...
user avatar
  • 227