Re: [Geoserver-users] cross layer filtering problem

2012-10-18 Thread Martin Davis
One problem you're encountering is that cross-layer filters work as request
filters, not as SLD filters (as shown in the documentation).

 Another problem you may encounter is that cross-layer filters are executed
internally in GeoServer, so there may be performance issues with large
datasets used as filters.  Have you considered simply filtering by area 
size of feature geometry instead?

On Wed, Oct 17, 2012 at 8:36 PM, cmaul christian.m...@dse.vic.gov.auwrote:

 Common problem: The size of polygons of the cadastre. While they can be
 displayed in rural areas at a scale of 25,000, the map in the city shows a
 solid black. It wouldn’t be a specific Australian problem, I guess Italy
 would be even more extreme with the agrarian factories of the
 Emilia-Romagna, fields of hundreds of hectares and then a medieval town in
 the middle with properties of 200 square metres, if they are even that big.
 O.k you need to filter. I have a generalized map layer called BUILT_UP_AREA
 in a different schema (421 features) which I want to use.

 Install querylayers seems to be o.k.

 WFS-getCapabilities (local 2.2):
 …
 ogc:FunctionName nArgs=1CollectGeometries/ogc:FunctionName
 ogc:FunctionName nArgs=1queryCollection/ogc:FunctionName

 Rather interesting the test geoserver (2.1.3) shows:
 ogc:FunctionName nArgs=-1queryCollection/ogc:FunctionName

 1 param and any, however, so far so good - both are there.

 May be I am wrong here, but in my interpretation SLD uses filters identical
 to WFS. My filter reads as follows:


 ogc:Filter
 ogc:Not
 ogc:Within
 ogc:PropertyNameSHAPE/ogc:PropertyName
   ogc:Function name=collectGeometries
   ogc:Function name=queryCollection
 ogc:Literalsii:VMLITE.VMLITE_BUILT_UP_AREA/ogc:Literal
 ogc:LiteralSHAPE/ogc:Literal
   /ogc:Function
   /ogc:Function
 /ogc:Within
 /ogc:Not
 /ogc:Filter

 First problem in both geoservers:

 SystemID: U:\work\sld2\VICMAP_property_6_cl_filt.sld
 line 30: cvc-complex-type.2.4.a: Invalid content was found starting with
 element 'ogc:Function'. One of '{http://www.opengis.net/gml:_Geometry,
 http://www.opengis.net/gml:Box}' is expected.

 Well I don’t want a box, MultiLineString or whatever, I want a collection
 of
 polygons. O.k. I hit ‘submit’ and hope for the best against better
 knowledge.

 The following is the header of the sld:

 StyledLayerDescriptor xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;
 xmlns=http://www.opengis.net/sld;
 xmlns:ogc=http://www.opengis.net/ogc;
 xmlns:sld=http://www.opengis.net/sld;
 version=1.0.0
 sld:NamedLayer
 sld:NameProperty Map polygons/sld:Name
 sld:UserStyle

 which means in my opinion the sld should know what the tag ogc:Function
 means.
 So when I use the style the not so surprising result is that the filter is
 ignored and the layer is shown. No error, no message, nothing from
 Geoserver
 2.2. If I take the second parameter out (after all WFS in  geoserver2.2
 shows a 1 as args number) and pass in only the layer as a parameter, I get
 the same result.

 How do I change that?

 Geoserver 2.1.3 on the other hand gives me a NullPointer Error:
 java.lang.NullPointerException
 at

 org.geotools.styling.FeatureTypeStyleImpl.setFeatureTypeName(FeatureTypeStyleImpl.java:179)
 at
 org.geotools.styling.SLDParser.parseFeatureTypeStyle(SLDParser.java:782)
 at org.geotools.styling.SLDParser.parseStyle(SLDParser.java:742)
 at
 org.geotools.styling.SLDParser.parseNamedLayer(SLDParser.java:606)
 at
 org.geotools.styling.SLDParser.parseDescriptor(SLDParser.java:413)
 at org.geotools.styling.SLDParser.parseSLD(SLDParser.java:375)
 at org.geoserver.catalog.Styles$Handler$1.parse(Styles.java:277)
 at org.geoserver.catalog.Styles.parse(Styles.java:91)

 and that I would like to change as well.




 -
 

 Dr Christian Maul
 Project Manager

 Information Services Branch
 Department of Sustainability and Environment
 Level13, Marland House, 570 Bourke Street
 Melbourne 3000

 PO Box 500, East Melbourne Vic 3002


 Telephone:+61-3-8636 2325
 Telefax:  +61-3-8636 2813
 --
 View this message in context:
 http://osgeo-org.1560.n6.nabble.com/cross-layer-filtering-problem-tp5009496.html
 Sent from the GeoServer - User mailing list archive at Nabble.com.


 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_sfd2d_oct
 ___
 Geoserver-users mailing list
 Geoserver-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/geoserver-users




-- 
Martin Davis
OpenGeo - http://opengeo.org
Expert service straight from the developers.
--
Everyone hates slow websites. So do we.
Make your web apps faster with 

Re: [Geoserver-users] cross layer filtering problem

2012-10-18 Thread cmaul
Thanks Martin,

that was the answer I feared I would get. 

The filtering by size does not work because there are always little slivers
of riparian, wayside or other sections that would not be shown in the rural
environment or the odd palazzo with big park in the city that would turn up
amongst a white map.

Pity that.

Cheers

Christian



-


Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002


Telephone:+61-3-8636 2325
Telefax:  +61-3-8636 2813
--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/cross-layer-filtering-problem-tp5009496p5009716.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users