public class PointStackerProcess extends Object implements VectorProcess
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 cluster
count
- the total number of points in the cluster
countunique
- the number of unique point locations in the cluster
Modifier and Type | Class and Description |
---|---|
static class |
PointStackerProcess.PreserveLocation |
Modifier and Type | Field and Description |
---|---|
static String |
ATTR_BOUNDING_BOX
bounding box of the clustered points as String
|
static String |
ATTR_BOUNDING_BOX_GEOM
bounding box of the clustered points as Poligon Geometry
|
static String |
ATTR_COUNT |
static String |
ATTR_COUNT_UNIQUE |
static String |
ATTR_GEOM |
static String |
ATTR_NORM_COUNT |
static String |
ATTR_NORM_COUNT_UNIQUE |
Constructor and Description |
---|
PointStackerProcess() |
Modifier and Type | Method and Description |
---|---|
SimpleFeatureCollection |
execute(SimpleFeatureCollection data,
Integer cellSize,
Boolean argWeightClusterPosition,
Boolean argNormalize,
PointStackerProcess.PreserveLocation preserveLocation,
ReferencedEnvelope outputEnv,
Integer outputWidth,
Integer outputHeight,
ProgressListener monitor) |
public static final String ATTR_GEOM
public static final String ATTR_COUNT
public static final String ATTR_COUNT_UNIQUE
public static final String ATTR_BOUNDING_BOX_GEOM
public static final String ATTR_BOUNDING_BOX
public static final String ATTR_NORM_COUNT
public static final String ATTR_NORM_COUNT_UNIQUE
public SimpleFeatureCollection execute(SimpleFeatureCollection data, Integer cellSize, Boolean argWeightClusterPosition, Boolean argNormalize, PointStackerProcess.PreserveLocation preserveLocation, ReferencedEnvelope outputEnv, Integer outputWidth, Integer outputHeight, ProgressListener monitor) throws ProcessException, TransformException
ProcessException
TransformException
Copyright © 1996–2019 Geotools. All rights reserved.