Yes; although it amounts to setting up your geometry filter to match your definition of "near". What is your definition of near? Cheers, Jody > Is there any way to skip the loop in step (2)? > gaby > > >>>> Jody Garnett <[EMAIL PROTECTED]> 12/11/07 11:02 am >>> >>>> > When you get back the feature collection of those things "near" to A; > you can call the Collection_Max function on the featurecollection > directly; this is way faster (and may be optimzied into SQL if your > datastore is backed by SQL): > > - > http://docs.codehaus.org/display/GEOTDOC/10+FeatureCollection+Aggregate+Functions > > > Cheers, > Jody > > Gabriella Turek wrote: > >> I have two shape files, call them A and B. I need to: >> (1) find out the features in B that are "near" to each feature in A. >> (2) Interrogate an attribute value of these "near" features and pick the >> highest value. >> >> I actually figured out how to do it, but I don't think I am doing it >> "right", i.e. using all the tools >> at my disposal. >> >> My steps are: >> (1) creat up geometry filter to find features in B close to A >> (2) loop thru each feature in A to find these "near" B features >> (3) when one is found, interrogate attribute value and establish if it's a >> new max >> >> I get the nagging feeling that I dont' need to do this looping and that - >> moreover - I can >> have yet another filter which looks for my max value. I've tried a few >> things with little success. >> Any help will be greatly appreciated. >> Gaby >> >> >> >> >> ** Gabriella Turek [EMAIL PROTECTED] >> ** National Institute of Water & Atmospheric Research (NIWA) >> ** PO Box 8602 Christchurch New Zealand +64-3-343-8067 >> >> >> >> ------------------------------------------------------------------------- >> SF.Net email is sponsored by: >> 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 >> Geotools-gt2-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >> >> > > >
------------------------------------------------------------------------- SF.Net email is sponsored by: 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users