Point In Polygon Transactional Flow

This procedure describes how to create a subflow that determines if a set of points are inside a set of polygons using the deprecated Centrus Point In Polygon (Legacy) stage. This example iterates on points (read one point at a time using the Read From File (CSV) and search against the polygon GSB data using the Legacy Point In Polygon stage) when you have more polygons than points in your data.

Note: For more information using Enterprise Designer, see the Dataflow Designer Guide or the help inside the Enterprise Designer.

To create the transactional Point In Polygon (Legacy) subflow:

  1. In Enterprise Designer, choose New > Dataflow > Subflow from the File menu or New > Subflow from the Task pane.
  2. From the Palette, drag a Read From File stage onto the design canvas. This stage will read the points from a CSV file one at a time coming into the flow.
  3. Double-click on the Read From File stage to display the Options dialog. In the File Properties tab, enter the file name of the CSV file, the record type as Delimited, the file encoding (UTF-8), and the field separator as comma.
  4. In the Fields tab, add the latitude and longitude columns from the CSV file. Click OK.
  5. From the Palette, drag the legacy Point In Polygon (Legacy) stage onto the design canvas to the right of the Read From File stage. Click the solid black triangle on the right side of the Read From File stage (the output port) and drag it to the left side of the Point In Polygon (Legacy) stage to create a channel.
  6. Double-click the Point In Polygon (Legacy) stage to display the Options dialog. Select your polygon table as the Database. This polygon table must be in GSB format, and should have previously been added as a Centrus Database resource using Management Console. For information about how to add database resources, see the Administration Guide.

    Set the Coordinate Format to Decimal. Click OK.

  7. Click on the Runtime... button on the Point In Polygon (Legacy) stage and set it to the number of cores on the machine. Similarly, the Centrus Database Resource pool size should be set to the same value. The pool size is set when creating the database resource.
  8. Drag an Output sink to the canvas. Connect the output port of the Point In Polygon (Legacy) stage to the input port of the Output sink.
  9. Double-click the Output sink and check the field you wish to expose. Click OK.
  10. Save the subflow. To expose the subflow for use in a dataflow, choose File Expose/Unexpose and Save or click the Expose/Unexpose and Save button. The subflow displays in the User-Defined Stages folder.