public class GeometryCollector extends Object
PackedCoordinateSequence
is used by default to reduce memory usage)
Constructor and Description |
---|
GeometryCollector() |
Modifier and Type | Method and Description |
---|---|
void |
add(Geometry g)
Adds a geometry to the collector
|
GeometryCollection |
collect()
Returns a geometry collection containing all of the geometries collected in the process
|
GeometryCollection |
collectInternal() |
GeometryFactory |
getFactory()
Returns the geometry factory used to deep clone the geometries while collecting them (if null
no cloning will happen)
|
long |
getMaxCoordinates()
Returns the maximum number of coordinates this collector is allowed to keep in the resulting
geometry
|
void |
setFactory(GeometryFactory factory)
Sets the geometry factory used to deep clone the geometries while collecting them.
|
void |
setMaxCoordinates(long maxCoordinates)
Sets the maximum number of coordinates to be collected.
|
public long getMaxCoordinates()
public void setMaxCoordinates(long maxCoordinates)
public GeometryFactory getFactory()
public void setFactory(GeometryFactory factory)
PackedCoordinateSequenceFactory
is used to minimize the memory usagepublic GeometryCollection collect()
public GeometryCollection collectInternal()
public void add(Geometry g)
Copyright © 1996–2023 Geotools. All rights reserved.