Select to view content in your preferred language

street centerline connectivity

1325
2
12-22-2010 06:56 AM
RichDesGroseilliers
New Contributor
Hello Folks:

I had just been given a task of trying to update/ correct the street centerline file. I was wondering if there is an easy way of checking for street centerline connectivity? I might be able to do some checking through topology, but just wanted to know if there is some other way. Any info will be appreciated.
Tags (1)
0 Kudos
2 Replies
brianbond
Occasional Contributor
Richard, there is another way to check if street connectivity by using the ArcObjects code.  I am working on code now that is not yet done but I am using a Geometry Collection and a Path object.

I realize that you posted this over 8 months ago so you may have already completed this work.  If you could post how you went about doing your checking for street connectivity.

'THIS IS A SNIPPET OF CODE SHOWING HOW TO GET END POINT COORDINATES TO COMPARE CONNECTIVITY OF A LINE FEATURE (STREET).
Dim pFeature As IFeature
Dim pFeatCursor As IFeatureCursor
Dim pGeometry As IGeometry
Dim pGeoCollection As IGeometryCollection
Dim pSegColl As ISegmentCollection
Dim pPath As IPath
Dim intGeoCollCounter, iCollectCnt As Integer

If pFeature.Shape.GeometryType = esriGeometryType.esriGeometryPolyline Then
  pGeometry = pFeature.Shape
  pGeoCollection.AddGeometryCollection(pGeometry)
  pFeature = pFeatCursor.NextFeature
  intGeoCollCounter = intGeoCollCounter + 1
 End If
Loop
For intGeoCollCounter = 0 To pGeoCollection.GeometryCount - 1
 pPath = pGeoCollection.Geometry(intGeoCollCounter)
 Debug.Print("Geometry Path Coll #" & intGeoCollCounter.ToString & " FromPoint X-Coord=" & pPath.FromPoint.X.ToString & " Y-Coord =" & pPath.FromPoint.Y.ToString)
 Debug.Print("Geometry Path Coll #" & intGeoCollCounter.ToString & " ToPoint X-Coord=" & pPath.ToPoint.X.ToString & " Y-Coord =" & pPath.ToPoint.Y.ToString)
Next

'other code still to be developed to compare FromPoint and ToPoint Coordinates for each segment to verify connectivity.


Below is an example of output from the code above which the To Point are the same values of the From Point.
Geometry Path Coll #0 FromPoint X-Coord=746206.06594488 Y-Coord =1323527.42257218
Geometry Path Coll #0 ToPoint X-Coord=746077.656496063 Y-Coord =1322161.62959318
Geometry Path Coll #1 FromPoint X-Coord=746077.656496063 Y-Coord =1322161.62959318
Geometry Path Coll #1 ToPoint X-Coord=746034.672900263 Y-Coord =1320833.3175853
Geometry Path Coll #2 FromPoint X-Coord=746034.672900263 Y-Coord =1320833.3175853
Geometry Path Coll #2 ToPoint X-Coord=746011.211614173 Y-Coord =1319607.44455381
0 Kudos
JaySandhu
Esri Regular Contributor
Brian,
In case you have not seen this sample, you may be interested to see the code on traversing the network for checking connectivity here:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_programmatically...
Regards,
Jay Sandhu
0 Kudos