/// <summary> /// Adds a termination point (or re-use a point if it happens to be the offset point). /// </summary> /// <param name="loc">The location for the termination point.</param> /// <returns>The point feature at the termination point (may be the position that was /// used to define the offset to the parallel line).</returns> PointFeature AddPoint(IPosition loc) { CadastralMapModel map = CadastralMapModel.Current; // Add the split point (with default entity type). If a // point already exists at the location, you'll get back // that point instead. // We do this in case the user has decided to // terminate on a line connected to the offset point // that defines the offset to the parallel (which the // UI lets the user do). PointFeature p = this.OffsetPoint; if (p != null) { IPointGeometry pg = PointGeometry.Create(loc); if (p.IsCoincident(pg)) { return(p); } } p = map.AddPoint(p, map.DefaultPointType, this); p.SetNextId(); return(p); }