The heuristic of dR/dC minimization to enumerate the sides of a polygon seems to work IFF the point in question is within a polygon. But if the point is outside of the mesh it can enumerate a (possibly large non-simple) polygon, causing interpolations to include numerous inappropriate points.
Point-Inside-Polygon detection is relatively expensive. I have (in outsideMesh) a few cheap heuristics, which can fail if a point is outside the polygon but inside its enclosing box.
[this ticks me off, but I may be the only person who will ever notice overly complex land water boundaries at the outer edge of the map]
The heuristic of dR/dC minimization to enumerate the sides of a polygon seems to work IFF the point in question is within a polygon. But if the point is outside of the mesh it can enumerate a (possibly large non-simple) polygon, causing interpolations to include numerous inappropriate points.
Point-Inside-Polygon detection is relatively expensive. I have (in outsideMesh) a few cheap heuristics, which can fail if a point is outside the polygon but inside its enclosing box.
[this ticks me off, but I may be the only person who will ever notice overly complex land water boundaries at the outer edge of the map]