/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dir1">1st direction observation.</param> /// <param name="dir2">2nd direction observation.</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Direction dir1, Direction dir2) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation <Direction>(DataField.Direction1, m_Direction1, dir1); result.AddObservation <Direction>(DataField.Direction2, m_Direction2, dir2); return(result); }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dir">The direction (could contain an offset).</param> /// <param name="length">The length of the sideshot arm (either a <see cref="Distance"/> /// or an <see cref="OffsetPoint"/>).</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Direction dir, Observation length) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation <Direction>(DataField.Direction, m_Direction, dir); result.AddObservation <Observation>(DataField.Length, m_Length, length); return(result); }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dist1">1st distance observation.</param> /// <param name="from1">The point the 1st distance was observed from.</param> /// <param name="dist2">2nd distance observation.</param> /// <param name="from2">The point the 2nd distance was observed from.</param> /// <param name="isdefault">True if the default intersection is required (the one that has the /// lowest bearing with respect to the 2 from points). False for the other one (if any).</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Direction dir, Observation distance, PointFeature from, bool isdefault) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation <Direction>(DataField.Direction, m_Direction, dir); result.AddObservation <Observation>(DataField.Distance, m_Distance, distance); result.AddFeature <PointFeature>(DataField.From, m_From, from); result.AddItem <bool>(DataField.Default, m_Default, isdefault); return(result); }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dist1">1st distance observation.</param> /// <param name="from1">The point the 1st distance was observed from.</param> /// <param name="dist2">2nd distance observation.</param> /// <param name="from2">The point the 2nd distance was observed from.</param> /// <param name="isdefault">True if the default intersection is required (the one that has the /// lowest bearing with respect to the 2 from points). False for the other one (if any).</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Observation dist1, PointFeature from1, Observation dist2, PointFeature from2, bool isdefault) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation <Observation>(DataField.Distance1, m_Distance1, dist1); result.AddFeature <PointFeature>(DataField.From1, m_From1, from1); result.AddObservation <Observation>(DataField.Distance2, m_Distance2, dist2); result.AddFeature <PointFeature>(DataField.From2, m_From2, from2); result.AddItem <bool>(DataField.Default, m_Default, isdefault); return(result); }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="isFromEnd">True if extending from the end of the line</param> /// <param name="length">The observed length of the extension</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(bool isFromEnd, Distance length) { UpdateItemCollection result = new UpdateItemCollection(); result.AddItem <bool>(DataField.ExtendFromEnd, m_IsExtendFromEnd, isFromEnd); result.AddObservation <Distance>(DataField.Distance, m_Length, length); return(result); }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dist">The new observed distance.</param> /// <param name="isFromEnd">Is the distance observed from the end of the line?</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Distance dist, bool isFromEnd) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation <Distance>(DataField.Distance, m_Distance, dist); result.AddItem <bool>(DataField.EntryFromEnd, m_IsFromEnd, isFromEnd); return(result); }
///// <summary> ///// Executes this operation. ///// </summary> ///// <param name="wantsplit">True if line should be split at the intersection.</param> ///// <param name="pointType">The entity type to assign to the intersection point.</param> ///// <param name="dirEnt">The entity type for any line that should be added along the direction ///// line. Specify null if you don't want a line.</param> //internal void Execute(bool wantsplit, IEntity pointType, IEntity dirEnt) //{ // // Calculate the position of the point of intersection. // IPosition xsect; // PointFeature closest; // if (!m_Direction.Intersect(m_Line, m_CloseTo, out xsect, out closest)) // throw new Exception("Cannot calculate intersection point"); // // Add the intersection point // m_Intersection = AddIntersection(xsect, pointType); // // Are we splitting the input line? If so, do it. // m_IsSplit = wantsplit; // if (m_IsSplit) // SplitLine(m_Intersection, m_Line, out m_LineA, out m_LineB); // // If we have a defined entity type for the direction line, add a line too. // CadastralMapModel map = MapModel; // if (dirEnt != null) // m_DirLine = map.AddLine(m_Direction.From, m_Intersection, dirEnt, this); // // Peform standard completion steps // Complete(); //} /// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dir">The direction to intersect.</param> /// <param name="line">The line to intersect.</param> /// <param name="closeTo">The point the intersection has to be close to. Used if /// there is more than one intersection to choose from. If null is specified, a /// default point will be selected.</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Direction dir, LineFeature line, PointFeature closeTo) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation <Direction>(DataField.Direction, m_Direction, dir); result.AddFeature <LineFeature>(DataField.Line, m_Line, line); result.AddFeature <PointFeature>(DataField.CloseTo, m_CloseTo, closeTo); return(result); }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="refline">The reference line.</param> /// <param name="offset">The observed offset (either a <c>Distance</c> or an <c>OffsetPoint</c>).</param> /// <param name="term1">A line that the parallel should start on.</param> /// <param name="term2">A line that the parallel should end on.</param> /// <param name="isArcReversed">Should circular arc be reversed?</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(LineFeature refline, Observation offset, LineFeature term1, LineFeature term2, bool isArcReversed) { UpdateItemCollection result = new UpdateItemCollection(); result.AddFeature <LineFeature>(DataField.RefLine, m_RefLine, refline); result.AddObservation <Observation>(DataField.Offset, m_Offset, offset); result.AddFeature <LineFeature>(DataField.Term1, m_Term1, term1); result.AddFeature <LineFeature>(DataField.Term2, m_Term2, term2); result.AddItem <bool>(DataField.ReverseArc, this.IsArcReversed, isArcReversed); return(result); }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dist">The new observed distance.</param> /// <param name="isFromEnd">Is the distance observed from the end of the line?</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Distance dist, bool isFromEnd) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation<Distance>(DataField.Distance, m_Distance, dist); result.AddItem<bool>(DataField.EntryFromEnd, m_IsFromEnd, isFromEnd); return result; }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="isFromEnd">True if extending from the end of the line</param> /// <param name="length">The observed length of the extension</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(bool isFromEnd, Distance length) { UpdateItemCollection result = new UpdateItemCollection(); result.AddItem<bool>(DataField.ExtendFromEnd, m_IsExtendFromEnd, isFromEnd); result.AddObservation<Distance>(DataField.Distance, m_Length, length); return result; }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dir1">1st direction observation.</param> /// <param name="dir2">2nd direction observation.</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Direction dir1, Direction dir2) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation<Direction>(DataField.Direction1, m_Direction1, dir1); result.AddObservation<Direction>(DataField.Direction2, m_Direction2, dir2); return result; }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dir">The direction (could contain an offset).</param> /// <param name="length">The length of the sideshot arm (either a <see cref="Distance"/> /// or an <see cref="OffsetPoint"/>).</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Direction dir, Observation length) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation<Direction>(DataField.Direction, m_Direction, dir); result.AddObservation<Observation>(DataField.Length, m_Length, length); return result; }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dist1">1st distance observation.</param> /// <param name="from1">The point the 1st distance was observed from.</param> /// <param name="dist2">2nd distance observation.</param> /// <param name="from2">The point the 2nd distance was observed from.</param> /// <param name="isdefault">True if the default intersection is required (the one that has the /// lowest bearing with respect to the 2 from points). False for the other one (if any).</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Direction dir, Observation distance, PointFeature from, bool isdefault) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation<Direction>(DataField.Direction, m_Direction, dir); result.AddObservation<Observation>(DataField.Distance, m_Distance, distance); result.AddFeature<PointFeature>(DataField.From, m_From, from); result.AddItem<bool>(DataField.Default, m_Default, isdefault); return result; }
/// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dist1">1st distance observation.</param> /// <param name="from1">The point the 1st distance was observed from.</param> /// <param name="dist2">2nd distance observation.</param> /// <param name="from2">The point the 2nd distance was observed from.</param> /// <param name="isdefault">True if the default intersection is required (the one that has the /// lowest bearing with respect to the 2 from points). False for the other one (if any).</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Observation dist1, PointFeature from1, Observation dist2, PointFeature from2, bool isdefault) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation<Observation>(DataField.Distance1, m_Distance1, dist1); result.AddFeature<PointFeature>(DataField.From1, m_From1, from1); result.AddObservation<Observation>(DataField.Distance2, m_Distance2, dist2); result.AddFeature<PointFeature>(DataField.From2, m_From2, from2); result.AddItem<bool>(DataField.Default, m_Default, isdefault); return result; }
///// <summary> ///// Executes this operation. ///// </summary> ///// <param name="wantsplit">True if line should be split at the intersection.</param> ///// <param name="pointType">The entity type to assign to the intersection point.</param> ///// <param name="dirEnt">The entity type for any line that should be added along the direction ///// line. Specify null if you don't want a line.</param> //internal void Execute(bool wantsplit, IEntity pointType, IEntity dirEnt) //{ // // Calculate the position of the point of intersection. // IPosition xsect; // PointFeature closest; // if (!m_Direction.Intersect(m_Line, m_CloseTo, out xsect, out closest)) // throw new Exception("Cannot calculate intersection point"); // // Add the intersection point // m_Intersection = AddIntersection(xsect, pointType); // // Are we splitting the input line? If so, do it. // m_IsSplit = wantsplit; // if (m_IsSplit) // SplitLine(m_Intersection, m_Line, out m_LineA, out m_LineB); // // If we have a defined entity type for the direction line, add a line too. // CadastralMapModel map = MapModel; // if (dirEnt != null) // m_DirLine = map.AddLine(m_Direction.From, m_Intersection, dirEnt, this); // // Peform standard completion steps // Complete(); //} /// <summary> /// Obtains update items for a revised version of this edit /// (for later use with <see cref="ExchangeData"/>). /// </summary> /// <param name="dir">The direction to intersect.</param> /// <param name="line">The line to intersect.</param> /// <param name="closeTo">The point the intersection has to be close to. Used if /// there is more than one intersection to choose from. If null is specified, a /// default point will be selected.</param> /// <returns>The items representing the change (may be subsequently supplied to /// the <see cref="ExchangeUpdateItems"/> method).</returns> internal UpdateItemCollection GetUpdateItems(Direction dir, LineFeature line, PointFeature closeTo) { UpdateItemCollection result = new UpdateItemCollection(); result.AddObservation<Direction>(DataField.Direction, m_Direction, dir); result.AddFeature<LineFeature>(DataField.Line, m_Line, line); result.AddFeature<PointFeature>(DataField.CloseTo, m_CloseTo, closeTo); return result; }