Skip to main content

Hello, I have a folder containing multiple shapefiles, for example,  (a, b, d, e, f...). My objective is to utilize the AnchoredSnapper transformer in the following manner: initially, snap shapefile 'a' with 'b', where 'a' serves as the anchor. Then, the resulting snapped shapefile will be used as the anchor and snapped with 'c', and so forth until all shapefiles are snapped. I tried to implement loops but the problem is that the output have to be the new output after every iteration, so i can't get a configuration of the loop. I appreciate any assistance or proposition you can provide. Thank you.

This is my wokspace and the custom transformer , using a loop.

 

I do not understand why you want to do this, but I think it can be done using a workspacerunner.

  • Parent
    • FeatureReader Directory and File Pathnames reading all files.
    • If first file, FeatureWriter to output file.
    • Else start child workspace with filepath using workspacerunner. Wait for job to complete = yes.
  • Child
    • FeatureReader read output file and FeatureWriter write to anchor file.
    • FeatureReader read anchor file.
    • FeatureReader read file from filepath from workspacerunner.
    • AnchorSnapper stuff.
    • FeatureWriter write anchors, snapped and unsnapper to output file.

When all files are processed, outputfile is your result.


Reply