Permalink
Browse files

GEOT-4224 - Improved metadata for raster processes

  • Loading branch information...
1 parent 98f1dbb commit 623b36b04faf3c92e217b9fa5a0d42af2ad29e6b Martin Davis committed Aug 15, 2012
Showing with 94 additions and 114 deletions.
  1. +8 −8 ...s/unsupported/process-raster/src/main/java/org/geotools/process/raster/VectorToRasterFactory.java
  2. +4 −7 .../unsupported/process-raster/src/main/java/org/geotools/process/raster/gs/AddCoveragesProcess.java
  3. +5 −5 modules/unsupported/process-raster/src/main/java/org/geotools/process/raster/gs/AreaGridProcess.java
  4. +9 −9 modules/unsupported/process-raster/src/main/java/org/geotools/process/raster/gs/ContourProcess.java
  5. +4 −4 modules/unsupported/process-raster/src/main/java/org/geotools/process/raster/gs/CropCoverage.java
  6. +4 −7 ...pported/process-raster/src/main/java/org/geotools/process/raster/gs/MultiplyCoveragesProcess.java
  7. +9 −12 ...pported/process-raster/src/main/java/org/geotools/process/raster/gs/PolygonExtractionProcess.java
  8. +8 −12 ...s/unsupported/process-raster/src/main/java/org/geotools/process/raster/gs/RangeLookupProcess.java
  9. +3 −3 ...d/process-raster/src/main/java/org/geotools/process/raster/gs/RasterAsPointCollectionProcess.java
  10. +7 −14 ...nsupported/process-raster/src/main/java/org/geotools/process/raster/gs/RasterZonalStatistics.java
  11. +4 −4 modules/unsupported/process-raster/src/main/java/org/geotools/process/raster/gs/ScaleCoverage.java
  12. +4 −4 modules/unsupported/process-raster/src/main/java/org/geotools/process/raster/gs/StyleCoverage.java
  13. +16 −16 ...ported/process-raster/src/main/java/org/geotools/process/raster/surface/BarnesSurfaceProcess.java
  14. +9 −9 .../unsupported/process-raster/src/main/java/org/geotools/process/raster/surface/HeatmapProcess.java
