Skip to main content

i have question regarding to the anchored snapper

i have used points as input to Anchors and Lines to Candidates .

but i found i have output on collapsed port around 209 point .

collapsed port output :what i understood the smallest lines less than tolerance converts to points ,if i understood correct .

 

but it means also that may be i lost some lines id in collapsed port bcs they converted to point so i will not be able to use them again as lines in my nework .

or what should i do to use collapsed port again in my network so i have all ids again ?

 

Do we have a method that i could use anchored snapper without getting any collapsed at output ?

 

the lines that has already converted to points ,how could i use the output of collapsed port again in my network ,bcs i need the all id in my network .and i am not sure if i lost some id's in collapsed port or should i continue with output snapped and untoched lines and just ignore collapsed port .

 

anchored snapper

 

 

with these parameters i got around 209 output from collapsed port and i am not sure if i should ignore the output of collapsed port or not ?

 

which best parametrs,tolerance should i use to get best result without collapsed port ?

 

Easiest way is to Restore the original Geometries with a FeatureJoiner as below. Set the Geometry Handling to "Use Right" and Join on a Unique Identifier Attribute.

 

Shown with a Snapper, but the same concept applies to AnchoredSnapper (or any other workflow where need to post-process some Features and restore the Geometries back to their original form)

capture


Easiest way is to Restore the original Geometries with a FeatureJoiner as below. Set the Geometry Handling to "Use Right" and Join on a Unique Identifier Attribute.

 

Shown with a Snapper, but the same concept applies to AnchoredSnapper (or any other workflow where need to post-process some Features and restore the Geometries back to their original form)

capture

thanks ,it looks great idea


Easiest way is to Restore the original Geometries with a FeatureJoiner as below. Set the Geometry Handling to "Use Right" and Join on a Unique Identifier Attribute.

 

Shown with a Snapper, but the same concept applies to AnchoredSnapper (or any other workflow where need to post-process some Features and restore the Geometries back to their original form)

capture

@bwn​ thanks for ur methods and it is working great but i found one network i got Error running translation at this feature joiner ,i am not sure what is the reason because it works good for another networks without problem .

 

if i delete feature joiner ,the workbench works good with out error .could u help me to fix this problem ?

 

do u have another method ,that could i use.thanks alot fo help.


@bwn​ thanks for ur methods and it is working great but i found one network i got Error running translation at this feature joiner ,i am not sure what is the reason because it works good for another networks without problem .

 

if i delete feature joiner ,the workbench works good with out error .could u help me to fix this problem ?

 

do u have another method ,that could i use.thanks alot fo help.

What does the Error Message and Translation Log say at this point in the Translation?

 

Most FeatureJoiner errors are from a Feature having a Null or Empty Join Key Attribute Value. To fix this, the general solution is to first use a Counter to create a Unique ID before sending the Features to Snapper and FeatureJoiner, and then use this Unique ID as the Left<->Right Join in the FeatureJoiner.

 

Apart from that, other stupid things that can happen is, depending on FME Version being used, the way FeatureJoiner reads Features if an upstream Transformer has already put them (or at least some of them) into Bulk Mode. It can mix up one Attribute with another if some of the Attributes are Empty on some of the Feature Rows and non-Empty on other Feature Rows......my guess it isn't iterating through Attribute columns properly when some rows have one or more Attributes with Empty values or the Attributes are ordered differently between one subset of the input Features versus another subset.

 

For this particular problem, my general purpose workaround this bug has to been to first process all Features through an AttributeKeeper before sending the input to FeatureJoiner. AttributeKeeper "splits" all Features out of all the incoming Bulk Mode Schema Tables to rebuild all the Features into one consistent Feature-by-Feature Schema, and FeatureJoiner will then read the Attribute "columns" in the right order.

 

 


I would actually propose a different option. before the Snapper use a GeometryExtractor to store the geometry as an attribute. For the snapped and untouched features you can simply remove the attribute, for the collapsed you can use a GeometryReplacer to restore the original geometry.


@bwn​ thanks for ur methods and it is working great but i found one network i got Error running translation at this feature joiner ,i am not sure what is the reason because it works good for another networks without problem .

 

if i delete feature joiner ,the workbench works good with out error .could u help me to fix this problem ?

 

do u have another method ,that could i use.thanks alot fo help.

Thanks alot for ur idea .

the error message has nothing to say ,i have looked again it writes only Error running translation b y the way i have FME version 2018 .

but i solved the problem by change the parameters in Feature joiner ,i did the inverse and it works great .

collapsed port connects to right and the original features connects to left ,Geometry Handlying using left . and it works withour error message ,honestly i am not sure why bcs it the same idea what u explained at first .

I will use attribute keeper and so on,as u explained so i hope i will have not the same problem later . Thanks


I would actually propose a different option. before the Snapper use a GeometryExtractor to store the geometry as an attribute. For the snapped and untouched features you can simply remove the attribute, for the collapsed you can use a GeometryReplacer to restore the original geometry.

Thanks alot for ur method,but i think if some ids failed in collaüsed port , i will not be able to restore them if i used restore the whole geometry bcs i used this method before on buffer and clipper and so on,i found when i use the amount of buffer bigger than the line and i use later geometry replacer ,it will not return the line that its length less than buffer. so i would like not to ignore collapsed port ,i am trying to use the failed ids in collapsed to return them bk.thanks for ur replying.


Reply