Skip to main content

SliverRemover remover has option Repair Method : (Priority Longest boundary)

 

In my case shortest boundary option needed, I wander if someone knows how to realize this?

SliverRemover remover has option Repair Method : (Priority Longest boundary)

 

In my case shortest boundary option needed, I wander if some knows how to realize this?

 


Solution depends on the objects your talking about.

sample required.


You would have to write your own custom transformer to do this. Off the top of my head I would try something like:

 

 

BoundingBoxAccumulator to get a bounding polygon

 

Send the original features and bounding box through an AreaOnAreaOverlayer and test for the Overlap Count Attribute to be 1 (gaps) or greater than 2 (overlaps) (2 would be no overlaps, just the original feature and the bounding box). These are your slivers to be eliminated. Create an attribute to identify them as such. Identify the features with an overlap of 2 to be your reference features. (They are the original features minus any overlapping areas)

 

Send both the reference and slivers to a TopologyBuilder.

 

From the Edge port use a tester to remove any edge where both the left and right faces are 0 (outside edge). Calculate the length of the remaining lines.

From the Face port test to separate the slivers from the reference features.

Send the slivers to the requestors of a ListBasedFeatureMerger. Requestor list attribute should be _edges{}._edge_id, supplier attribute should be _edge_id. Generate a list.

Your slivers should now have a list containing each adjoining edge and it's length, and the ids or the left and right faces

 

Sort the list by length and promote the shortest segment (index 0).

 

One of either the left or right face id will match the face_id of the sliver, get the id of the other one, that is the id of the reference polygon the sliver should be dissolved with.

 

Dissolve the reference features with the slivers, grouping on that id.

There's probably a couple of minor things missing between steps, but in theory this should work.

 


Reply