Hello,
Attached is a photo of my code, with the exception that it is having.
Essentially I have two lines. One line going through many, many smaller lines (thousands).
Some of the smaller lines I want to label.
So the first step in finding these lines is finding a character code, which I do and find them easily.
The second step is to get the intersecting point between the smaller line and the larger line.
I follow the examples and first I need to check if they intersect, so they do.
Then I try to get an IntersectingPoint and bam - it's null.
What am I doing wrong?
bool intersects = GeometryEngine.Instance.Intersects(featureXS.GetShape(), feature.GetShape()); // intersects = true
if (intersects == true) {
var IntersectingGeometryPoints = GeometryEngine.Instance.Intersection(featureXS.GetShape(), feature.GetShape()) as Multipoint;
MapPoint intPoint = IntersectingGeometryPoints.Points[0];
Polyline needOriginPointFromGeom = featureXS.GetShape() as Polyline;
for(int i = 0; i < needOriginPointFromGeom.PointCount; i++) {
if(needOriginPointFromGeom.Points == intPoint) {
xsPoints.Add(new XsPoint((int)featureXS.GetObjectID(), cursorXSRow.FindField("XS_LETTER"), intPoint, needOriginPointFromGeom.Points[i-1]));
}
}
}