Пример #1
0
        /// <summary>
        /// Obtains update items for a revised version of this edit
        /// (for later use with <see cref="ExchangeData"/>).
        /// </summary>
        /// <param name="newPosition">The revised position</param>
        /// <returns>The items representing the change (may be subsequently supplied to
        /// the <see cref="ExchangeUpdateItems"/> method).</returns>
        internal UpdateItemCollection GetUpdateItems(Position newPosition)
        {
            UpdateItemCollection result = new UpdateItemCollection();

            result.AddItem <double>(DataField.X, m_NewPoint.Easting.Meters, newPosition.X);
            result.AddItem <double>(DataField.Y, m_NewPoint.Northing.Meters, newPosition.Y);
            return(result);
        }
Пример #2
0
        /// <summary>
        /// Obtains update items for a revised version of this edit
        /// (for later use with <see cref="ExchangeData"/>).
        /// </summary>
        /// <param name="p">The control point that was modified</param>
        /// <param name="newPosition">The revised position</param>
        /// <returns>The items representing the change (may be subsequently supplied to
        /// the <see cref="ExchangeUpdateItems"/> method).</returns>
        internal UpdateItemCollection GetUpdateItems(PointFeature p, Position newPosition)
        {
            UpdateItemCollection result = new UpdateItemCollection();

            // Unconditionally add an item that identifies the feature involved. This
            // is kind of klunky, covering the fact that this dialog for updating control
            // only deals with one point at a time.
            result.AddFeature <PointFeature>(DataField.UpdatedPoint, p);

            result.AddItem <double>(DataField.X, p.PointGeometry.Easting.Meters, newPosition.X);
            result.AddItem <double>(DataField.Y, p.PointGeometry.Northing.Meters, newPosition.Y);
            return(result);
        }
Пример #3
0
        /// <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>
        /// 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);
        }
Пример #6
0
        /// <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);
        }
Пример #7
0
        /// <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);
        }
Пример #8
0
 /// <summary>
 /// Obtains update items for a revised version of this edit
 /// (for later use with <see cref="ExchangeData"/>).
 /// </summary>
 /// <param name="newPosition">The revised position</param>
 /// <returns>The items representing the change (may be subsequently supplied to
 /// the <see cref="ExchangeUpdateItems"/> method).</returns>
 internal UpdateItemCollection GetUpdateItems(Position newPosition)
 {
     UpdateItemCollection result = new UpdateItemCollection();
     result.AddItem<double>(DataField.X, m_NewPoint.Easting.Meters, newPosition.X);
     result.AddItem<double>(DataField.Y, m_NewPoint.Northing.Meters, newPosition.Y);
     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="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;
 }
Пример #13
0
        /// <summary>
        /// Obtains update items for a revised version of this edit
        /// (for later use with <see cref="ExchangeData"/>).
        /// </summary>
        /// <param name="p">The control point that was modified</param>
        /// <param name="newPosition">The revised position</param>
        /// <returns>The items representing the change (may be subsequently supplied to
        /// the <see cref="ExchangeUpdateItems"/> method).</returns>
        internal UpdateItemCollection GetUpdateItems(PointFeature p, Position newPosition)
        {
            UpdateItemCollection result = new UpdateItemCollection();

            // Unconditionally add an item that identifies the feature involved. This
            // is kind of klunky, covering the fact that this dialog for updating control
            // only deals with one point at a time.
            result.AddFeature<PointFeature>(DataField.UpdatedPoint, p);

            result.AddItem<double>(DataField.X, p.PointGeometry.Easting.Meters, newPosition.X);
            result.AddItem<double>(DataField.Y, p.PointGeometry.Northing.Meters, newPosition.Y);
            return result;
        }