[Gdal-dev] Cookie cutting shapefiles in OGR

Chapman, Martin MChapman at sanz.com
Wed Jul 5 12:22:49 EDT 2006


Frank,

The reason I use GPC is when I render projected maps that have a central
meridian that != 0 I have to partition the geometries that cross the new
edge of the map.  Also, I provide a clipping utility to clip small
vector sets from large datasets.  You are correct that there is really
no need other than convenience to add GPC to OGR.  I just thought it
would add some nice functionality to OGR without the overhead of GEOS.
I emailed the GPC people and they told me that all that is needed for a
commercial application is a one time donation to use it commercially.
Otherwise it's free of charge.  

Best regards,
Martin 

-----Original Message-----
From: Frank Warmerdam [mailto:fwarmerdam at gmail.com] On Behalf Of Frank
Warmerdam
Sent: Tuesday, July 04, 2006 8:23 PM
To: Chapman, Martin
Cc: Alexandre Leroux; gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] Cookie cutting shapefiles in OGR

Chapman, Martin wrote:
  > 2.  If you actually want to clip intersecting geometries and reshape
> them to your cookie cutter geometry then you need to use a library
like
> GPC (http://www.cs.man.ac.uk/~toby/alan/software/ ).  This open source
> library is very simple to use and works great...and it's very fast.
If
> you have problems using it let me know and I will help you out.  If
> Frank W. is reading this posting I would urge him to consider
including
> GPC as part of OGR since it's small, fast, powerful, and easy to use.
> LineString and Point clipping is easy and you should be able to find
> algorithms on-line or come up with one yourself.  GPC also supports
> difference, intersection, exclusive-or and union clip operations.  The
> C++ code I use for GPC is listed below the java code.

Martin,

What reasons do/did you have to use GPC instead of GEOS?  I can imagine
it
is smaller, and faster.  As mentioned earlier GPC isn't open source, so
I would prefer to use GEOS but I wouldn't be opposed to having optional
GPC based implementation of some of the geometry operations if there was
a really substantial advantage to GPC.

Of course, using GPC outside OGR is already quite doable, so my
integration
is not required ... at most a convenience.

Best regards,
-- 
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF,
http://osgeo.org





More information about the Gdal-dev mailing list