Hi Saul,

I guess with Jody's and Justin's replies you might get a good understanding on 
how to use the GeoAPI filters.

For the sake of unit tests, maybe you could have an easier time using the CQL 
module?
for example, to replace the following test
public void testDisjointFilter() throws Exception {
        FeatureType ft = this.dataStore.getSchema("SDE.SDE.JAKARTA");

        // Build the filter
        FilterFactory ff = FilterFactoryFinder.createFilterFactory();
        GeometryFilter filter = 
ff.createGeometryFilter(FilterType.GEOMETRY_DISJOINT);
        filter.addLeftGeometry(ff.createAttributeExpression(ft, "SHAPE"));

        double minx = 106.62;
        double maxx = 106.727;
        double miny = -6.24;
        double maxy = -6.16;
        Polygon p = buildPolygon(minx, miny, maxx, maxy);
        filter.addRightGeometry(ff.createLiteralExpression(p));

        runTestWithFilter(ft, filter);
    }

by:

public void testDisjointFilter() throws Exception {
        FeatureType ft = this.dataStore.getSchema("SDE.SDE.JAKARTA");
        Filter filter = 
CQL.toFilter("DISJOINT(SHAPE, 'POLYGON((106.62 -6.24 ,106.62 -6.16, 
106.727 -6.16, 106.727 -6.24 , 106.62 -6.24))' )" );
        runTestWithFilter(ft, filter);
    }


Gabriel

On Thursday 01 March 2007 23:53, Jody Garnett wrote:
> Hi Saul:
>
> I tried to capture what is needed here:
> -
> http://docs.codehaus.org/display/GEOTOOLS/Upgrade+to+2.4#Upgradeto2.4-filte
>r
>
> If you find anything else let me know.
> Jody
>
> > Hey all,
> >
> > I'm trying to learn/test the new opengis filter code.  I'm porting the
> > ArcSDE JUnit tests over to the new opengis filters, but I'm having a
> > tough time figuring out an example of how to use them.
> >
> > Any hints/pointers to some good code that will light my way?
> >
> > thanks!
> > --saul
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your opinions on IT & business topics through brief surveys-and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Geotools-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to