/// <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]; } }
/// <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]); } }
private void SetGeometryLocation(int geomIndex, TopologyLocation tl) { if (tl == null) { return; } _elt[geomIndex].SetLocations(tl); }
/// <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]; } } }
/// <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]); } } }
/// <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]; } } }
/// <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); }
/// <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); }
/// <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); }
/// <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] ); } } }
/// <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]); }
/// <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]); }
/// <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] ); } }
/// <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 ); }
/// <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); }
/// <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]; } } }
/// <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]; } } }
private void SetGeometryLocation(int geomIndex, TopologyLocation tl) { if (tl == null) return; _elt[geomIndex].SetLocations(tl); }
/// <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]); }
/// <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); }
/// <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); }
/// <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); }
/// <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]; }
/// <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); }
/// <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]; } }
/// <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); }