Geometry is your friend here. Lets say the pin is in the back of the green. From your ball start walking in an arc towards the front of the green to until you get full relief from the path. So in your diagram the flag would be on the top of the diagram and your would take your shot from further on the bottom of the diagram, not just a straight out from where the ball is on the path. If the pin was on the front of the green then take the same arc towards the back of the green.