nl_tokens: Is the point ( lat lon ) contained in the ( row col ) rectangle ?
pl_tokens: private boolean containsOld ( double wantLat , double wantLon , int [ ] rectIndex ) { rectIndex [ 0 ] = Math . <mask> ( Math . min ( rectIndex [ 0 ] , nrows - 1 ) , 0 ) ; rectIndex [ 1 ] = Math . max ( Math . min ( rectIndex [ 1 ] , ncols - 1 ) , 0 ) ; int row = rectIndex [ 0 ] ; int col = rectIndex [ 1 ] ; if ( debug ) System . out . printf ( " (%d,%d) contains (%f,%f) in (lat=%f %f) (lon=%f %f) ?%n" , rectIndex [ 0 ] , rectIndex [ 1 ] , wantLat , wantLon , latEdge . get ( row , col ) , latEdge . get ( row + 1 , col ) , lonEdge . get ( row , col ) , lonEdge . get ( row , col + 1 ) ) ; if ( wantLat < latEdge . get ( row , col ) ) return false ; if ( wantLat > latEdge . get ( row + 1 , col ) ) return false ; if ( wantLon < lonEdge . get ( row , col ) ) return false ; if ( wantLon > lonEdge . get ( row , col + 1 ) ) return false ; return true ; }