[geos-devel] Modify a linestring or prevent coordinatesequence ownership transfer
mtnclimb at gmail.com
Thu May 24 07:43:59 PDT 2018
Actually in JTS this is possible, by creating a CoordinateSequence
implementation which allows extending the list of coordinates (e.g.
something like this ).
I guess the difference is that in C/C++ the API has to explicitly control
the lifetime of the geometry associated structures. Whereas in Java object
lifetimes are managed by the GC, and objects can live as long as they are
Not sure what the best way to ease this constraint is - but it seems like
there should be a common pattern to make this work?
On Thu, May 24, 2018 at 5:58 AM, Sandro Santilli <strk at kbt.io> wrote:
> On Thu, May 24, 2018 at 09:36:57AM +0200, Tanguy Fardet wrote:
> > Dear GEOS developers,
> > I would like to know if there is a way, within the GEOS library, to
> > 1) modify an existing LineString without copying the existing points
> > or 2) create a LineString from a CoordinateSequence without having to
> > the latter and without it being destroyed with the LineString (i.e. how
> > not transfer ownership).
> > From a quick look at the code, this does not seem possible, but I would
> > to make sure it is indeed the case.
> I confirm this is the case, by (JTS-following) design.
> geos-devel mailing list
> geos-devel at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the geos-devel