Hot answers tagged

6

The WMS layer object provides a setParams method that will do what you need. From the docs: setParams(<Object> params, <Boolean> noRedraw?): Merges an object with the new parameters and re-requests tiles on the current screen (unless noRedraw was set to true). Here is a fork of your fiddle that demonstrates it. The relevant code is in ...


3

When the plugin was developed Filter was the only way to force usage of a spatial index. Maybe more recent versions of SQLServer do not have this requirement anymore and will leverage the spatial index seeing a simple STWithin? As an alternative hypothesis, the query above is using the spatial index in a case where it would be better to do a full scan, e.g, ...


3

The WFS specification does not allow aggregation, the filter, regardless of the language used is the equivalent of a "where" clause only. If you need aggregation you'll have to combine WFS with WPS, do the filtering in a WFS request and then pipe it into a "Aggregate" process. Try using the "WPS request builder" to setup a template of your layer of choice (...


3

The CQL is defined by the OGC as part of the catalogue service (i.e. CSW) model specification. See http://docs.opengeospatial.org/is/12-168r6/12-168r6.html for the current (as of July 2016) version. GeoTools claims support for 2.0.1, which you can find linked off http://www.opengeospatial.org/standards/cat in the deprecated spec section. For the GeoTools ...


3

It really depends on what language you trying to use but something like the following should work. public class EscapeCQL { public static void main(String[] args) { String test = "Man'ar"; System.out.println(test); System.out.println(EscapeCQL.escapeCQL(test)); } static public String escapeCQL(String cql) { return cql.replace("'", "''...


3

CQL (Common Query Language) is a query language created by the OGC for the Catalogue Web Services specification. Unlike the XML-based Filter Encoding language, CQL is written using a familiar text-based syntax. It is thus more readable and better-suited for manual authoring. Filter is (usually) an OGC filter which is expressed in XML and is more suited for ...


3

I think you are being bitten by loose bounding box comparisons since technically this polygon doesn't intersect any features. POLYGON((123664.03100000322 210489.5150000006, 123705.24599999934 210489.5150000006, 123705.24599999934 210587.86800000072, 123664.03100000322 210587.86800000072, 123664.03100000322 210489.5150000006)) But if I ...


3

Check also the schema with DescribeFeatureType. https://openmaps.gov.bc.ca/geo/pub/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&typenames=WHSE_IMAGERY_AND_BASE_MAPS.GSR_AIRPORTS_SVW <?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:pub="http://openmaps.gov.bc.ca/geo/" xmlns:...


2

It is on https://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html Like function (implemented on org.geotools.filter.LikeFilterImpl Geotools class) is used as following example: field LIKE '%pattern%' Now for the entire row (all columns) concatenation you could use the concatenate function: concatenate(field1,field2) Finally I recommend ...


2

Looking at the logs, CQL does't accept IN after strToLoweCase Caused by: org.geotools.filter.text.cql2.CQLException: Encountered "in" at line 1, column 28. Was expecting one of: <EOF> "and" ... "or" ... ";" ... "*" ... "/" ... "+" ... "-" ... "not" ... "like" ... "ilike" ... "exists" ... "does-not-...


2

The filter format is defined by the standard so I don't think you will find any WFS that accepts anything but OGC filters in the request. I wrote a simple program a while ago to convert ECQL to OGC filters for you. So the functionality could be added to GeoServer fairly easily as a vendor extension - see the feature request guidelines for more details of ...


2

If you can administer the server just go into the "layer" panel to get the list of attribute names. If not admin rights, you can still run a WFS DescribeFeatureType against that same layer and the returned XML schema will contain the attribute names as elements. If you cannot do even that (because maybe WFS has been disabled), try to run a GetFeatureInfo ...


2

Can you check below code? I added comments about the errors you listed. var map = L.map('map').setView([39.707045, -104.940817], 12); var sql_text = '1=1'; var topPane = map.createPane('leaflet-top-pane', map.getPanes().mapPane); var bottomPane = map.createPane('leaflet-bottom-pane', map.getPanes().tilePane); //load maps //load google ...


2

BBOX is making a comparison of the bounding boxes of the features intersect and Intersects is checking if the features really intersect. In your case the features are very large multipolygons with huge bounding boxes. Therefore both the empty result from Intersects and 5 features with BBOX are correct. Your search box is too little to even show in this ...


1

It seems the CQL_FILTER can have a ; as delimiter. Specifiying a filter for each TYPENAME. Using request : https://geo.onroerenderfgoed.be/geoserver/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&CRS=EPSG:31370&OUTPUTFORMAT=application/json&TYPENAME=vioe_geoportaal:vast_htp,vioe_geoportaal:vast_dibe_relict&CQL_FILTER=INTERSECTS(...


1

The responses to another question on Stack gave me the answer I was looking for. I was able to make use of the custom parameters (see linked question for samples) on the WMS layer in ArcMap to filter to a particular species. In short, with ArcMap 10.4 and up, you can specify custom parameters by double-clicking the name of the WMS service (note that you must ...


1

Create a view into your database and cast numbers to strings with to_char https://www.postgresql.org/docs/9.3/static/functions-formatting.html. Publish the view with GeoServer and your numbers should be seachable with ilike.


1

@Paul Wittle , As the matter of fact there is WFS filter that support POST (I am not sure if it fully support CQL and/or ECQL ) but it does have support for some filters. have a look at examples here https://openlayers.org/en/latest/examples/vector-wfs-getfeature.html?q=wfs+filter so not only there is support in Geoserver for wfs POST filter, openlayers ...


1

To add a definitive answer for the record the simple answer is that WFS does not allow CQL or ECQL as the filter. It appears that some WFS providers such as GeoServer may permit you to pass a CQL filter in a GET request but GeoServer does not support this for the POST request. Extensions do exist which may add this functionality by converting to OGC ...


1

The problem was that my SRS handling setting (in Edit Layer) on GeoServer was set to 'Force declared'. And it did not get declared in my query, so GeoServer defaulted to -1, and tried to mix that with an SRID of 3857, resulting in the error about "mixed SRID geometries". In any case, by changing the SRS handling setting to 'Keep native', the problem is ...


1

Looks like you are using a "sql view" (otherwise the vtable construct would not be there). Did you correctly configure the srid in the geometry column of the sql view?


Only top voted, non community-wiki answers of a minimum length are eligible