public class TransformProcess extends Object implements VectorProcess
The definition of the output feature type can be provided as a TransformProcess.Definition
data
structure or using a simple string format:
the_geom=the_geom name=name area=area( the_geom )Attribute definitions can be delimited by line breaks and/or by semicolons.
This is a very flexible process which can be used to:
INPUT Schema DEFINITION OUTPUT Schema the_geom: Polygon the_geom the_geom: Polygon name: String id id: Long id: Long name name: String description: String description description: String
INPUT Schema DEFINITION OUTPUT Schema the_geom: Polygon the_geom the_geom: Polygon name: String id_code=id id_code: Long id: Long summary=description summary: String description: String
INPUT Schema DEFINITION OUTPUT Schema the_geom: Polygon the_geom=centriod(the_geom) the_geom: Point name: String name name: String id: Long id id: Long description: String description description: String
INPUT Schema DEFINITION OUTPUT Schema the_geom: Polygon the_geom=centriod(the_geom) the_geom: Point name: String name name: String id: Long id id: Long description: String description description: String area=area( the_geom) area: Double text=concatenate(name,'-',id) text: String
This is a port of the uDig "reshape" operation to the GeoTools process framework.
Modifier and Type | Class and Description |
---|---|
static class |
TransformProcess.Definition
Definition of an attribute used during transform
Note this definition is terse as we are gathering the details from the origional
FeatureType.
|
Constructor and Description |
---|
TransformProcess() |
Modifier and Type | Method and Description |
---|---|
SimpleFeatureCollection |
execute(SimpleFeatureCollection features,
String transform) |
SimpleFeatureCollection |
executeList(SimpleFeatureCollection features,
List<TransformProcess.Definition> transform) |
static List<TransformProcess.Definition> |
toDefinition(String definition)
Parse out a list of
TransformProcess.Definition from the provided text description. |
static SimpleFeatureType |
toReShapeFeatureType(SimpleFeatureCollection delegate,
List<TransformProcess.Definition> definitionList) |
public SimpleFeatureCollection execute(SimpleFeatureCollection features, String transform) throws ProcessException
ProcessException
public SimpleFeatureCollection executeList(SimpleFeatureCollection features, List<TransformProcess.Definition> transform) throws ProcessException
ProcessException
public static List<TransformProcess.Definition> toDefinition(String definition)
TransformProcess.Definition
from the provided text description.
The format expected here is one definition per line; using the format "name=...expression..".
definition
- public static SimpleFeatureType toReShapeFeatureType(SimpleFeatureCollection delegate, List<TransformProcess.Definition> definitionList)
Copyright © 1996–2019 Geotools. All rights reserved.