[geos-devel] editing of geos geometries

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Thu Sep 20 09:15:27 EDT 2007

On Wednesday 19 September 2007 17:57:59 Martin Davis wrote:
> Generally geometries are intended to be value objects.  This is
> *especially important* in C/C++, because memory aliasing can kill you
> with bad pointer errors.
> The approach in JTS is to use some helper classes such as GeometryEditor
> and GeometryTransformer to perform "vertex surgery".  Essentially they
> drill down thru a geometry, add or delete points or components, and then
> build a new geometry back up.  I'm not sure if these have been ported to

Ah yes, thanks for the hint. GeometryEditor is present in geos too, so it will 
be a good solution for me to subclass it.  

> It would probably also be nice to have some utility classes built on
> these to do things like change vertices, add vertices, and delete
> vertices.  I may look at adding these to JTS, and they'd be easy to port
> to GEOS.

That would be great. 
I'm planning to port some other editing operations that I implemented on WKB 
arrays to geos in the middle term.


Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
marco.hugentobler at karto.baug.ethz.ch

More information about the geos-devel mailing list