There are some cases in which you might want Geometries to store their points using something other than the JTS Coordinate class. For example, you may want to experiment with another implementation, such as an array of x's and an array of y's. Or you might want to use your own coordinate class, one that supports extra attributes like M-values.
You can do this by implementing the CoordinateSequence and CoordinateSequenceFactory interfaces. You would then create a GeometryFactory parameterized by your CoordinateSequenceFactory, and use this GeometryFactory to create new Geometries. All of these new Geometries will use your CoordinateSequence implementation.
For an example, see the code for {@link com.vividsolutions.jtsexample.geom.TwoArrayCoordinateSequenceExample}. @see DefaultCoordinateSequenceFactory @see TwoArrayCoordinateSequenceFactory @version 1.7
|
|