Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cql-filter]

To filter data using the Common Query Language

0
votes
0answers
18 views

GeoServer 2.14 Preview Layer Group - is there a way to get CQL to filter just one layer of the group?

I have a base layer and a point layer defined in GeoServer, let's call them LayerBase and LayerPoint. I want to see one rendered on top of the other. So I created a Layer Group, let's call it ...
2
votes
2answers
22 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 ...
0
votes
1answer
28 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
25 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
71 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 ...
1
vote
1answer
180 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
91 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
93 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-...
1
vote
1answer
254 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 ...
1
vote
1answer
175 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 ...
2
votes
1answer
114 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=...
1
vote
1answer
371 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': [ '...
0
votes
2answers
119 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
41 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
0answers
234 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=...
3
votes
1answer
103 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 ...
1
vote
1answer
462 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,...
1
vote
0answers
191 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 ...
2
votes
1answer
473 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: &...
2
votes
2answers
478 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=...
0
votes
1answer
278 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 ...
0
votes
1answer
90 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 ...
1
vote
0answers
196 views

Help with WFS Filter request

I'm trying to download all features from this WFS: capabilities, describefeaturetype It's working fine with the most simple requests like: getfeatures But now, I need >all< features in the ...
3
votes
2answers
285 views

cql_filter with strToUpperCase() fails with “Cannot do natural order without a primary key”

I'm trying to convert a query into uppercase in a GeoServer WFS request. According to the Filter Function reference this can be achieved using strToUpperCase(). This is working successfully on a ...
1
vote
0answers
543 views

CQL Filter for geoserver geojson service with fields with space

I have trouble with CQL filter in geojson. The CQL filter that I want: "Sector Catastral" = 'VERONA' The URL that compose for this purpose: http://localhost:3000/geoserver/SIGUD/ows?service=WFS&...
1
vote
1answer
533 views

How to use CQL to return a geometry type?

I would like to use CQL in a URL call to return only a particular geometric type from a WFS that broadcasts multiple geometries. I have been going over this: http://docs.geoserver.org/latest/en/user/...
0
votes
0answers
553 views

How to use CQL_FILTER as URL encoded parameter to compare a field containing numbers

I want to apply the CQL_FILTER parameter as an URL parameter in order to filter a field containing numbers (zip codes) starting with 79 (using 79% Wildcard) for instance. So I'm using this CQL_FILTER:...
3
votes
0answers
109 views

Geoserver: how to filter a layer related to another layer?

I have the following problem: I have 2 vector layers from PostGIS datastores: "firepoints" and "threats". The corresponding tables "firepoints" and "threats" have IDs and other attributes. They are ...
1
vote
0answers
121 views

Not possible to print GeoServer layers with CQL filters

I use geoexplorer together with GeoServer and mapfish. I make a WMS request passing in it two layers with corresponding CQL filters. I make this request through Geoexplorer to GeoServer. This works ...
1
vote
0answers
154 views

Two CQL Filter not working on a layer

I have wms layers like: LAYERS=layer1,layer2&CQL_FILTER=(type=10);INCLUDE it works fine but when I add another filter with 'and' operator to layer 1 it does not show on map. I am adding second ...
1
vote
1answer
92 views

geotools filter CQLException: Encountered “t”

I am querying a simple feature type schema: r:Long:index=join,*g:Point:srid=4326,di:Integer:index=join,al:Float,s:Float,b:Float,an:Float,he:Float,ve:Float,t:Float,m:Boolean,i:Boolean,ts:Long;geomesa....
1
vote
1answer
469 views

How to convert int to string in CQL filter GeoServer?

I want to filter columns in GeoServer WMS layer using 'ilike'. I tried following cql query. "column_name" ilike 'string' It works for columns of datatype string, not working for integer columns. ...
1
vote
1answer
395 views

What is the difference between CQL_FILTER and FILTER?

In a CSW request what is the difference between the parameters CQL_FILTER and FILTER ? Examples: localhost:8080/geonetwork/srv/eng/csw?REQUEST=GetRecords&CONSTRAINT_LANGUAGE_VERSION=1.1.0&...
1
vote
0answers
67 views

