Yes, it probably would. GeoTools has investigated this extensively, and
that's the approach they use. But it would probably require a lot of
changes, and even worse a lot of testing to find out where JUMP is not
using Geometry in a compatible way (ie. if you call getCoordinates you
will always get a Coordinate array, even if the internal rep is a packed
array - which requires creating and copying.
Also, ironically - I doubt that this would improve Point performance!
Point is a very "low efficiency" datatype, and since it's only storing
two numbers, it doesn't really matter what object you use to store them
internally - you still have an object that holds them.
I guess one solution to this would be to rework the JTS Point class so
that it doesn't use an explict Coordinate for the point, just stores the
doubles directly. But that gets a bit hairy for allowing user-defined
representation - which CoordinateSequence allows now. Maybe the final
answer is to allow subclasses of Point, which can have an efficient
representation tailored to use.
Paul Austin wrote:
Larry,
One thing I was wondering if using the PackedCoordinateSequence (via
PackedCoordinateSequenceFactory on GeometryFactory) would reduce the
memory requirements for both Point, Line and Polygon datasets.
Paul
_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022
_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users