Пример #1
0
		/// <summary>
		/// Tests if MultiPoint is simple.
		/// </summary>
		/// <param name="mp">Geometry to test.  Must be of type MultiPoint.</param>
		/// <returns>Returns True if geometry is simple.</returns>
		/// <remarks>A MultiPoint is simple if and only if it has no repeated points.</remarks>
		public bool IsSimple( MultiPoint mp )
		{
			if ( mp.IsEmpty() )
			{
				return true;
			}
			SortedList points = new SortedList();
			for ( int i = 0; i < mp.GetNumGeometries(); i++ ) 
			{
				Point pt = (Point) mp.GetGeometryN( i );
				Coordinate p = pt.GetCoordinate();
				if ( points.Contains( p ) )
				{
					return false;
				}
				points.Add( p, p );
			} //for ( int i = 0; i < mp.NumGeometries; i++ )
			return true;
		} // public bool IsSimple( MultiPoint mp )