There are two possible solutions to this:
Ask the related WFS for a description of the featureType using https://idena.navarra.es/ogc/wfs?request=DescribeFeatureType&typeName=CATAST_Pol_Municipio&version=1.1.0 which returns:
As a fuller answer if you want to use this code in GeoTools v21+ you need to change the imports to be:
and the dependancies to:
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:
Finally I recommend ...
If you are trying to filter two distinct layers then you need to separate the filters with ; but if you are trying to combine two (or more) filters on a single layer then you need to use and or or as joining commands.
So in your case I would apply:
strSubstring(FecRegistro,0,4)=2018 or strSwhubstring(codigo,0,3)='201'
which will return all filters which ...
if you are using PyQgis 2.x
registry = QgsMapLayerRegistry.instance() urlWithParams =
579465,125671,664692,167717)" rlayer = QgsRasterLayer (urlWithParams
(E)CQL provides no mechanism for specifying the projection of a geometry and always assumes that it is in the same projection as the data being queried. So you will need to do the reprojection in the client.