Beispiel #1
0
 /// <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>
 /// 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 #3
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 #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="gl"></param>
 public TopologyLocation(TopologyLocation gl) 
 {
     Init(gl.location.Length);
     if (gl != null) 
     {
         for (int i = 0; i < location.Length; i++) 
             location[i] = gl.location[i];                
     }
 }
Beispiel #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="gl"></param>
 public TopologyLocation(TopologyLocation gl)
 {
     Init(gl.location.Length);
     if (gl != null)
     {
         for (int i = 0; i < location.Length; i++)
         {
             location[i] = gl.location[i];
         }
     }
 }
Beispiel #7
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 #8
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]);
         }
     }
 }
Beispiel #9
0
 /// <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)
     {
         Locations[] newLoc = new Locations[3];
         newLoc[(int)Positions.On]    = location[(int)Positions.On];
         newLoc[(int)Positions.Left]  = Locations.Null;
         newLoc[(int)Positions.Right] = Locations.Null;
         location = newLoc;
     }
     for (int i = 0; i < location.Length; i++)
     {
         if (location[i] == Locations.Null && i < gl.location.Length)
         {
             location[i] = gl.location[i];
         }
     }
 }
Beispiel #10
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, Locations onLoc)
 {
     elt[0] = new TopologyLocation(Locations.Null);
     elt[1] = new TopologyLocation(Locations.Null);
     elt[geomIndex].SetLocation(onLoc);
 }
Beispiel #11
0
 /// <summary>
 /// Construct a Label with a single location for both Geometries.
 /// Initialize the locations to Null.
 /// </summary>
 /// <param name="onLoc"></param>
 public Label(Locations onLoc)
 {
     elt[0] = new TopologyLocation(onLoc);
     elt[1] = new TopologyLocation(onLoc);
 }
Beispiel #12
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 #13
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 #14
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, Locations onLoc)
 {
     elt[0] = new TopologyLocation(Locations.Null);
     elt[1] = new TopologyLocation(Locations.Null);
     elt[geomIndex].SetLocation(onLoc);
 }
Beispiel #15
0
 /// <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) 
     {
         Locations[] newLoc = new Locations[3];
         newLoc[(int)Positions.On] = location[(int)Positions.On];
         newLoc[(int)Positions.Left] = Locations.Null;
         newLoc[(int)Positions.Right] = Locations.Null;
         location = newLoc;
     }
     for (int i = 0; i < location.Length; i++) 
         if (location[i] == Locations.Null && i < gl.location.Length)
             location[i] = gl.location[i];
 }
Beispiel #16
0
 /// <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];
 }
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>
 ///
 /// </summary>
 /// <param name="le"></param>
 /// <param name="locIndex"></param>
 /// <returns></returns>
 public bool IsEqualOnSide(TopologyLocation le, int locIndex)
 {
     return(location[locIndex] == le.location[locIndex]);
 }
Beispiel #19
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, Locations onLoc, Locations leftLoc, Locations rightLoc)
 {
     elt[0] = new TopologyLocation(Locations.Null, Locations.Null, Locations.Null);
     elt[1] = new TopologyLocation(Locations.Null, Locations.Null, Locations.Null);
     elt[geomIndex].SetLocations(onLoc, leftLoc, rightLoc);
 }
Beispiel #20
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(Locations onLoc, Locations leftLoc, Locations rightLoc)
 {
     elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc);
     elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc);
 }
Beispiel #21
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(Locations onLoc, Locations leftLoc, Locations rightLoc)
 {
     elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc);
     elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc);
 }
Beispiel #22
0
        /// <summary> 
        /// Construct a Label with the same values as the argument for the
        /// given Geometry index.
        /// </summary>
        /// <param name="geomIndex"></param>
        /// <param name="gl"></param>
        public Label(int geomIndex, TopologyLocation gl)
        {

            elt[0] = new TopologyLocation(gl.GetLocations());
            elt[1] = new TopologyLocation(gl.GetLocations());
            elt[geomIndex].SetLocations(gl);
        }
Beispiel #23
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, Locations onLoc, Locations leftLoc, Locations rightLoc)
 {
     elt[0] = new TopologyLocation(Locations.Null, Locations.Null, Locations.Null);
     elt[1] = new TopologyLocation(Locations.Null, Locations.Null, Locations.Null);
     elt[geomIndex].SetLocations(onLoc, leftLoc, rightLoc);
 }
Beispiel #24
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 #25
0
 /// <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 #26
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]);            
     }
 }
Beispiel #27
0
 /// <summary>
 /// Construct a Label with the same values as the argument for the
 /// given Geometry index.
 /// </summary>
 /// <param name="geomIndex"></param>
 /// <param name="gl"></param>
 public Label(int geomIndex, TopologyLocation gl)
 {
     elt[0] = new TopologyLocation(gl.GetLocations());
     elt[1] = new TopologyLocation(gl.GetLocations());
     elt[geomIndex].SetLocations(gl);
 }
Beispiel #28
0
 /// <summary>
 /// Construct a Label with a single location for both Geometries.
 /// Initialize the locations to Null.
 /// </summary>
 /// <param name="onLoc"></param>
 public Label(Locations onLoc)
 {
     elt[0] = new TopologyLocation(onLoc);
     elt[1] = new TopologyLocation(onLoc);
 }