while (pointCursor.MoveNext()) { pointCounter++; if (pointCounter>1) { var pointFeature = pointCursor.Current as Feature; if (pointFeature == null) continue; Polyline polyline = pointFeature.GetShape() as Polyline; ReadOnlyPointCollection pts = polyline.Points; int numPts = polyline.PointCount; List<MapPoint> lineMapPoints = new List<MapPoint> { pts[0], pts[numPts - 1] }; // add the feature point geometry as a coordinate into the vertex list of the line // - ensure that the projection of the point geometry is converted to match the spatial reference of the line var newPolyline = PolylineBuilder.CreatePolyline(lineMapPoints, polylineDefinition.GetSpatialReference()); // queue the create operation as part of the edit operation createOperation.Create(polylineLayer, newPolyline); } else { return;//from there I would like to go back to pointCounter ++ } }
return
finally
try
else
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)