OpenLayers 2 WMS CQL_Filter with diacritic

I´m using GeoServer where I can query WMS services to get image from a CQL Filter query. The URL for the service looks like: http://myserver/ows/LIMITS_ADM/wms?LAYERS=LIMADM_MUNICIPI&TRANSPARENT=...
0
votes
0answers
581 views

How to find legal WFS property name on GeoServer?

I am querying a GeoServer using a CQL filter and testing it via browser url. My filter appears to be correct per documentation: https://myserver/geoserver/ows?service=WFS&version=2.0.0&...
5
votes
1answer
448 views

Using CQL for a poor man's temporal filter on a server offering only WFS 1.1.0

There's a WFS I'm accessing via script to pull in features that will match a particular day. The attribute I care about in the output is DATE_TIME. However because it's WFS 1.1.0 it does not support ...
0
votes
2answers
159 views

Is there an ArcObjects equivalent to the CQL filter when working with WMS layers?

Is there an ArcObjects equivalent to the CQL filter when working with WMS layers? I have reviewed the documentation, but can't identify any way of filtering a WMS service. Can anyone point me in the ...
2
votes
1answer
432 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.: ...
0
votes
1answer
2k 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=...
1
vote
1answer
491 views

GeoServer (CQL) query to return just the boundary polygon of a filtered feature

I have a polygon layer (in GeoServer). The goal is to just get the bounding box of a filtered feature. From the (E)CQL docs I thought the boundary filter should do the work, but I could not get it to ...
0
votes
0answers
152 views

How to optimize the WFS service's CQL and ECQL?

I am using wfs cql filters to get the attribute data but when the cql filter selects a large dataset say 1000+ point data the response time is large. How can I optimize cql filter ? The following ...
1
vote
0answers
436 views

OpenLayers getfeatureinfo shows all features, even with CQL filter

I have a map with several CQL filters that a user can use in my website. When the user applies the CQL filter, I want them to be able to use getfeatureinfo which only shows features from the CQL ...
2
votes
2answers
173 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()...
3
votes
1answer
1k views

How to use NOT IN correctly in a WFS CQL attribute filter?

I am using a WFS of road centrelines available here for a small mapping project in QGIS. There are a number of features in my area of interest that I just want to exclude. I figured that an attribute ...
1
vote
2answers
379 views

Inconsistent CQL Filtering w/ Geoserver

I am trying to utilize Geoserver's geometric filters to show subsets of a large number of polygons, but am getting inconsistent results. I am testing CQL statements in the 'Edit Layer' page on ...
1
vote
1answer
802 views

Non-english Characters in cql filter in GeoServer

I have a shapefile loaded in GeoServer 2.8 and accessed by OpenLayers 2.13. This layer is in UTF-8 encoding and has some english and non-english records. When i use english fields in cql-filter - as ...
0
votes
1answer
131 views

returning extent for the selected features from microsoft sql server in geoserver

I have data in the GeoServer coming from Microsoft's SQL server. I want to use CQL filter with WMS to query and get 4000k records as a result. I need to know is there any way my CQl filter with WMS or ...
3
votes
1answer
2k views

geotools cql full syntax and examples [closed]

You know you can use CQL to create GeoTools Filter used when filtering FeatureCollection. GeoTools 16 user guide has made a quick tutorial and examples for CQL strings like the following ones: ATTR1 &...
1
vote
1answer
550 views

How to perform dynamic filtering of multiple check boxes using cql_filter and openlayers javascript?

I have multiple checkboxes for example hospital checkbox where hospital datasets get displayed when checked, phase 1 check box where phase 1 hospitals get displayed when checked and grade A and B ...
1
vote
2answers
429 views

How to give multiple user input CQL filters to a single layer using Geoserver?

I have a layer in which I need to apply multiple check box filters. For example, I need to filter a layer based on state, city and some other attribute based on user input/ CQL filter. Basically, I ...