If Statement Satisfied but not Entering?

1135
10
Jump to solution
08-08-2017 12:10 PM
TylerSearls2
New Contributor III

I have some code that seems to behave as expected and occasionally satisfies an if loop i've created but the code never seems to enter the loop. Even where the if statement is satisfied. Any help would be appreciated. The 'Warning' Messages a just to trigger a different font effect in the display box as the tool runs. The if statement at line 21 in the attached file is the issue, though as I've said it triggers no errors.

0 Kudos
10 Replies
TylerSearls2
New Contributor III

I have come up with an approach to automate pour point creation with slight setbacks from a given stream's delineated outlet (this was the intent):

1. Create a point layer with points for each vertice in the stream network layer
2. Buffer each vertice a (small) desired amount (i arbitrarily chose 10 metres)
3. Run intersect and create points as the output, this will create a series of points where the buffer intersects the stream layer at the setback amount.
4. Identify which points of intersection are of the desired order or greater. Remove those that are not.
5. Identify the smallest remaining order within the buffer. Any points greater than the smallest order (i.e the stream being flowed into) will be removed.
6. Left with the smallest order points which are greater than the specified minimum order of concern.
7. These are the pour points (automated). I snapped the pour points back half of the original setback (5m). So the pour point should be 5 or so metres from the actual outlet (dependent on the shape of the stream), which makes for clean delineation.


Hoping the brief description is clear.