Using Transformer to Create a Segment Points Field
The Transformer stage modifies field values and formatting. This procedure describes how to create a custom transform to create a segment points list. The segment points list is then used as the input to a Create Line Geometry operation using Spatial Calculator.
Here the input for Transformer is a string field of latitude/longitude locations in a row (x1,y1,x2,y2,x3,y3….). The output will be a
field. This can also be used to create a field for polygons without holes.To create a
field:-
In Enterprise Designer, create a new dataflow and add a Read From File stage.
Double-click to open the Options dialog. In the File Properties tab, specify the
input file containing the location information, for example:
-73.0,40.5,-73.0,40.7,-72.0,41.3,-73.0,40.5
- In the Fields tab, click Detect Type, if necessary, to automatically determine the fields. Modify the column name to be called points.
- Add a Transformer stage to the workflow. Rename the stage to "Prepare Segments Point list." Double-click the stage to open the Options dialog. Click Add to open the Add Transform dialog box. Choose Custom to display the Custom dialog box.
-
In the Custom dialog box do the following:
- To use the Prepare Segment Points list in a dataflow, add a Spatial Calculator stage (renamed to Create Line). Double-click the stage to open the Spatial Calculator Options dialog. Select Create Line Geometry, then select the coordinate system and click OK.
- Add a Write to Null stage to complete the dataflow. To test the dataflow, add an Inspection Point and run .