> Mathew Yeates wrote: >> Is there an easy way to find the locations in rectangle1 that are >> covered by rectangle2? I couldn't find this anywhere.
On 10/20/2008 7:46 AM Jeff Whitaker apparently wrote: > Mathew: There's nothing included in matplotlib - I recommend Shapely > (http://trac.gispython.org/lab/wiki/Shapely). It's an interface to the > GEOS library, which you already have since you have basemap. Basemap > includes it's own private interface to GEOS, but Shapely has a much > better (although slower), well documented API. But with ordinary rectangles (with sides parallel to the axes), if you can extract their coordinates/size, the analytical problem is trivial: use this info to get the overlap along each axis. If the rectangles share a common transform, this is still pretty easy. So you may be able to avoid a more general solution. I've interpreted the question one way: "covered" might suggest you additionally need the z-order. Cheers, Alan Isaac ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users