Re: [Geotools-gt2-users] What to use instead of Filter?
Yeah :-) You will find I updated the demo/example code to match, and created a CommonFactoryFinder so we can directly use FilterFactory2. Cheers, Jody Ian Turton wrote: OK after some further thinking and more caffeine I now see that should be Filter f = ff.contains(ff.property(geomName),ff.literal(geometry)); So JMapPane on trunk now works using the latest undeprecated filters. Ian - 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] What to use instead of Filter?
On 5/22/07, Ian Turton [EMAIL PROTECTED] wrote: On 5/10/07, Justin Deoliveira [EMAIL PROTECTED] wrote: Hi Ian, Were you creating the geoapi filters using the FilterFactory? I believe you are correct in that that interface has a dependency on geoapi geometry. However the FilterFactory2 interface is an extension which allows you to create filters without geoapi geometries. I realize that isn;t exactly intuitive. We should really clean that up before our 2.4 release... OK I found some time to go back to geotools today and try this. As you say it lacks intuitiveness and documentation, so I'm guessing I do something like Filter f = ff.contains(ff.literal(geomName),ff.literal(geometry)); where ff is a FilterFactory2. OK after some further thinking and more caffeine I now see that should be Filter f = ff.contains(ff.property(geomName),ff.literal(geometry)); So JMapPane on trunk now works using the latest undeprecated filters. Ian -- Ian Turton http://www.geotools.org http://pennspace.blogspot.com/ - 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] What to use instead of Filter?
On 5/10/07, Justin Deoliveira [EMAIL PROTECTED] wrote: Hi Ian, Were you creating the geoapi filters using the FilterFactory? I believe you are correct in that that interface has a dependency on geoapi geometry. However the FilterFactory2 interface is an extension which allows you to create filters without geoapi geometries. I realize that isn;t exactly intuitive. We should really clean that up before our 2.4 release... OK I found some time to go back to geotools today and try this. As you say it lacks intuitiveness and documentation, so I'm guessing I do something like Filter f = ff.contains(ff.literal(geomName),ff.literal(geometry)); where ff is a FilterFactory2. when I do a toString on my filter all looks fine with something like [ the_geom contains POINT (-109.59193420410156 57.7642822265625) ] being returned, sadly the filter never seems to return any features when I query a featureSource with it. So am I missing something obvious or do I need to start stepping through in a debugger to see whats really happening in side. Ian -- Ian Turton http://www.geotools.org http://pennspace.blogspot.com/ - 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] What to use instead of Filter?
On 5/10/07, Justin Deoliveira [EMAIL PROTECTED] wrote: Hi Ian, Were you creating the geoapi filters using the FilterFactory? I believe you are correct in that that interface has a dependency on geoapi geometry. However the FilterFactory2 interface is an extension which allows you to create filters without geoapi geometries. That sounds right, I'll have a try with FF2 and see how it goes. Thanks Ian -- Ian Turton http://www.geotools.org http://pennspace.blogspot.com/ - 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] What to use instead of Filter?
On 5/8/07, Justin Deoliveira [EMAIL PROTECTED] wrote: Hi Gabriella, org.geotools.filter.* classes have been replaced with org.opengis.filter.* in geotools 2.4. The new interfaces are part of the geoapi project. But when I tried to do this upgrade in JMapPane the other week I became stuck as I needed a GeoAPI geometry for my new (GeoAPI) filter and was unable to find any way to create one, and none of the GeoTools geometries seem to implement the GeoAPI interfaces. So I gave up and went back to the deprecated filters. Ian -- Ian Turton http://www.geotools.org http://pennspace.blogspot.com/ - 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Re: [Geotools-gt2-users] What to use instead of Filter?
Hi Ian, Were you creating the geoapi filters using the FilterFactory? I believe you are correct in that that interface has a dependency on geoapi geometry. However the FilterFactory2 interface is an extension which allows you to create filters without geoapi geometries. I realize that isn;t exactly intuitive. We should really clean that up before our 2.4 release... -Justin Ian Turton wrote: On 5/8/07, Justin Deoliveira [EMAIL PROTECTED] wrote: Hi Gabriella, org.geotools.filter.* classes have been replaced with org.opengis.filter.* in geotools 2.4. The new interfaces are part of the geoapi project. But when I tried to do this upgrade in JMapPane the other week I became stuck as I needed a GeoAPI geometry for my new (GeoAPI) filter and was unable to find any way to create one, and none of the GeoTools geometries seem to implement the GeoAPI interfaces. So I gave up and went back to the deprecated filters. Ian -- Justin Deoliveira The Open Planning Project [EMAIL PROTECTED] - 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users