Dear Jody, thanks for your hint and the link. And the ascii art. I completely oversight this.
I have to convert my bbox manually to a Polygon geometry or? I can't find any constructors or conversion methods... thanks again!! Jürgen Jody Garnett schrieb: > If your geometry was a line and the points were to to the left and above > your bounding box you would never find it; even though it does cross. > + line geometry > _/__ > |/ | > /bbox| > /|____| > + > > Please use the JTS Geometry class method for these kinds of tests... > here are my notes: > http://docs.codehaus.org/display/GEOTDOC/Point+Set+Theory+and+the+DE-9IM+Matrix > > > Filter makes use of the same ideas; but is mostly for sending these > kinds of questions off to a database (and having it do the work). > > Jody > > Jürgen Jacob wrote: >> Dear all, >> >> I have a geometry object and a envelope. I want to test if this >> geometry somehow touches the envelope in that way that at least one >> coordinate of this geometry is inside the envelope. >> My straight ahead implementation is: >> >> Coordinate[] coordinates = geometry.getCoordinates(); >> for (Coordinate coordinate:coordinates){ >> if (bbox.contains(coordinate)){ >> return true; >> } >> } >> return false; >> >> Is such a convenience method already existing? (Where?) Or should I >> use the filter? >> >> Thanks, >> Jürgen >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> Geotools-gt2-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >> > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
