Skip to main content
I am processing complex linear features from a V7 DGN file.  Many of these complex linear geometries have several elements (segments) that contain multiple vertices with the same coordinates.  Sometimes there is only one segment in the geometry, which essentially makes the geometry a point, but there are some geometries with the multiple segments where the segment with only one distinct coordinate should just be removed and the geometry would be valid.

 

 

What I've tried so far is to use two GeometryValidator transformers.  The first one is set to remove Duplicate Consecutive Points and repair the geometry.  The second is set to check for "Contains Null Geometry Parts" and "Degenerate or Corrupt Geometries" and to NOT repair the geometry.

 

 

The problem with this approach is that while is captures those linear features that resolve to just one distinct coordinate as FAILED, it also flags those features that would be valid if the segment with the single distinct coordinate were removed from the geometry.  If I allow the second GeometryValidator to repair the geometry, it gives me a point geometry for the feature with only one segment which I want flagged as an error.

 

 

I'm now thinking I need to write a Python script to analyze the geometry between the two GeometryValidator transformers to remove any segments that contain only one distinct coordinate.  This will leave a Null geometry for those features that just contain one segment with one distinct coordinate, but should leave a valid geometry in those features that have at least one valid linear segment.

 

 

Is there any way to perform what I'm wanting to do without writing a Python script?

 

 

Any suggestions would be appreciated!

 

 

Thanks,

 

Steve
Have you looked at the GeometryRefiner to help you "simplify" the geometry before the GeometryValidators?
I had not looked at that transformer before.  The problem is I have some geometries where there are arc segments followed by one of the "one vertex" line segments.  The GeometryRefiner will not fix this geometry as I was hoping.

 

 

Thanks for the suggestion!
And if you first give all the Arcs a unique ID with the Counter, then use the ArcStroker and then use the GeometryValidators? After that you can then remove the "stroked Arcs" and replace them with the "real" Arcs - which you have now checked are valid. Something like this below:

 

 

 


Hi Guys,

 

 

I was having a similar issue with duplicate vertexes in my linear geometry. I found the combination of a geometry refiner  - Coordinate Rounder (set to a precision of 5) - Geomoetry Validator (set to detect and repair Duplicate Consecutive Points) got rid of all of my Duplicate nodes (ie. vertex's with the same coordinates).

 

 

That fixed my issue but i did not have an issue with single segements in the geometry. Just wanted to pass along what worked for me. Hope it helps.

Reply