Hello Joaquín:
I am following you across lists. WFS is an unsupported module, generally
meaning it does not meet the QA levels expected for GeoTools.
The "pom.xml" file
(http://svn.osgeo.org/geotools/trunk/modules/unsupported/wfs/pom.xml) lists two
contacts as module maintainer: justin and gabriel who I have CCed.
I had a look in the list of open issue for GeoTools WFS:
- http://jira.codehaus.org/browse/GEOT/component/11098
It shows a fairly large number of open issues; including a couple that match
what you are describing. The difference is that your email has enough details
that we could look into what is going on.
Here are the close matches:
- http://jira.codehaus.org/browse/GEOT-3151 Deegree 3 reports WFS-T seriously
broken (references UDIG-1673 )
- http://jira.codehaus.org/browse/GEOT-2112 XML for WFS GetFeature query has
invalid filter
- http://jira.codehaus.org/browse/GEOT-1013 FidFilter not working in WFS data
store?
- http://jira.codehaus.org/browse/GEOT-1499 WFSFeatureSource.getFeatures()
always returns empty set with ALL query
The first one is the best match (and links to UDIG-1673); it ends with the
following comment:
> I talked with Markus and by "nested filter" they mean a filter in which you
> mid fid filters with something else. Fid filters are supposed to be the root
> of the filter, they cannot be mixed with anything else in OGC filter (both
> versions).
> Solving the above it's a matter of splitting the filter and deciding which
> part of it to send the remote wfs.
> Anyways, there is a bigger issue... who's going to fix this one? No
> maintainer....
So I would like to update this bug report with the details you have provided
(and maybe give it a better name so it is easier to find).
--
Jody Garnett
On Friday, 8 April 2011 at 7:49 PM, Joaquín Rodriguez-Guerra Urcelay wrote:
> Hello list
>
> This is the first time I write here, so hello everybody :)
> I have recently started to work in a project using uDig, which works with
> geotools.
>
> The other day I was having an issue with a filter udig was sending to a wfs
> layer. The filter is a fid filter, but geotoool's streaming renderer is
> adding a bbox filter to it, and mapserver is not understanding it probably
> due to an encoding issue.
>
> This is the filter sent by udig to mapserver (failing it due to the filter
> tag contained in the main filter tag):
>
> http://localhost:8080/cgi-bin/mywfs?SERVICE=WFS&VERSION=1.0.0&request=getfeature&typename=PositionReal&Filter=
> <Filter>
> <And>
> <Filter>
> <FeatureId fid="PositionReal.3"/>
> </Filter>
> <BBOX>
> <PropertyName>point</PropertyName>
> <Box>
> <coordinates decimal="." cs="," ts=" ">-100.82219958499486,-57.14285725714286
> 100.82219958499486,57.14285725714286</coordinates>
> </Box>
> </BBOX>
> </And>
> </Filter>
>
> And this is what mapserver understands:
>
> http://localhost:8080/cgi-bin/mywfs?SERVICE=WFS&VERSION=1.0.0&request=getfeature&typename=PositionReal&Filter=
> <Filter>
> <And>
> <FeatureId fid="PositionReal.3"/>
> <BBOX>
> <PropertyName>point</PropertyName>
> <Box>
> <coordinates decimal="." cs="," ts=" ">-100.82219958499486,-57.14285725714286
> 100.82219958499486,57.14285725714286</coordinates>
> </Box>
> </BBOX>
> </And>
> </Filter>
>
> Joddy Garnett helped me in the udig-devel list and he suggested that it could
> be an encoding issue, and maybe using the FilterEncodingPreProcessor we could
> fix it.
>
> I have tried to understand the FilterEncodingPreProcessor, but I am having
> some dificulties. I have created a filter composed by a fid filter and a
> comparation filter. My goal is to have them encoded on the same xml filter,
> but no luck. I have tried the 3 compliance levels, hoping that after
> accepting each visitor (one for each level) in the filter, I would be able to
> invoke visitor.getFilter and obtain the new filter, hopefully one of them
> encoded as I want. So I printed the xml code of the getFilter() filter of
> each visitor, but I guess I didnt unerstand this correctly, right?
>
> CODE:
>
> org.geotools.xml.Configuration conf2 = new
> org.geotools.filter.v1_1.OGCConfiguration();
>
> FilterFactory2 factory = CommonFactoryFinder.getFilterFactory2(null);
> String fid1 = "FID.1";
> Filter fidFilter= createFidFilter("FID.1");
> Filter normalFilter = CQL.toFilter("id = 1");
> Filter filter = factory.and( fidFilter, normalFilter);
>
> FilterEncodingPreProcessor visitor1 = new
> FilterEncodingPreProcessor(XMLHandlerHints.VALUE_FILTER_COMPLIANCE_LOW);
> FilterEncodingPreProcessor visitor2 = new
> FilterEncodingPreProcessor(XMLHandlerHints.VALUE_FILTER_COMPLIANCE_MEDIUM);
> FilterEncodingPreProcessor visitor3 = new
> FilterEncodingPreProcessor(XMLHandlerHints.VALUE_FILTER_COMPLIANCE_HIGH);
>
> System.out.println("LOW");
> Filters.accept(filter, visitor1);
> org.geotools.xml.Encoder encoder = new org.geotools.xml.Encoder(conf2);
> encoder.setIndenting(true);
> encoder.setIndentSize(2);
> encoder.encode(visitor1.getFilter(), org.geotools.filter.v1_1.OGC.Filter,
> System.out );
> encoder = new org.geotools.xml.Encoder(conf2);
> encoder.setIndenting(true);
> encoder.setIndentSize(2);
> encoder.encode( visitor1.getFidFilter(),
> org.geotools.filter.v1_1.OGC.Filter, System.out );
>
> System.out.println("MEDIUM");
> Filters.accept(filter, visitor2);
> encoder = new org.geotools.xml.Encoder(conf2);
> encoder.setIndenting(true);
> encoder.setIndentSize(2);
> encoder.encode( visitor2.getFilter(), org.geotools.filter.v1_1.OGC.Filter,
> System.out );
> encoder = new org.geotools.xml.Encoder(conf2);
> encoder.setIndenting(true);
> encoder.setIndentSize(2);
> encoder.encode( visitor2.getFidFilter(),
> org.geotools.filter.v1_1.OGC.Filter, System.out );
>
> System.out.println("HIGH");
> Filters.accept(filter, visitor3);
> encoder = new org.geotools.xml.Encoder(conf2);
> encoder.setIndenting(true);
> encoder.setIndentSize(2);
> encoder.encode( visitor3.getFilter(), org.geotools.filter.v1_0.OGC.Filter,
> System.out );
> encoder = new org.geotools.xml.Encoder(conf2);
> encoder.setIndenting(true);
> encoder.setIndentSize(2);
> encoder.encode( visitor3.getFidFilter(),
> org.geotools.filter.v1_1.OGC.Filter, System.out );
>
> OUTPUT:
>
>
> LOW
> <?xml version="1.0" encoding="UTF-8"?>
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml">
> <ogc:And>
> <ogc:PropertyIsEqualTo matchCase="true">
> <ogc:PropertyName>id</ogc:PropertyName>
> <ogc:Literal>1</ogc:Literal>
> </ogc:PropertyIsEqualTo>
> </ogc:And>
> </ogc:Filter>
> <?xml version="1.0" encoding="UTF-8"?>
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml"/>
> MEDIUM
> <?xml version="1.0" encoding="UTF-8"?>
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml"/>
> <?xml version="1.0" encoding="UTF-8"?>
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml">
> <ogc:FeatureId fid="FID.1"/>
> </ogc:Filter>
> HIGH
> <?xml version="1.0" encoding="UTF-8"?>
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml"/>
> <?xml version="1.0" encoding="UTF-8"?>
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml">
> <ogc:FeatureId fid="FID.1"/>
> </ogc:Filter>
>
> are we on the right track? any close to the solution?
>
> Thank you!
>
> Joaquín
> ______________________
> This message including any attachments may contain confidential
> information, according to our Information Security Management System,
> and intended solely for a specific individual to whom they are addressed.
> Any unauthorised copy, disclosure or distribution of this message
> is strictly forbidden. If you have received this transmission in error,
> please notify the sender immediately and delete it.
>
> ______________________
> Este mensaje, y en su caso, cualquier fichero anexo al mismo,
> puede contener informacion clasificada por su emisor como confidencial
> en el marco de su Sistema de Gestion de Seguridad de la
> Informacion siendo para uso exclusivo del destinatario, quedando
> prohibida su divulgacion copia o distribucion a terceros sin la
> autorizacion expresa del remitente. Si Vd. ha recibido este mensaje
> erroneamente, se ruega lo notifique al remitente y proceda a su borrado.
> Gracias por su colaboracion.
>
> ______________________
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users