Пример #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="geomIndex"></param>
 /// <param name="tl"></param>
 private void SetGeometryLocation(int geomIndex, TopologyLocation tl)
 {
     if (tl == null)
     {
         return;
     }
     elt[geomIndex].SetLocations(tl);
 }
Пример #3
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];
            }
        }
Пример #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 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]);
         }
     }
 }
Пример #5
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);
 }
Пример #6
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);
 }
Пример #7
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);
 }
Пример #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(Location onLoc)
 {
     elt[0] = new TopologyLocation(onLoc);
     elt[1] = new TopologyLocation(onLoc);
 }
Пример #9
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]);
 }