What version are you using? I have been noticing some problems with WFS 
filter encoding in GeoTools 2.6; the last version that was known to work 
for uDig was GeoTools 2.2....

Can you be more specific about what you are doing? Which filter is 
having problems ... Feature ID? Spatial Filter? Attribute tests? You can 
include some code in your email if that will help explain ...
DefaultQuery query = new DefaultQuery( "city", .... );
query.setFilter( CQL.toFilter("NAME = 'victoria'") );

FeatureSource source = datastore.getView( query );
FeatureCollection features = source.getFeatures( CQL.toFilter("THE_GEOM 
contains POINT(12,3)") );

is exactly the same as issuing....

FeatureSource source = datastore.getFeatureSource( "city" );
FeatureCollection features = source.getFeatures( CQL.toFilter("NAME = 
'victoria' AND THE_GEOM contains POINT(12,3)");

Any problems you are seeing are due to either:
- the capabilities document of the WFS you are hitting? (Does it support 
the filter you are trying to write? - if not geotools will request more 
data; and perform some filtering on the client side)
- straight problems encoding the filter (I fixed one of these last week 
for a customer)

Also not there are some "strict" or "lax" modes for the WFSDataStore ... 
that control how careful it is about making valid Filter requests; and 
how careful it is when reading in the resulting data (can it recover if 
the WFS server is inconsistent - usually servers are not careful about 
returning data in the order they advertise in the DescribeFeatureType 
operation?)

Cheers,
Jody

Tertre Francois wrote:
> Hi the list,
>
> I try to add a filter to a query to a WFSDatastore, but at the getFeature
> request and not after, but I have only the filter which happen after the
> getFeature request.
>
> I have tried to use WFSDatastore.getView(Query) with a Filter in my Query,
> to use a WFSDataStore with the same Query which include the filter, and I
> always have the filtering after the request.
>
> Is anyone have a solution to this problem ?
>
> Thanks,
>
> ________________
> François Tertre
> BRGM STI/AD
> 3, avenue Claude Guillemin
> BP 6009 - 45060 Orléans Cedex 2
> France
> Web: http://www.brgm.fr
>
>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>   


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to