[Geoserver-devel] [JIRA] (GEOS-8167) SLD, OGC Filter, Or clause, IS NOT NULL

Sorin Dudui created an issue

GeoServer / BugGEOS-8167

SLD, OGC Filter, Or clause, IS NOT NULL

Issue Type:

BugBug

Affects Versions:

2.11.0

Assignee:

Unassigned

Attachments:

sld1.xml, sql.txt

Components:

PostGIS

Created:

02/Jun/17 2:33 PM

Priority:

MediumMedium

Reporter:

Sorin Dudui

Hi

we access the WMS service by sending a request having a ogc:Filter. The Geoserver interprets the filter and creates SQL likes:

SELECT "gid",encode(ST_AsBinary(ST_Simplify(ST_Force2D("the_geom"), 488.15834624618293, true)),'base64') as "the_geom" FROM "public"."points_view" WHERE ("the_geom" && ST_GeomFromText('POLYGON ((309613.80322206434 5989409.96286553, 309613.80322206434 6289017.14787394, 1313683.0713944233 6289017.14787394, 1313683.0713944233 5989409.96286553, 309613.80322206434 5989409.96286553))', 3857) AND (("gid" = 39513 AND "gid" IS NOT NULL ) OR ("gid" = 39516 AND "gid" IS NOT NULL ) OR ("gid" = 39509 AND "gid" IS NOT NULL ) OR ("gid" = 39570 AND "gid" IS NOT NULL ) OR ("gid" = 39572 AND "gid" IS NOT NULL ) OR ("gid" = 39573 AND "gid" IS NOT NULL ) OR ("gid" = 39750 AND "gid" IS NOT NULL ) OR ("gid" = 40171 AND "gid" IS NOT NULL ) OR ("gid" = 40305 AND "gid" IS NOT NULL ) OR ("gid" = 40456 AND "gid" IS NOT NULL ) OR ….

There are case where we have to wait 20 sec. for postgres to respond. With the “gid” IS NOT NULL part out the Query is 2 sec long.

Below is the SLD we send.

<ogc:Filter><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>gid</ogc:PropertyName><ogc:Literal>39513</ogc:Literal></ogc:PropertyIsEqualTo><ogc:PropertyIsEqualTo><ogc:PropertyName>gid</ogc:PropertyName><ogc:Literal>39516</ogc:Literal></ogc:PropertyIsEqualTo><ogc:PropertyIsEqualTo><ogc:PropertyName>gid</ogc:PropertyName><ogc:Literal>39509</ogc:Literal></ogc:PropertyIsEqualTo><ogc:PropertyIsEqualTo><ogc:PropertyName>gid</ogc:PropertyName><ogc:Literal>89082</ogc:Literal></ogc:PropertyIsEqualTo><ogc:PropertyIsEqualTo><ogc:PropertyName>gid</ogc:PropertyName><ogc:Literal>89150</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Or></ogc:Filter>

Thank You,
Sorin

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.1026.0#100045-sha1:82b14bc)

Atlassian logo