I'm trying do a few different things here..
First, I have an array of values from the watershed polygon 'shape' field in a shapefile.
Rarray = watershed.shape.getPart(0)
I'm making the assumption that the outflow point will be the value with the lowest ZMin. So, ZMin coordinates will be the outflow point (p1).
What I am attempting to do is find the point (p2) within the polygon array that is furthest from this x,y,z outflow point. It should be one of the values within the array
From there, I am trying to calculate the distance between p1 (outflow) and p2(furthest away) so that I can use that value to calculate the relief ratio of the watershed using this formula
ReliefRat = (max elevation - min elevation) / Length of longest axis
So far I have this...
Rarray = watershed.shape.getPart(0)
ReliefRat = (ZMax-ZMin)/(((p2.X-p1.X)**(2.0)) + ((p2.Y-p1.Y)**(2.0)))**(0.5)
...Where p1 is the outflow point. I just don't know how to find p2.
If there is somebody out there that can walk me through this it would be greatly appreciated!