Hydrogen vs. Battery Electric Cars

I foresee hydrogen gas stations producing their own hydrogen on the spot.  using current water lines to get the water and separating the hydrogen and compressing it in location removing the need to transport.  The only issue I see with hydrogen is if it gets released into the atmosphere, it is lost forever.  so in a time of water shortages, we have to be careful on what we are doing with the precocious element.