Hi. I am using GeoTools 2.4.4. I have a ReferencedEnvelope, and I am
trying to create a org.opengis.filter.spatial.Contains filter to see if
a feature's geometry contains the envelope. I tried:
ReferencedEnvelope bounds = ...;
FilterFactory2 ff =
CommonFactoryFinder.getFilterFactory2(GeoTools.getDefaultHints());
PropertyName propertyName = ff.property("the_geom");
Literal geometry = ff.literal(bounds);
Filter filter = ff.contains(propertyName, geometry);
But this fails trying to encode the envelope. What is the preferred way
of converting the envelope into some geometrical object that can be encoded?
Thanks,
--David Gadbois
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users