[Gdal-dev] Cookie cutting shapefiles in OGR
Frank Warmerdam
warmerdam at pobox.com
Tue Jul 4 22:22:51 EDT 2006
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