/// <summary>
 ///
 /// </summary>
 /// <param name="gl"></param>
 public void SetLocations(TopologyLocation gl)
 {
     for (int i = 0; i < gl._location.Length; i++)
     {
         _location[i] = gl._location[i];
     }
 }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="geomIndex"></param>
 /// <param name="tl"></param>
 private void SetGeometryLocation(int geomIndex, TopologyLocation tl)
 {
     if (tl == null)
     {
         return;
     }
     elt[geomIndex].SetLocations(tl);
 }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="gl"></param>
        public TopologyLocation(TopologyLocation gl)
        {
            if (gl == null)
                throw new ArgumentNullException("gl", "null topology location specified");

            Init(gl._location.Length);
            for (int i = 0; i < _location.Length; i++)
                _location[i] = gl._location[i];
        }
Beispiel #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="gl"></param>
        public TopologyLocation(TopologyLocation gl)
        {
            if (gl == null)
            {
                throw new ArgumentNullException("gl", "null topology location specified");
            }

            Init(gl._location.Length);
            for (int i = 0; i < _location.Length; i++)
            {
                _location[i] = gl._location[i];
            }
        }
Beispiel #5
0
 /// <summary>
 /// Merge this label with another one.
 /// Merging updates any null attributes of this label with the attributes from lbl.
 /// </summary>
 /// <param name="lbl"></param>
 public void Merge(Label lbl)
 {
     for (int i = 0; i < 2; i++)
     {
         if (elt[i] == null && lbl.elt[i] != null)
         {
             elt[i] = new TopologyLocation(lbl.elt[i]);
         }
         else
         {
             elt[i].Merge(lbl.elt[i]);
         }
     }
 }
 /// <summary>
 /// Merge updates only the Null attributes of this object
 /// with the attributes of another.
 /// </summary>
 public void Merge(TopologyLocation gl)
 {
     // if the src is an Area label & and the dest is not, increase the dest to be an Area
     if (gl._location.Length > _location.Length)
     {
         Location[] newLoc = new Location[3];
         newLoc[(int)Positions.On]    = _location[(int)Positions.On];
         newLoc[(int)Positions.Left]  = Location.Null;
         newLoc[(int)Positions.Right] = Location.Null;
         _location = newLoc;
     }
     for (int i = 0; i < _location.Length; i++)
     {
         if (_location[i] == Location.Null && i < gl._location.Length)
         {
             _location[i] = gl._location[i];
         }
     }
 }
Beispiel #7
0
 /// <summary>
 /// Construct a Label with a single location for both Geometries.
 /// Initialize the locations to Null.
 /// </summary>
 /// <param name="onLoc"></param>
 public Label(Location onLoc)
 {
     elt[0] = new TopologyLocation(onLoc);
     elt[1] = new TopologyLocation(onLoc);
 }
Beispiel #8
0
 /// <summary> 
 /// Converts one GeometryLocation to a Line location.
 /// </summary>
 /// <param name="geomIndex"></param>
 public  void ToLine(int geomIndex)
 {
     if (elt[geomIndex].IsArea)
         elt[geomIndex] = new TopologyLocation(elt[geomIndex].GetLocations()[0]);
 }
Beispiel #9
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="geomIndex"></param>
 /// <param name="tl"></param>
 private void SetGeometryLocation(int geomIndex, TopologyLocation tl)
 {
     if (tl == null) 
         return;
     elt[geomIndex].SetLocations(tl);
 }
Beispiel #10
0
 /// <summary> 
 /// Merge this label with another one.
 /// Merging updates any null attributes of this label with the attributes from lbl.
 /// </summary>
 /// <param name="lbl"></param>
 public  void Merge(Label lbl)
 {
     for (int i = 0; i < 2; i++) 
     {
         if (elt[i] == null && lbl.elt[i] != null) 
              elt[i] = new TopologyLocation(lbl.elt[i]);            
         else elt[i].Merge(lbl.elt[i]);            
     }
 }
 /// <summary>
 /// Merge updates only the Null attributes of this object
 /// with the attributes of another.
 /// </summary>
 public void Merge(TopologyLocation gl)
 {
     // if the src is an Area label & and the dest is not, increase the dest to be an Area
     if (gl._location.Length > _location.Length)
     {
         Location[] newLoc = new Location[3];
         newLoc[(int)Positions.On] = _location[(int)Positions.On];
         newLoc[(int)Positions.Left] = Location.Null;
         newLoc[(int)Positions.Right] = Location.Null;
         _location = newLoc;
     }
     for (int i = 0; i < _location.Length; i++)
         if (_location[i] == Location.Null && i < gl._location.Length)
             _location[i] = gl._location[i];
 }
Beispiel #12
0
 /// <summary>
 /// Construct a Label with On, Left and Right locations for both Geometries.
 /// Initialize the locations for the given Geometry index.
 /// </summary>
 /// <param name="geomIndex"></param>
 /// <param name="onLoc"></param>
 /// <param name="leftLoc"></param>
 /// <param name="rightLoc"></param>
 public Label(int geomIndex, Location onLoc, Location leftLoc, Location rightLoc)
 {
     elt[0] = new TopologyLocation(Location.Null, Location.Null, Location.Null);
     elt[1] = new TopologyLocation(Location.Null, Location.Null, Location.Null);
     elt[geomIndex].SetLocations(onLoc, leftLoc, rightLoc);
 }        
 /// <summary>
 ///
 /// </summary>
 /// <param name="le"></param>
 /// <param name="locIndex"></param>
 /// <returns></returns>
 public bool IsEqualOnSide(TopologyLocation le, int locIndex)
 {
     return(_location[locIndex] == le._location[locIndex]);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="gl"></param>
 public void SetLocations(TopologyLocation gl)
 {
     for (int i = 0; i < gl._location.Length; i++)
         _location[i] = gl._location[i];
 }
Beispiel #15
0
 /// <summary> 
 /// Construct a Label with a single location for both Geometries.
 /// Initialize the location for the Geometry index.
 /// </summary>
 /// <param name="geomIndex"></param>
 /// <param name="onLoc"></param>
 public Label(int geomIndex, Location onLoc)
 {
     elt[0] = new TopologyLocation(Location.Null);
     elt[1] = new TopologyLocation(Location.Null);
     elt[geomIndex].SetLocation(onLoc);
 }
Beispiel #16
0
 /// <summary>
 /// Construct a Label with On, Left and Right locations for both Geometries.
 /// Initialize the locations for both Geometries to the given values.
 /// </summary>
 /// <param name="onLoc"></param>
 /// <param name="leftLoc"></param>
 /// <param name="rightLoc"></param>
 public Label(Location onLoc, Location leftLoc, Location rightLoc)
 {
     elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc);
     elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc);
 }
Beispiel #17
0
 /// <summary>
 /// Construct a Label with the same values as the argument Label.
 /// </summary>
 /// <param name="lbl"></param>
 public Label(Label lbl)
 {
     elt[0] = new TopologyLocation(lbl.elt[0]);
     elt[1] = new TopologyLocation(lbl.elt[1]);
 }
Beispiel #18
0
 /// <summary> 
 /// Construct a Label with the same values as the argument Label.
 /// </summary>
 /// <param name="lbl"></param>
 public Label(Label lbl)
 {
     elt[0] = new TopologyLocation(lbl.elt[0]);
     elt[1] = new TopologyLocation(lbl.elt[1]);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="le"></param>
 /// <param name="locIndex"></param>
 /// <returns></returns>
 public bool IsEqualOnSide(TopologyLocation le, int locIndex)
 {
     return _location[locIndex] == le._location[locIndex];
 }