Пример #1
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]);
     }
 }
Пример #2
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];
     }
 }
Пример #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);
 }
Пример #4
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];
     }
 }
Пример #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];
         }
     }
 }
Пример #6
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]);
         }
     }
 }
Пример #7
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];
         }
     }
 }
Пример #8
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];
 }
Пример #9
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];
 }
Пример #10
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);
 }
Пример #11
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);
 }
Пример #12
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);
 }
Пример #13
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);
 }
Пример #14
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]);
 }
Пример #15
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]);
 }
Пример #16
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]);
     }
 }
Пример #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]);
 }
Пример #18
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);
 }
Пример #19
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);
 }
Пример #20
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];
 }
Пример #21
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]);
 }
Пример #22
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);
 }
Пример #23
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);
 }
Пример #24
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);
 }
Пример #25
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);
 }
Пример #26
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);
 }