Package org.geotools.process.vector
Class PointStackerProcess
- Object
-
- PointStackerProcess
-
- All Implemented Interfaces:
VectorProcess
public class PointStackerProcess extends Object implements VectorProcess
A Rendering Transformation process which aggregates features into a set of visually non-conflicting point features. The created points have attributes which provide the total number of points aggregated, as well as the number of unique point locations.This is sometimes called "point clustering". The term stacking is used instead, since clustering has multiple meanings in geospatial processing - it is also used to mean identifying groups defined by point proximity.
The stacking is defined by specifying a grid to aggregate to. The grid cell size is specified in pixels relative to the requested output image size. This makes it more intuitive to pick an appropriate grid size, and ensures that the aggregation works at all zoom levels.
The output is a FeatureCollection containing the following attributes:
geom
- the point representing the clustercount
- the total number of points in the clustercountunique
- the number of unique point locations in the cluster
- Author:
- mdavis, Cosmin Cioranu (CozC)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PointStackerProcess.PreserveLocation
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_BOUNDING_BOX
bounding box of the clustered points as Stringstatic String
ATTR_BOUNDING_BOX_GEOM
bounding box of the clustered points as Poligon Geometrystatic String
ATTR_COUNT
static String
ATTR_COUNT_UNIQUE
static String
ATTR_GEOM
static String
ATTR_NORM_COUNT
static String
ATTR_NORM_COUNT_UNIQUE
-
Constructor Summary
Constructors Constructor Description PointStackerProcess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleFeatureCollection
execute(SimpleFeatureCollection data, Integer cellSize, Boolean argWeightClusterPosition, Boolean argNormalize, PointStackerProcess.PreserveLocation preserveLocation, ReferencedEnvelope outputEnv, Integer outputWidth, Integer outputHeight, String cql, ProgressListener monitor)
-
-
-
Field Detail
-
ATTR_GEOM
public static final String ATTR_GEOM
- See Also:
- Constant Field Values
-
ATTR_COUNT
public static final String ATTR_COUNT
- See Also:
- Constant Field Values
-
ATTR_COUNT_UNIQUE
public static final String ATTR_COUNT_UNIQUE
- See Also:
- Constant Field Values
-
ATTR_BOUNDING_BOX_GEOM
public static final String ATTR_BOUNDING_BOX_GEOM
bounding box of the clustered points as Poligon Geometry- See Also:
- Constant Field Values
-
ATTR_BOUNDING_BOX
public static final String ATTR_BOUNDING_BOX
bounding box of the clustered points as String- See Also:
- Constant Field Values
-
ATTR_NORM_COUNT
public static final String ATTR_NORM_COUNT
- See Also:
- Constant Field Values
-
ATTR_NORM_COUNT_UNIQUE
public static final String ATTR_NORM_COUNT_UNIQUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
public SimpleFeatureCollection execute(SimpleFeatureCollection data, Integer cellSize, Boolean argWeightClusterPosition, Boolean argNormalize, PointStackerProcess.PreserveLocation preserveLocation, ReferencedEnvelope outputEnv, Integer outputWidth, Integer outputHeight, String cql, ProgressListener monitor) throws ProcessException, TransformException
- Throws:
ProcessException
TransformException
-
-