Use FilterFactory2 - it will let you create your filters using plain old expressions (which can be a literal JTS geometry). Sorry the transition is so messy...
If it helps I have updated demo/example (in svn) so you can have a look there ... and started this wiki page (that has some filter examples on it): - http://docs.codehaus.org/display/GEOTDOC/07+FeatureStore Cheers, Jody > Hi, > > Using the deprecated org.geotools.filter.FilterFactory, I could make it > work. May the problem be, that I'm using the SVN version, and there > doesn't exist a working and not depricated solution? > > Thanks, > Peter > > Bolla Péter írta: > >> Hi, >> >> I solved my previous problem about FeatureList by not using it, instead >> using simple java.util.List, and loading the features into it myself. >> >> Now I have a problem with creating a filter. I have some regions (given >> by Polygon geometries), and I'd like to select everything outside of >> these regions. (Not a difficult logic.) >> >> My problem is, that the Filter API uses the GeoAPI Geometry interface, >> while everywhere in my code (and in the GeoTools codebase I used for >> help so far) the JTS Geometry interface is used instead. >> >> I've read in the archives that it is planned to wrap the JTS classes, >> with wrappers that implements the GeoAPI Geometry as well. As I can see >> there is a jts-wrapper module, but it seems unsupported, and I can't get >> it to work. >> >> So my question is, how can I create the filter I described above? >> >> Thank you, >> Peter >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Geotools-gt2-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
