Skip to main content
Solved

using the result of anchoredsnap as the new input for every iteration.

  • March 22, 2024
  • 1 reply
  • 55 views

geouser97
Contributor
Forum|alt.badge.img+1

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.

 

Best answer by nielsgerrits

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

nielsgerrits
VIP
Forum|alt.badge.img+62
  • Best Answer
  • March 22, 2024

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.