Exemple #1
0
 /// <summary>
 /// Sets the locations from TopologyLocation.
 /// </summary>
 /// <param name="gl"></param>
 public void SetLocations(TopologyLocation gl)
 {
     for (int i = 0; i < gl.Locations.Length; i++)
     {
         _location[i] = gl.Locations[i];
     }
 }
Exemple #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].Locations[0]);
     }
 }
Exemple #3
0
        private void SetGeometryLocation(int geomIndex, TopologyLocation tl)
        {
            if (tl == null)
            {
                return;
            }

            _elt[geomIndex].SetLocations(tl);
        }
Exemple #4
0
        /// <summary>
        /// Constructs a TopologyLocation object.
        /// </summary>
        /// <param name="gl"></param>
        public TopologyLocation(TopologyLocation gl)
        {
            if (gl != null)
            {
                Initialize(gl.Locations.Length);

                for (int i = 0; i < _location.Length; i++)
                {
                    _location[i] = gl.Locations[i];
                }
            }
        }
Exemple #5
0
 /// <summary>
 /// Merge this label with another one. Merging updates any null attributes of this label
 /// with the attributes from label.
 /// </summary>
 /// <param name="lbl"></param>
 public void Merge(Label lbl)
 {
     for (int i = 0; i < 2; i++)
     {
         if (_elt[i] == null && lbl.LabelElements[i] != null)
         {
             _elt[i] = new TopologyLocation(lbl.LabelElements[i]);
         }
         else
         {
             _elt[i].Merge(lbl.LabelElements[i]);
         }
     }
 }
Exemple #6
0
 /// <summary>
 /// Merge updates only the NULL attributes of this object ith the attributes of another.
 /// </summary>
 /// <param name="gl">The object to merge attributes with.</param>
 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.Locations.Length > _location.Length)
     {
         int [] newLoc = new int[3];
         newLoc[Position.On]    = _location[Position.On];
         newLoc[Position.Left]  = Location.Null;
         newLoc[Position.Right] = Location.Null;
         _location = newLoc;
     }
     for (int i = 0; i < _location.Length; i++)
     {
         if (_location[i] == Location.Null && i < gl.Locations.Length)
         {
             _location[i] = gl.Locations[i];
         }
     }
 }
Exemple #7
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(int onLoc, int leftLoc, int rightLoc)
 {
     _elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc);
     _elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc);
 }
Exemple #8
0
 /// <summary>
 /// Construct a Label with a single location for both Geometries. Initialize the locations to Null
 /// </summary>
 /// <param name="onLoc"></param>
 public Label(int onLoc)
 {
     _elt[0] = new TopologyLocation(onLoc);
     _elt[1] = new TopologyLocation(onLoc);
 }
Exemple #9
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, int onLoc)
 {
     _elt[0] = new TopologyLocation(Location.Null);
     _elt[1] = new TopologyLocation(Location.Null);
     _elt[geomIndex].SetLocation(onLoc);
 }
Exemple #10
0
 /// <summary>
 /// Merge this label with another one. Merging updates any null attributes of this label
 /// with the attributes from label.
 /// </summary>
 /// <param name="lbl"></param>
 public void Merge( Label lbl )
 {
     for (int i = 0; i < 2; i++)
     {
         if (_elt[i] == null && lbl.LabelElements[i] != null)
         {
             _elt[i] = new TopologyLocation( lbl.LabelElements[i] );
         }
         else
         {
             _elt[i].Merge( lbl.LabelElements[i] );
         }
     }
 }
Exemple #11
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.LabelElements[0]);
     _elt[1] = new TopologyLocation(lbl.LabelElements[1]);
 }
Exemple #12
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.LabelElements[0]);
     _elt[1] = new TopologyLocation(lbl.LabelElements[1]);
 }
Exemple #13
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].Locations[0] );
     }
 }
Exemple #14
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.Locations );
     _elt[1] = new TopologyLocation( gl.Locations );
     _elt[geomIndex].SetLocations( gl );
 }
Exemple #15
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.Locations);
     _elt[1] = new TopologyLocation(gl.Locations);
     _elt[geomIndex].SetLocations(gl);
 }
Exemple #16
0
        /// <summary>
        /// Constructs a TopologyLocation object.
        /// </summary>
        /// <param name="gl"></param>
        public TopologyLocation(TopologyLocation gl)
        {
            if (gl != null)
            {
                Initialize( gl.Locations.Length );

                for (int i = 0; i < _location.Length; i++)
                {
                    _location[i] = gl.Locations[i];
                }
            }
        }
Exemple #17
0
 /// <summary>
 /// Merge updates only the NULL attributes of this object ith the attributes of another.
 /// </summary>
 /// <param name="gl">The object to merge attributes with.</param>
 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.Locations.Length > _location.Length)
     {
         int [] newLoc = new int[3];
         newLoc[Position.On] = _location[Position.On];
         newLoc[Position.Left] = Location.Null;
         newLoc[Position.Right] = Location.Null;
         _location = newLoc;
     }
     for (int i = 0; i < _location.Length; i++)
     {
         if (_location[i] == Location.Null && i < gl.Locations.Length)
         {
             _location[i] = gl.Locations[i];
         }
     }
 }
Exemple #18
0
        private void SetGeometryLocation(int geomIndex, TopologyLocation tl)
        {
            if (tl == null) return;

            _elt[geomIndex].SetLocations(tl);
        }
Exemple #19
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="le"></param>
 /// <param name="locIndex"></param>
 /// <returns></returns>
 public bool IsEqualOnSide(TopologyLocation le, int locIndex)
 {
     return(_location[locIndex] == le.Locations[locIndex]);
 }
Exemple #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( int onLoc, int leftLoc, int rightLoc )
 {
     _elt[0] = new TopologyLocation(onLoc, leftLoc, rightLoc);
     _elt[1] = new TopologyLocation(onLoc, leftLoc, rightLoc);
 }
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, int onLoc )
 {
     _elt[0] = new TopologyLocation(Location.Null);
     _elt[1] = new TopologyLocation(Location.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( int onLoc )
 {
     _elt[0] = new TopologyLocation(onLoc);
     _elt[1] = new TopologyLocation(onLoc);
 }
Exemple #23
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="le"></param>
 /// <param name="locIndex"></param>
 /// <returns></returns>
 public bool IsEqualOnSide( TopologyLocation le, int locIndex )
 {
     return _location[locIndex] == le.Locations[locIndex];
 }
Exemple #24
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, int onLoc, int leftLoc, int 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);
 }
Exemple #25
0
 /// <summary>
 /// Sets the locations from TopologyLocation.
 /// </summary>
 /// <param name="gl"></param>
 public void SetLocations( TopologyLocation gl )
 {
     for (int i = 0; i < gl.Locations.Length; i++)
     {
         _location[i] = gl.Locations[i];
     }
 }
Exemple #26
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, int onLoc, int leftLoc, int 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);
 }