} // private void LabelIsolatedEdges( int thisIndex, int targetIndex )

		/// <summary>
		/// Label an isolated edge of a graph with its relationship to the target geometry.
		/// If the target has dim 2 or 1, the edge can either be in the interior or the exterior.
		/// If the target has dim 0, the edge must be in the exterior.
		/// </summary>
		/// <param name="e"></param>
		/// <param name="targetIndex"></param>
		/// <param name="target"></param>
		private void LabelIsolatedEdge(Edge e, int targetIndex, Geometry target)
		{
			// this won't work for GeometryCollections with both dim 2 and 1 geoms
			if ( target.GetDimension() > 0) 
			{
				// since edge is not in boundary, may not need the full generality of PointLocator?
				// Possibly should use ptInArea locator instead?  We probably know here
				// that the edge does not touch the bdy of the target Geometry
				int loc = _ptLocator.Locate( e.GetCoordinate(), target );
				e.Label.SetAllLocations( targetIndex, loc );
			} // if ( target.Dimension > 0)
			else 
			{
				e.Label.SetAllLocations( targetIndex, Location.Exterior );
			}
			//Trace.WriteLine( e.Label.ToString() );

		} // private void LabelIsolatedEdge(Edge e, int targetIndex, Geometry target)
Exemple #2
0
		///<summary>
		/// Returns true if the DE-9IM intersection matrix for the two Geometrys is T*F**FFF*.  
		///</summary>
		///<remarks>EqualsTopology is a topological relationship, and does not imply that the Geometries have
		///the same points or even that they are of the same class.  This more restrictive form of equality
		///is implemented in the Equals method.  Two geometries are topologically equal if and only iff their interiors
		///intersect and no part of the interior or boundary of one geomtry intersects the exterior of the other.
		///</remarks>
		///<param name="geometry">The Geometry with which to compare this Geometry.</param>
		///<returns>Returns true if the two Geometrys are equal.</returns>
		public virtual bool EqualsTopology(Geometry geometry)
		{
			return Relate( geometry ).IsEquals( GetDimension(), geometry.GetDimension() );
		} // public virtual bool Equals(Geometry geometry)
Exemple #3
0
		///<summary>
		///  Returns true if the DE-9IM intersection matrix for the two Geometrys is: T*T****** for a point
		///  and a curve, a point and an area or a line  and an area, 0******** for two curves.  
		///</summary>
		///<param name="geometry">The Geometry with which to compare this Geometry.</param>
		///<returns>Returns true if the two Geometrys cross.  For this function to return true, the Geometry's
		/// must be a point and a curve; a point and a surface; two curves; or a  curve and a surface.</returns>
		public virtual bool Crosses(Geometry geometry) 
		{
			return Relate(geometry).IsCrosses( GetDimension(), geometry.GetDimension() );
		}
Exemple #4
0
		///<summary>
		///  Returns true if the DE-9IM intersection matrix for the two  Geometrys is: &lt;br&gt;
		///		T*T***T** (for two points or two surfaces) &lt;br&gt;
		///		1*T***T** (for two curves)  
		///</summary>
		///<param name="geometry">The Geometry with which to compare this Geometry.</param>
		///<returns>
		/// Returns true if the two Geometrys overlap.  For this function to return true, 
		/// the Geometry  s must be two points, two curves or two surfaces.
		///</returns>
		public virtual bool Overlaps(Geometry geometry) 
		{
			return Relate(geometry).IsOverlaps( GetDimension(), geometry.GetDimension() );
		}
Exemple #5
0
		///<summary>
		///  Returns true if the DE-9IM intersection matrix for the two
		///  Geometrys is FT*******, F**T***** or F***T****.  
		///</summary>
		///<param name="geometry">The Geometry with which to compare this Geometry.</param>
		///<returns>Returns true if the two Geometrys touch;  Returns false if both Geometrys are points.</returns>
		public virtual bool Touches(Geometry geometry) 
		{
			return Relate(geometry).IsTouches( GetDimension(), geometry.GetDimension() );
		}