/// <summary> /// Attempts to locate the circle closest to a position of interest. /// </summary> /// <param name="p">The search position (on the circumference of the circle)</param> /// <param name="tol">The search tolerance</param> /// <returns>The circle closest to the search position (null if nothing found)</returns> internal Circle QueryClosestCircle(IPosition p, ILength tol) { ISpatialObject so = m_ExtraData.QueryClosest(p, tol, SpatialType.Line); if (so == null) { return(null); } Debug.Assert(so is Circle); return(so as Circle); }
private PointFeature EnsurePointExists(PointGeometry p, ILength tol, Operation creator) { PointFeature result = (PointFeature)m_Index.QueryClosest(p, tol, SpatialType.Point); if (result == null) { IEntity e = creator.MapModel.DefaultPointType; InternalIdValue id = CadastralMapModel.Current.WorkingSession.AllocateNextId(); result = new PointFeature(creator, id, e, p); m_Index.Add(result); m_Result.Add(result); } return(result); }