[geos-devel] Refactoring CoordinateSequence

Daniel Baston dbaston at gmail.com
Thu Aug 30 06:09:42 PDT 2018


I've been exploring porting the PackedCoordinateSequence from JTS to GEOS
because it seems like a useful way to improve the interoperability of GEOS
with other code (LWGEOM, for example) without requiring copying of
everything into GEOS data structures. It turns out that extending
CoordinateSequence is pretty onerous in GEOS; the CoordinateSequence class
contains many abstract methods that are not in the corresponding
CoordinateSequence JTS interface. These methods add requirements of
mutability (CoordinateSequence::setAt) and extensibility/contractability
(CoordianteSequence::add, CoordianteSequence::deleteAt) and require the
author of a derived class to implement functionality that could be seen as
unrelated to storing a sequence of coordinates (removeRepeatedPoints,
apply_ro, etc.). Does anyone know why so many methods are added to GEOS
CoordinateSequence that have no JTS equivalent, and are there any
objections to factoring some of the functionality out of the
CoordianteSequence class so that it's easier to write other
CoordinateSequence implementations?

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20180830/e0b69883/attachment.html>


More information about the geos-devel mailing list