Class TransformProcess

  • All Implemented Interfaces:
    VectorProcess

    public class TransformProcess
    extends Object
    implements VectorProcess
    Used to transform a feature collection as defined using a series of expressions.

    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:

    • Change the order of attributes - resulting in a new feature type:
       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
       
    • Rename or remove attributes - resulting in a new feature type:
       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
       
    • Process geometry - using functions like "the_geom=simplify( the_geom, 2.0 )" or "the_geom=centriod( the_geom )":
       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
       
    • Generate additional attributes using the form: area=area( the_geom ):
       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.

    Author:
    Jody Garnett (LISAsoft)