|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.process.impl.AbstractProcess
org.geotools.process.feature.AbstractFeatureCollectionProcess
org.geotools.process.raster.VectorToRasterProcess
public class VectorToRasterProcess
A Process to rasterize vector features in an input FeatureCollection.
A feature attribute is specified from which to extract the numeric values that will be written to the output grid coverage. At present only int or float values are written to the output grid coverage. If the attribute is of type Long it will be coerced to int values and a warning will be logged. Similarly if the attribute is of type Double it will be coerced to float and a warning logged.
Field Summary |
---|
Fields inherited from class org.geotools.process.impl.AbstractProcess |
---|
factory |
Constructor Summary | |
---|---|
VectorToRasterProcess(VectorToRasterFactory factory)
Constructor |
Method Summary | |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
execute(java.util.Map<java.lang.String,java.lang.Object> input,
org.opengis.util.ProgressListener monitor)
Retrieves the input parameters from the supplied Map, conducts some basic checking, and then carries out the vector to raster conversion. |
static GridCoverage2D |
process(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> features,
java.lang.Object attribute,
java.awt.Dimension gridDim,
org.opengis.geometry.Envelope bounds,
java.lang.String covName,
org.opengis.util.ProgressListener monitor)
A static helper method that can be called directy to run the process. |
protected void |
processFeature(org.opengis.feature.simple.SimpleFeature feature,
java.util.Map<java.lang.String,java.lang.Object> input)
This method is called by execute(java.util.Map |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VectorToRasterProcess(VectorToRasterFactory factory)
factory
- Method Detail |
---|
public static GridCoverage2D process(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> features, java.lang.Object attribute, java.awt.Dimension gridDim, org.opengis.geometry.Envelope bounds, java.lang.String covName, org.opengis.util.ProgressListener monitor) throws VectorToRasterException
The process interface is useful for advertising functionality to
dynamic applications, but for 'hands on' coding this method is much more
convenient than working via the Process.execute(java.util.Map
features
- the feature collection to be (wholly or partially) rasterizedattribute
- source of values for the output grid: either a
String
for the name of a numeric feature property or
an org.opengis.filter.expression.Expression
that
evaluates to a numeric valuegridWidthInCells
- width (cell) of the output rastergridHeightInCells
- height (cell) of the output rasterbounds
- bounds (world coordinates) of the output rastercovName
- a name for the output rastermonitor
- an optional ProgressListener
(may be null
VectorToRasterException
public java.util.Map<java.lang.String,java.lang.Object> execute(java.util.Map<java.lang.String,java.lang.Object> input, org.opengis.util.ProgressListener monitor) throws VectorToRasterException
input
- input parameters from those defined in VectorToRasterFactorymonitor
- a ProgressListener object, or null if monitoring is not required
VectorToRasterException
- if unable to
rasterize the features as requestedVectorToRasterFactory.getResultInfo(java.util.Map)
protected void processFeature(org.opengis.feature.simple.SimpleFeature feature, java.util.Map<java.lang.String,java.lang.Object> input) throws java.lang.Exception
processFeature
in class AbstractFeatureCollectionProcess
feature
- the feature to be rasterizedinput
- the intput parameters (ignored in this implementation)
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |