UNOFFICIAL

Hi GeoServer users group,

I have an SLD filter issue when using the ogc:Or logical operator with a layer 
created using app-schema - where no features are displayed when there should be.
The issue only presents if the comparison operators are both the same. If they 
are not identical, ie <PropertyIsEqualTo> and <PropertyIsNotEqualTo>, or if the 
or is wrapped in an <ogc:Not>, then it works.

Have any other app schema users have encountered the same issue in SLD filters 
or are able to test their service?

This filter syntax should work according to the documentation, and it works 
correctly on the demo topp:Tasmania_roads layer. It looks like a bug, but it 
would be good to confirm this.

<ogc:Filter>
                <ogc:Or>
                                <ogc:PropertyIsEqualTo>
                                                
<ogc:PropertyName>mt:tenementType</ogc:PropertyName>
                                                <ogc:Literal>exploration 
licence</ogc:Literal>
                                </ogc:PropertyIsEqualTo>
                                <ogc:PropertyIsEqualTo>
                                                
<ogc:PropertyName>mt:tenementType</ogc:PropertyName>
                                                <ogc:Literal>exploration 
licence application</ogc:Literal>
                                </ogc:PropertyIsEqualTo>
                </ogc:Or>
</ogc:Filter>


The only obvious issue in the logs is that the renderer packages is not logging 
any label or polygon hit counts, where the other filter variances mentioned 
above do.

24 Nov. 17:05:05 DEBUG  [geotools.jdbc] - CREATE CONNECTION
24 Nov. 17:05:05 TRACE  [data.jdbc] - exporting LogicFilter
24 Nov. 17:05:05 TRACE  [data.jdbc] - exporting PropertyName
24 Nov. 17:05:05 DEBUG  [data.util] - CRSConverterFactory can be applied from 
Strings to CRS  only.
24 Nov. 17:05:05 DEBUG  [data.util] - InterpolationConverterFactory can be 
applied from Strings to Interpolation only.
24 Nov. 17:05:05 TRACE  [data.jdbc] - exporting PropertyName
24 Nov. 17:05:05 DEBUG  [appschema.jdbc] - SELECT 
AUSCOPE.MT_MINERALTENEMENT.SHAPE as 
SHAPE,AUSCOPE.MT_MINERALTENEMENT.NAME,AUSCOPE.MT_MINERALTENEMENT.GMLID,AUSCOPE.MT_MINERALTENEMENT."TYPE"
 FROM AUSCOPE.MT_MINERALTENEMENT INNER JOIN ( SELECT DISTINCT 
MT_MINERALTENEMENT.GMLID FROM AUSCOPE.MT_MINERALTENEMENT WHERE 
(SDO_FILTER(SHAPE, ?, 'mask=anyinteract querytype=WINDOW') = 'TRUE'  AND "TYPE" 
IN (?, ?)) ) TEMP_ALIAS_USED_FOR_FILTER ON ( MT_MINERALTENEMENT.GMLID = 
TEMP_ALIAS_USED_FOR_FILTER.GMLID )  ORDER BY AUSCOPE.MT_MINERALTENEMENT.GMLID 
ASC
24 Nov. 17:05:05 DEBUG  [oracle.sdo] - Using layer SRID: 7844
24 Nov. 17:05:05 DEBUG  [geotools.jdbc] - Setting parameter 1 as 
MDSYS.SDO_GEOMETRY(2003,7844,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(126.89208984375,-39.7265625,143.85498046875,-24.3017578125))
24 Nov. 17:05:05 DEBUG  [geotools.jdbc] - 1 = POLYGON ((126.89208984375 
-39.7265625, 143.85498046875 -39.7265625, 143.85498046875 -24.3017578125, 
126.89208984375 -24.3017578125, 126.89208984375 -39.7265625))
24 Nov. 17:05:05 DEBUG  [geotools.jdbc] - 2 = exploration licence
24 Nov. 17:05:05 DEBUG  [geotools.jdbc] - 3 = exploration licence application
24 Nov. 17:05:05 TRACE  [complex.filter] - ENTRY 
FeatureImpl:MineralTenement<MineralTenementType id=mt.mineraltenement.1>=[] 
mt:name 1997/00321 null null
24 Nov. 17:05:05 TRACE  [complex.filter] - ENTRY 
FeatureImpl:MineralTenement<MineralTenementType 
id=mt.mineraltenement.1>=[AttributeImpl:name<string>=1997/00321] 
mt:tenementType exploration licence application null null
24 Nov. 17:05:05 TRACE  [complex.filter] - ENTRY 
FeatureImpl:MineralTenement<MineralTenementType 
id=mt.mineraltenement.1>=[AttributeImpl:name<string>=1997/00321, 
AttributeImpl:tenementType<string>=exploration licence application] mt:shape 
MULTIPOLYGON (((132.001338104 -27.415223005, 132.001336309 -27.26522233, 
131.918003683 -27.265223117, 131.918005067 -27.381890311, 131.834672442 
-27.381891101, 131.834670866 -27.248557163, 131.584672966 -27.248559529, 
131.584674951 -27.415226966, 131.784673265 -27.415225063, 132.001338104 
-27.415223005))) null null
...
24 Nov. 17:05:05 DEBUG  [geotools.jdbc] - CLOSE CONNECTION
24 Nov. 17:05:05 DEBUG  [renderer.label] - TOTAL LINE LABELS : 0
24 Nov. 17:05:05 DEBUG  [renderer.label] - PAINTED LINE LABELS : 0
24 Nov. 17:05:05 DEBUG  [renderer.label] - REMAINING LINE LABELS : 0
24 Nov. 17:05:05 DEBUG  [renderer.lite] - Style cache hit ratio: NaN , hits 0, 
requests 0
...



Wrapping the same Filter in a logical ogc:Not operator works correctly, and the 
renderer packages is correctly logging label and feature counts.

<ogc:Filter>
                <ogc:Not>
                                <ogc:Or>
                                                <ogc:PropertyIsEqualTo>
                                                                
<ogc:PropertyName>mt:tenementType</ogc:PropertyName>
                                                                
<ogc:Literal>exploration licence</ogc:Literal>
                                                </ogc:PropertyIsEqualTo>
                                                <ogc:PropertyIsEqualTo>
                                                                
<ogc:PropertyName>mt:tenementType</ogc:PropertyName>
                                                                
<ogc:Literal>exploration licence application</ogc:Literal>
                                                </ogc:PropertyIsEqualTo>
                                </ogc:Or>
                </ogc:Not>
</ogc:Filter>

And in the logs the renderer package does register the label an polygon counts
...
24 Nov. 17:27:46 DEBUG  [geotools.jdbc] - CLOSE CONNECTION
24 Nov. 17:27:47 DEBUG  [renderer.label] - TOTAL LINE LABELS : 1,683
24 Nov. 17:27:47 DEBUG  [renderer.label] - PAINTED LINE LABELS : 0
24 Nov. 17:27:47 DEBUG  [renderer.label] - REMAINING LINE LABELS : 1,683
24 Nov. 17:27:47 DEBUG  [renderer.lite] - Style cache hit ratio: 
0.9994058229352347 , hits 1682, requests 1683
...



I'm testing on v2.24.0

Thanks in advance!

Ursula


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to