Actually the preferred paradigm is to treat Geometrys as immutable. If a
Geometry must be mutated then GeometryEditor or GeometryTransformer can be
used.
If it is really necessary to modify geometrys in-place, then
CoordinateSequenceFilter can be used, which avoids the overhead of creating
transient Coordinate objects.
But you're right, in general CoordinateFilter won't work for update if
non-default CoordinateSequences are being used. So it should really only
be used for reading, not mutating. The Javadoc should point this out.
Make sense?
On Wed, Feb 11, 2015 at 10:10 AM, Joe Amenta <[email protected]> wrote:
> It looks like the preferred way to transform a Geometry point-by-point is
> to call Geometry.apply(), passing in a CoordinateFilter.
>
> Furthermore, it looks like a supported way to mitigate the overhead of
> Geometry objects with massive amounts of points is to use a non-default
> CoordinateSequence, such as PackedCoordinateSequence, rather than the
> default.
>
> Given both of those two facts, shouldn't Point.apply(CoordinateFilter) and
> LineString.apply(CoordinateFilter) use "setFoo" methods on their respective
> CoordinateSequences, rather than assume that changes to the Coordinate from
> getCoordinate() will "stick" after garbage collection is run?
>
> --Joe Amenta
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Jts-topo-suite-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user