Hoppa till huvudinnehållet

How do I use one FeatureSet to identify and remove features from another FeatureSet?

Kommentarer

2 kommentarer

  • Permanently deleted user
    Hi Sean,

     

    I've managed to accomplish something close to what you've described here by iterating through the original FeatureSet as a list with a ForEach<Graphic> activity and using "If" logic within the loop to compare each feature in the original FS against the unique attributes of the feature which was selected for removal. The only catch is that this only compares a single feature selected for removal at a time against the list of original features, not a collection of features as you describe. You could, however, use a flowchart to loop back to the start of this sequence to allow a user to remove multiple features on a one-by-one basis.  

     

    For a feature with three unique attributes, attribute1, attribute2, and attribute3, the "If" comparison condition would look like this:

     

      feature.Attributes("attribute1").ToString.Equals(removeFS.Features(0).Attributes("attribute1").ToString) And feature.Attributes("attribute2").ToString.Equals(removeFS.Features(0).Attributes("attribute2").ToString) And feature.Attributes("attribute3").ToString.Equals(removeFS.Features(0).Attributes("attribute3").ToString) If this logic validates to True the "RemoveFromCollection<Graphic>" activity is called in the "Then" box of the "ForEach<Graphic>" loop. The "Else" box remains empty. The Collection parameter would be your original FS and the item would be the feature variable you specify in the beginning of the "ForEach" loop. See the screenshot below to clarification-- "NaboFS" is the FeatureSet which the user selected first and "removeEiendomFS" is the FeatureSet which contains the feature which should be removed from NaboFS.

     

    User-added image

     

     

    Hopefully this gives you some ideas toward a solution!  

     

     

     

     

     
    0
  • Permanently deleted user
    The solution I use, is a take off of the 'Complete Parcel Selection, Buffering, and Report Workflow' from the code gallery (https://support.geocortex.com/essentialsGSCCodeGallery?sub-nav=codegall&main-nav=essentials&#!/feedtype=SINGLE_ARTICLE_DETAIL&dc=Workflows_and_Workflow_Designer_cg&criteria=BESTANSWERS&id=kA4600000004EV2).

     

    In the flow chart, there is a sequence called 'Remove From Selection' that will do exactly what you're asking.

     

    User-added image

     

     

     
    0

Du måste logga in om du vill lämna en kommentar.