Skip to main content
Solved

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

  • March 22, 2024
  • 1 reply
  • 43 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.

View original
Did this help you find an answer to your question?

1 reply

nielsgerrits
VIP
Forum|alt.badge.img+54
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings