The University of Manchester GPC library
(wikipedia:
GPC)
is a flexible and highly robust polygon set operations library for use with
C, C#, Delphi, Java, Perl, Python, Haskell, Lua, VB.Net (and other) applications.
Designer and implementor:
Alan
Murta |
Licencing Manager:
Toby Howard
Difference, intersection, exclusive-or and union clip operations are
supported.
Polygons may be comprised of multiple disjoint contours.
Contour vertices may be given in any order - clockwise or anticlockwise.
Contours may be convex, concave or self-intersecting.
Contours may be nested (i.e. polygons may have holes).
Output may take the form of either polygon contours or tristrips.
Hole and external contours are differentiated in the result.
Coincident edges and degenerate regions are handled correctly.
GPC in action
The following examples show the results of GPC operations on two sets of
polygons (Set 1:
the United Kingdom and Ireland; Set 2:
the four inward-pointing arrows). The operations are:
difference (blue), intersection (green), exclusive-or
(yellow) and union (purple).
Non-commercial use of GPC
(for example: private / hobbyist / education)
GPC is free for non-commercial use only.
We invite non-commercial users to make a voluntary donation towards the upkeep of GPC.
Commercial use of GPC
(for example: product development / commercial research)
If you wish to use GPC in support of a
commercial product, you must obtain an official GPC Commercial Use
Licence from The University of Manchester.
Please email for details.
The gpctool package allows the interactive graphical evaluation of the
GPC library under Unix / X11. Compilation requires the
Mesa (or
OpenGL) and
xforms libraries -
no precompiled binaries are available. The gpctool sources are available as either a
Unix compressed tarfile (62k) or a
PC Zip file (38k). Please note that this software is completely unsupported.
If you are a non-commercial user and you have found GPC
to be useful, we invite you to please make a donation and help support
the continuation of this project. Thanks!
However, If you wish to use GPC in support of a
commercial product, you must obtain an official GPC Commercial Use Licence from
The University of Manchester.
Please email for details.