/// <summary>
 ///
 /// </summary>
 /// <param name="gl"></param>
 public virtual void SetLocations(TopologyLocation gl)
 {
     for (int i = 0; i < gl._location.Length; i++)
     {
         _location[i] = gl._location[i];
     }
 }
Exemple #2
0
 /// <summary>
 /// Converts one GeometryLocation to a Line location.
 /// </summary>
 /// <param name="geomIndex"></param>
 public virtual void ToLine(int geomIndex)
 {
     if (_elt[geomIndex].IsArea)
     {
         _elt[geomIndex] = new TopologyLocation(_elt[geomIndex].GetLocations()[0]);
     }
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="gl"></param>
 public TopologyLocation(TopologyLocation gl)
 {
     if (gl == null)
     {
         return;
     }
     Init(gl._location.Length);
     for (int i = 0; i < _location.Length; i++)
     {
         _location[i] = gl._location[i];
     }
 }
Exemple #4
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 virtual 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 virtual 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)
     {
         LocationType[] newLoc = new LocationType[3];
         newLoc[(int)PositionType.On]    = _location[(int)PositionType.On];
         newLoc[(int)PositionType.Left]  = LocationType.Null;
         newLoc[(int)PositionType.Right] = LocationType.Null;
         _location = newLoc;
     }
     for (int i = 0; i < _location.Length; i++)
     {
         if (_location[i] == LocationType.Null && i < gl._location.Length)
         {
             _location[i] = gl._location[i];
         }
     }
 }
Exemple #6
0
 /// <summary>
 /// Converts one GeometryLocation to a Line location.
 /// </summary>
 /// <param name="geomIndex"></param>
 public virtual void ToLine(int geomIndex)
 {
     if (_elt[geomIndex].IsArea)
         _elt[geomIndex] = new TopologyLocation(_elt[geomIndex].GetLocations()[0]);
 }
Exemple #7
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 virtual 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]);
     }
 }
Exemple #8
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]);
 }
Exemple #9
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);
 }
Exemple #10
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, LocationType onLoc, LocationType leftLoc, LocationType rightLoc)
 {
     _elt[0] = new TopologyLocation(LocationType.Null, LocationType.Null, LocationType.Null);
     _elt[1] = new TopologyLocation(LocationType.Null, LocationType.Null, LocationType.Null);
     _elt[geomIndex].SetLocations(onLoc, leftLoc, rightLoc);
 }
Exemple #11
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(LocationType onLoc, LocationType leftLoc, LocationType rightLoc)
 {
     _elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc);
     _elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc);
 }
Exemple #12
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, LocationType onLoc)
 {
     _elt[0] = new TopologyLocation(LocationType.Null);
     _elt[1] = new TopologyLocation(LocationType.Null);
     _elt[geomIndex].SetLocation(onLoc);
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="gl"></param>
 public virtual void SetLocations(TopologyLocation gl)
 {
     for (int i = 0; i < gl._location.Length; i++)
         _location[i] = gl._location[i];
 }
Exemple #14
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(LocationType onLoc, LocationType leftLoc, LocationType rightLoc)
 {
     _elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc);
     _elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc);
 }
Exemple #15
0
 /// <summary>
 /// Construct a Label with a single location for both Geometries.
 /// Initialize the locations to Null.
 /// </summary>
 /// <param name="onLoc"></param>
 public Label(LocationType onLoc)
 {
     _elt[0] = new TopologyLocation(onLoc);
     _elt[1] = new TopologyLocation(onLoc);
 }
Exemple #16
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]);
 }
Exemple #17
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);
 }
 /// <summary>
 /// Merge updates only the Null attributes of this object
 /// with the attributes of another.
 /// </summary>
 public virtual 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)
     {
         LocationType[] newLoc = new LocationType[3];
         newLoc[(int)PositionType.On] = _location[(int)PositionType.On];
         newLoc[(int)PositionType.Left] = LocationType.Null;
         newLoc[(int)PositionType.Right] = LocationType.Null;
         _location = newLoc;
     }
     for (int i = 0; i < _location.Length; i++)
         if (_location[i] == LocationType.Null && i < gl._location.Length)
             _location[i] = gl._location[i];
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="gl"></param>
 public TopologyLocation(TopologyLocation gl)
 {
     if (gl == null) return;
     Init(gl._location.Length);
     for (int i = 0; i < _location.Length; i++)
         _location[i] = gl._location[i];
 }
Exemple #20
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="le"></param>
 /// <param name="locIndex"></param>
 /// <returns></returns>
 public virtual bool IsEqualOnSide(TopologyLocation le, int locIndex)
 {
     return(_location[locIndex] == le._location[locIndex]);
 }
Exemple #21
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, LocationType onLoc)
 {
     _elt[0] = new TopologyLocation(LocationType.Null);
     _elt[1] = new TopologyLocation(LocationType.Null);
     _elt[geomIndex].SetLocation(onLoc);
 }
Exemple #22
0
 /// <summary>
 /// Construct a Label with a single location for both Geometries.
 /// Initialize the locations to Null.
 /// </summary>
 /// <param name="onLoc"></param>
 public Label(LocationType onLoc)
 {
     _elt[0] = new TopologyLocation(onLoc);
     _elt[1] = new TopologyLocation(onLoc);
 }
Exemple #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, LocationType onLoc, LocationType leftLoc, LocationType rightLoc)
 {
     _elt[0] = new TopologyLocation(LocationType.Null, LocationType.Null, LocationType.Null);
     _elt[1] = new TopologyLocation(LocationType.Null, LocationType.Null, LocationType.Null);
     _elt[geomIndex].SetLocations(onLoc, leftLoc, rightLoc);
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="le"></param>
 /// <param name="locIndex"></param>
 /// <returns></returns>
 public virtual bool IsEqualOnSide(TopologyLocation le, int locIndex)
 {
     return _location[locIndex] == le._location[locIndex];
 }