From: John H. <jdh...@ac...> - 2004-12-29 03:44:23
|
>>>>> "Jeff" == Jeff Whitaker <js...@fa...> writes: Jeff> I'm currently working on a map plotting module. I've added Jeff> the ability to plot filled continents on various map Jeff> projections, using the GSHHS coastline polygon dataset Jeff> (http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html). This Jeff> dataset provides polygon segments that define continental Jeff> outlines. However, before I post it here I'd like to also Jeff> provide the capability to fill the 'wet' areas as well. In Jeff> order to do this I need to figure out how to fill the area Jeff> between the polygons. Looks like this module Jeff> (http://www.dezentral.de/soft/Polygon/index.html) would do Jeff> the trick, but it requires the generaly polygon clipping C Jeff> library. Do you have any suggestions? agg actually includes a wrapper for gpc, as well as the gpc code itself, but gpc is GPLd and I haven't included it in matplotlib for that reason. Agg separately implements a "scanline boolean algebra" which I haven't studied in detail but which I understand basically does the same thing: allow clipping to arbitrary polygons, and supports boolean operations on polygons -- http://www.antigrain.com/demo/index.html#PAGE_DEMO_scanline_boolean We have to expose the functionality such that it is available for use by other backends, much as we use agg for image across backends. If this is an area that you want to dive into, by all means. Otherwise, it's on the list of things to do (I just added it to the goals page in my tree, so it will appear on the site docs in the not-too-distant-future. JDH |