cdm/src/main/java/ucar/nc2/ft2/simpgeometry/SimpleGeometryIndexFinder.java
public int getEnd(int index) {

		// Test if the last beginning is the new end
		if(index == (pastIndex - 1))
		{
			return previousBegin - 1;
		}
		
		// Otherwise find it!
		int new_end = 0;
		for(int i = 0; i < index + 1; i++) {
			new_end += getNodeCount(i);
		}
		
		pastIndex = index;
		previousEnd = new_end;
		return new_end - 1;
	}
public int getEnd(int index) {

		// Test if the last beginning is the new end
		if(index == (pastIndex - 1))
		{
			return previousBegin - 1;
		}
		
		// Otherwise find it!
		int new_end = 0;
		for(int i = 0; i < index + 1; i++) {
			new_end += getNodeCount(i);
		}
		
		pastIndex = index;
		previousEnd = new_end;
		return new_end - 1;
	}
public int getEnd ( int index ) { // Test if the last beginning is the new end
 if ( index == ( pastIndex - 1 ) ) { return previousBegin - 1 ; } // Otherwise find it!
 int new_end = 0 ; for ( int i = 0 ; i < index + 1 ; i ++ ) { new_end += getNodeCount ( i ) ; } pastIndex = index ; previousEnd = new_end ; return new_end - 1 ; }
Gets the ending index of a geometry's points given the index of the geometry within the array.

@param index of the geometry within the array
@return end of the range
Gets the ending index of a geometry s points given the index of the geometry within the array .