0

WMS 1:

http://localhost:8080/geoserver/mtm/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng8&TRANSPARENT=true&layers=copper_cable&tiled=true&tilesorigin=-20037508.34%2C-20037508.34&viewparams=import_job_code%3Anull&cql_filter=id%20%3D%274ABC-01-12-ABC-108%27&CRS=EPSG%3A3857&STYLES=&WIDTH=2858&HEIGHT=778&BBOX=17003975.290642627%2C-3209930.007007534%2C17005681.98616457%2C-3209465.4131950526

WMS 2:

http://localhost:8080/geoserver/mtm/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng8&TRANSPARENT=true&layers=copper_cable&tiled=true&tilesorigin=-20037508.34%2C-20037508.34&viewparams=import_job_code%3Anull&cql_filter=id%20IN(%274ABC-01-12-ABC-108%27)&CRS=EPSG%3A3857&STYLES=&WIDTH=2858&HEIGHT=778&BBOX=17003975.290642627%2C-3209930.007007534%2C17005681.98616457%2C-3209465.4131950526

In WMS 1 I am using CQL_Filer has operator '=' and is working fine

In WMS 2 I am using CQL_Filter has operator "IN" and is not workig.

closed as unclear what you're asking by Kadir Şahbaz, aldo_tapia, Vince, Mark Ireland, Dan C Aug 9 '18 at 14:58

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1

Your second query partly URL-decoded for clarity: cql_filter=id IN('4ABC-01-12-ABC-108')).

The IN part is using correct syntax and you can test that it works with this query:

https://demo.geo-solutions.it/geoserver/wfs?service=wfs&version=1.1.0&request=getfeature&typename=topp:states&propertyname=STATE_NAME&CQL_FILTER=STATE_NAME IN ('Illinois')

It may be that your problem is connected to making a query by attribute "id". As documented in http://docs.geoserver.org/stable/en/user/tutorials/cql/cql_tutorial.html feature id's are used in a specific way in CQL_FILTER. Try to write the filter without specifying any attribute

cql_filter=IN('4ABC-01-12-ABC-108')

If this does not work and if you do not get more feedback from gis.stackexchange I suggest to write a mail to the geoserver-users mailing list.

  • Thanks for the quick replay. As you mentioned the issue is because of "id".But cql_filter=IN('4ABC-01-12-ABC-108') is not working . – Sumesh S.G Aug 9 '18 at 1:41
  • will follow your suggestion. – Sumesh S.G Aug 9 '18 at 2:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.