fixed nearestLand bug when using dataframes as input