fabianoferrazza

Merge Geometric Network edges

Discussion created by fabianoferrazza on Aug 9, 2016
Latest reply on Oct 17, 2016 by Hornbydd

Hi all,

 

I need to merge two adjacent edge in a network.

 

In particular, i need to merge the geometries and put the new in the oldest

one, deleting the newest (I have modification data).

 

 

 

Code I using is:

 

 

 

 

 

                ((INetworkFeature)finalFeature).Disconnect();

 

                ((INetworkFeature)deletingFeature).Disconnect();

 

                 

 

                IPolyline6 new_shape = polyline1.ShapeCopy as IPolyline6;

 

                ITopologicalOperator6 topOp = new_shape as

ITopologicalOperator6;

 

                topOp.SimplifyAsFeature();

 

                IPolyline6 poly2 = polyline2.ShapeCopy as IPolyline6;

 

                poly2.SimplifyNetwork();

 

                IGeometry finalGeom = topOp.UnionEx(poly2,false);

 

                topOp = finalGeom as ITopologicalOperator6;

 

                topOp.SimplifyAsFeature();

 

                 

 

                finalFeature.Shape = finalGeom;

 

 

 

                deletingFeature.Delete();

 

                finalFeature.Delete();

 

                finalFeature.Store();

 

                ((INetworkFeature)finalFeature).Connect();

 

 

 

It throw the exception:

 

"there is no point geometry associated with the feature element"

 

 

 

Where is the mistake?

 

 

 

Thanks

 

 

 

-


 

Fabiano Ferrazza

 

GIS Specialist

 

 

 

Overit

 

Gruppo Engineering

 

 

 

-


 

 

 

 

Outcomes