@@ -58,15 +58,15 @@
"rasterWidth",
Integer.class,
Text.text("Width"),
- Text.text("Number of cells in a raster row"),
+ Text.text("Width of the output grid in pixels"),
true, // this parameter is mandatory
1, 1, null, null);
static final Parameter<Integer> RASTER_HEIGHT = new Parameter<Integer>(
"rasterHeight",
Integer.class,
Text.text("Height"),
- Text.text("Number of cells in a raster column"),
+ Text.text("Height of the output grid in pixels"),
true, // this parameter is mandatory
1, 1, null, null);
@@ -78,7 +78,7 @@
"title",
String.class,
Text.text("Title"),
- Text.text("An optional title for the output grid"),
+ Text.text("Title to use for the output grid"),
false, // this parameter is optional
0, 1, "raster", null);
@@ -93,7 +93,7 @@
"attribute",
String.class,
Text.text("Attribute"),
- Text.text("The feature attribute to use for raster cell values"),
+ Text.text("Attribute name to use for the raster cell values"),
true, // this parameter is mandatory
1, 1, null, null);
@@ -106,7 +106,7 @@
"bounds",
Envelope.class,
Text.text("Bounds"),
- Text.text("Bounds of the area to rasterize"),
+ Text.text("Bounding box of the area to rasterize"),
false, // this parameter is optional
0, 1, null, null);
@@ -117,7 +117,7 @@
*/
static final Parameter<GridCoverage2D> RESULT = new Parameter<GridCoverage2D>(
"result", GridCoverage2D.class, Text.text("Result"), Text
- .text("Rasterized features"));
+ .text("Rasterized grid"));
static final Map<String,Parameter<?>> resultInfo = new LinkedHashMap<String, Parameter<?>>();
static {
@@ -134,11 +134,11 @@ protected void addParameters(Map<String, Parameter<?>> parameters) {
}
public InternationalString getTitle() {
- return Text.text("Rasterize features");
+ return Text.text("Vector to Raster");
}
public InternationalString getDescription() {
- return Text.text("Rasterize all or selected features in a FeatureCollection");
+ return Text.text("Converts some or all of a feature collection to a raster grid, using an attribute to specify cell values.");
}
public VectorToRasterProcess create() {
@@ -37,19 +37,16 @@
*
* @author Daniele Romagnoli - GeoSolutions
*/
-@DescribeProcess(title = "addCoverages", description = "Sum a coverage A with a coverage B. \n" +
- "The two coverages need to have the same envelope and the same resolution. \n" +
- "The operation will do pixel by pixel addition:\n " +
- "outputCoveragePixel[i][j] = sourceCoverageAPixel[i][j] + sourceCoverageBPixel[i][j]")
+@DescribeProcess(title = "Add Coverages", description = "Returns a raster generated by pixel-by-pixel addition of two source rasters. Source rasters must have the same bounding box and resolution.")
public class AddCoveragesProcess implements GSProcess {
private static final CoverageProcessor PROCESSOR = CoverageProcessor.getInstance();
private static final Operation ADD = PROCESSOR.getOperation("Add");
- @DescribeResult(name = "result", description = "The resulting coverage")
+ @DescribeResult(name = "result", description = "Summed rasters")
public GridCoverage2D execute(
- @DescribeParameter(name = "coverageA", description = "The first coverage") GridCoverage2D coverageA,
- @DescribeParameter(name = "coverageB", description = "The second coverage") GridCoverage2D coverageB,
+ @DescribeParameter(name = "coverageA", description = "First input raster") GridCoverage2D coverageA,
+ @DescribeParameter(name = "coverageB", description = "Second input raster") GridCoverage2D coverageB,
ProgressListener progressListener) throws ProcessException {
// //
@@ -54,15 +54,15 @@
*
* @source $URL$
*/
-@DescribeProcess(title = "areaGrid", description = "Builds a regular cell grid where each pixel represents its effective area in the envelope using the EckertIV projection")
+@DescribeProcess(title = "Area Grid", description = "Computes a raster grid of given geographic extent with cell values equal to the area the cell represents on the surface of the earth. Area is computed using the EckertIV projection.")
public class AreaGridProcess implements GSProcess {
private static final String targetCRSWKT = "PROJCS[\"World_Eckert_IV\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Eckert_IV\"],PARAMETER[\"Central_Meridian\",0.0],UNIT[\"Meter\",1.0]]";
- @DescribeResult(name = "result", description = "The grid")
+ @DescribeResult(name = "result", description = "Output raster")
public GridCoverage2D execute(
- @DescribeParameter(name = "envelope", description = "The envelope. The envelope must be in WGS84") ReferencedEnvelope bounds,
- @DescribeParameter(name = "width", description = "image width ") int width,
- @DescribeParameter(name = "height", description = "image height ") int height)
+ @DescribeParameter(name = "envelope", description = "Bounding box for the computed raster, in WGS84 geographic coordinates.") ReferencedEnvelope bounds,
+ @DescribeParameter(name = "width", description = "Width of the output raster in pixels") int width,
+ @DescribeParameter(name = "height", description = "Height of the output raster in pixels") int height)
throws ProcessException {
// basic checks
@@ -78,7 +78,7 @@
* @source $URL$
* @version $Id$
*/
-@DescribeProcess(title = "Contour", description = "Perform the contouring on a provided raster")
+@DescribeProcess(title = "Contour", description = "Computes contour lines at specified intervals or levels for the values in a raster.")
public class ContourProcess implements GSProcess {
private static final InternationalString NO_DATA = Vocabulary
@@ -127,15 +127,15 @@ public static SimpleFeatureCollection process(GridCoverage2D gc2d, Integer band,
progressListener);
}
- @DescribeResult(name = "result", description = "The contours feature collection")
+ @DescribeResult(name = "result", description = "Contour line features. Contour level is in value attribute.")
public SimpleFeatureCollection execute(
- @DescribeParameter(name = "data", description = "The raster to be used as the source") GridCoverage2D gc2d,
- @DescribeParameter(name = "band", description = "The source image band to process", min = 0, max = 1) Integer band,
- @DescribeParameter(name = "levels", description = "Values for which to generate contours") double[] levels,
- @DescribeParameter(name = "interval", description = "Interval between contour values (ignored if levels arg is supplied)", min = 0) Double interval,
- @DescribeParameter(name = "simplify", description = "Values for which to generate contours", min = 0) Boolean simplify,
- @DescribeParameter(name = "smooth", description = "Values for which to generate contours", min = 0) Boolean smooth,
- @DescribeParameter(name = "roi", description = "The geometry used to delineate the area of interest in model space", min = 0) Geometry roi,
+ @DescribeParameter(name = "data", description = "Input raster") GridCoverage2D gc2d,
+ @DescribeParameter(name = "band", description = "Name of band to use for values to be contoured", min = 0, max = 1) Integer band,
+ @DescribeParameter(name = "levels", description = "Values of levels at which to generate contours") double[] levels,
+ @DescribeParameter(name = "interval", description = "Interval between contour values (ignored if levels parameter is supplied)", min = 0) Double interval,
+ @DescribeParameter(name = "simplify", description = "Indicates whether contour lines are simplified", min = 0) Boolean simplify,
+ @DescribeParameter(name = "smooth", description = "Indicates whether contour lines are smoothed using Bezier smoothing", min = 0) Boolean smooth,
+ @DescribeParameter(name = "roi", description = "Geometry delineating the region of interest (in raster coordinate system)", min = 0) Geometry roi,
ProgressListener progressListener) throws ProcessException {
//
@@ -43,16 +43,16 @@
*
* @source $URL$
*/
-@DescribeProcess(title = "cropCoverage", description = "Collects all the default geometries in the feature collection and returns them as a single geometry collection")
+@DescribeProcess(title = "Crop Coverage", description = "Returns the portion of a raster bounded by a given geometry.")
public class CropCoverage implements GSProcess {
private static final CoverageProcessor PROCESSOR = CoverageProcessor.getInstance();
private static final Operation CROP = PROCESSOR.getOperation("CoverageCrop");
- @DescribeResult(name = "result", description = "The cropped raster")
+ @DescribeResult(name = "result", description = "Cropped raster")
public GridCoverage2D execute(
- @DescribeParameter(name = "coverage", description = "The raster to be cropped") GridCoverage2D coverage,
- @DescribeParameter(name = "cropShape", description = "The geometry used to crop the raster (either single or a collection)") Geometry cropShape,
+ @DescribeParameter(name = "coverage", description = "Input raster") GridCoverage2D coverage,
+ @DescribeParameter(name = "cropShape", description = "Geometry used to crop the raster") Geometry cropShape,
ProgressListener progressListener) throws IOException {
// get the bounds
CoordinateReferenceSystem crs;
@@ -37,19 +37,16 @@
*
* @author Daniele Romagnoli - GeoSolutions
*/
-@DescribeProcess(title = "multiplyCoverages", description = "Multiply a coverage A by a coverage B. \n" +
- "The two coverages need to have the same envelope and the same resolution. \n" +
- "The operation will do pixel by pixel multiplication:\n " +
- "outputCoveragePixel[i][j] = sourceCoverageAPixel[i][j] * sourceCoverageBPixel[i][j]")
+@DescribeProcess(title = "Multiply Coverages", description = "Returns a raster generated by pixel-by-pixel multiplication of two source rasters. Source rasters must have the same bounding box and resolution.")
public class MultiplyCoveragesProcess implements GSProcess {
private static final CoverageProcessor PROCESSOR = CoverageProcessor.getInstance();
private static final Operation MULTIPLY = PROCESSOR.getOperation("Multiply");
- @DescribeResult(name = "result", description = "The resulting coverage")
+ @DescribeResult(name = "result", description = "Computed raster")
public GridCoverage2D execute(
- @DescribeParameter(name = "coverageA", description = "The first coverage") GridCoverage2D coverageA,
- @DescribeParameter(name = "coverageB", description = "The second coverage") GridCoverage2D coverageB,
+ @DescribeParameter(name = "coverageA", description = "First input raster") GridCoverage2D coverageA,
+ @DescribeParameter(name = "coverageB", description = "Second input raster") GridCoverage2D coverageB,
ProgressListener progressListener) throws ProcessException {
// //
@@ -70,7 +70,7 @@
* @source $URL$
* @version $Id$
*/
-@DescribeProcess(title = "PolygonExtraction", description = "Perform the polygon extraction on a provided raster")
+@DescribeProcess(title = "Polygon Extraction", description = "Extracts vector polygons from a raster, based on regions which are equal or in given ranges")
public class PolygonExtractionProcess implements GSProcess {
static {
@@ -109,19 +109,16 @@
*
* @throws ProcessException
*/
- @DescribeResult(name = "result", description = "The polygon feature collection")
+ @DescribeResult(name = "result", description = "The extracted polygon features")
public SimpleFeatureCollection execute(
- @DescribeParameter(name = "data", description = "The raster to be used as the source") GridCoverage2D coverage,
- @DescribeParameter(name = "band", description = "(Integer, default=0) the source image band to process", min = 0) Integer band,
- @DescribeParameter(name = "insideEdges", description = "(Boolean, default=true) whether to vectorize boundaries between adjacent regions with non-outside values", min = 0) Boolean insideEdges,
- @DescribeParameter(name = "roi", description = "The geometry used to delineate the area of interest in model space", min = 0) Geometry roi,
- @DescribeParameter(name = "nodata", description = "Collection<Number>, default={0}) values to treat as NODATA",
+ @DescribeParameter(name = "data", description = "Source raster") GridCoverage2D coverage,
+ @DescribeParameter(name = "band", description = "Source band to use (default = 0)", min = 0) Integer band,
+ @DescribeParameter(name = "insideEdges", description = "Indicates whether to vectorize boundaries between adjacent regions with non-outside values", min = 0) Boolean insideEdges,
+ @DescribeParameter(name = "roi", description = "Geometry delineating the region of interest (in raster coordinate system)", min = 0) Geometry roi,
+ @DescribeParameter(name = "nodata", description = "Value to treat as NODATA (default is 0)",
collectionType = Number.class, min = 0) Collection<Number> noDataValues,
- @DescribeParameter(name = "ranges", description = "The list of ranges to be applied. \n"
- + "Each range is expressed as 'OPEN START ; END CLOSE'\n"
- + "where 'OPEN:=(|[, CLOSE=)|]',\n "
- + "START is the low value, or nothing to imply -INF,\n"
- + "CLOSE is the biggest value, or nothing to imply +INF", collectionType = Range.class, min = 0) List<Range> classificationRanges,
+ @DescribeParameter(name = "ranges", description = "Specifier for a value range in the format ( START ; END ). START and END values are optional. [ and ] can also be used as brackets, to indicate inclusion of the relevant range endpoint.",
+ collectionType = Range.class, min = 0) List<Range> classificationRanges,
ProgressListener progressListener)
throws ProcessException {
@@ -62,7 +62,7 @@
*
* @source $URL$
*/
-@DescribeProcess(title = "reclassify", description = "Reclassifies a continous coverage into a set of ranges identified by a number")
+@DescribeProcess(title = "Reclassify", description = "Reclassifies a continous raster into integer values defined by a set of ranges")
public class RangeLookupProcess implements GSProcess {
private final static double DEFAULT_NODATA = 0d;
@@ -73,18 +73,14 @@
Registry.registerRIF(JAI.getDefaultInstance(), new RangeLookupDescriptor(), new RangeLookupRIF(), Registry.JAI_TOOLS_PRODUCT);
}
- @DescribeResult(name = "reclassified", description = "The resulting reclassified coverage")
+ @DescribeResult(name = "reclassified", description = "The reclassified raster")
public GridCoverage2D execute(
- @DescribeParameter(name = "coverage", description = "The continuous coverage to be reclassified") GridCoverage2D coverage,
- @DescribeParameter(name = "band", description = "The band to be used for classification "
- + "(defaults to 0)", min = 0) Integer classificationBand,
- @DescribeParameter(name = "ranges", description = "The list of ranges to be applied. \n"
- + "Each range is expressed as 'OPEN START ; END CLOSE'\n"
- + "where 'OPEN:=(|[, CLOSE=)|]',\n "
- + "START is the low value, or nothing to imply -INF,\n"
- + "CLOSE is the biggest value, or nothing to imply +INF", collectionType=Range.class) List<Range> classificationRanges,
- @DescribeParameter(name = "outputPixelValues", description = "The array of pixel values to be associated to the ranges", min = 0 ) int[] outputPixelValues,
- @DescribeParameter(name = "noData", description = "The pixel value to be assigned to input pixels outside any range (defaults to 0)", min = 0 ) Double noData,
+ @DescribeParameter(name = "coverage", description = "Input raster") GridCoverage2D coverage,
+ @DescribeParameter(name = "band", description = "Source band to use for classification (default is 0)", min = 0) Integer classificationBand,
+ @DescribeParameter(name = "ranges", description = "Specifier for a value range in the format ( START ; END ). START and END values are optional. [ and ] can also be used as brackets, to indicate inclusion of the relevant range endpoint.",
+ collectionType=Range.class) List<Range> classificationRanges,
+ @DescribeParameter(name = "outputPixelValues", description = "Value to be assigned to corresponding range", min = 0 ) int[] outputPixelValues,
+ @DescribeParameter(name = "noData", description = "Value to be assigned to pixels outside any range (defaults to 0)", min = 0 ) Double noData,
ProgressListener listener) throws ProcessException {
//
@@ -66,12 +66,12 @@
*
* @source $URL$
*/
-@DescribeProcess(title = "RasterAsPointCollection", description = "Convert a Raster into a collections of points")
+@DescribeProcess(title = "Raster As Point Collection", description = "Returns a collection of point features for the pixels of a raster. The band values are provided as attributes.")
public class RasterAsPointCollectionProcess implements GSProcess {
- @DescribeResult(name = "result", description = "The point feature collection")
+ @DescribeResult(name = "result", description = "Point features")
public SimpleFeatureCollection execute(
- @DescribeParameter(name = "data", description = "The raster to be converted into a point feature collection") GridCoverage2D gc2d)
+ @DescribeParameter(name = "data", description = "Input raster") GridCoverage2D gc2d)
throws ProcessException {
if (gc2d ==null) {
throw new ProcessException("Invalid input, source grid coverage should be not null");
Oops, something went wrong. Retry.

0 comments on commit 623b36b

Please sign in to comment.