wttr.in icon indicating copy to clipboard operation
wttr.in copied to clipboard

City name and US ZIP code both ambiguous

Open pneumic opened this issue 3 years ago • 4 comments

Both my city name and US ZIP code are ambiguous, and default to locations other than my own.

For example, this result appears to represent Gloucester, UK instead of Gloucester, Massachusetts:

~ % curl wttr.in/Gloucester | grep Location
Location: Gloucester [51.86568,-2.2431]

And my US zip code of 01930 appears to represent a location in Turkey:

~ % curl wttr.in/01930 | grep Location
Location: Fatih Sultan Mehmet Mahallesi, Ceyhan, Adana, Akdeniz Bölgesi, 01930, Türkiye [37.03948962727272,35.82086093636364]

Is there any way for me to work around this? Using the nearest airports are not desirable as they are too far away to accurately represent the weather.

pneumic avatar Jul 29 '22 15:07 pneumic

Yes. Try to add ,MA to the location name:

$ curl -ks https://wttr.in/Gloucester,MA | grep Location:
Location: Gloucester, Essex County, Massachusetts, United States [42.6159286,-70.6619888]

chubin avatar Oct 23 '22 19:10 chubin

Is there a way to tell wttr "this is a US ZIP code", so that wttr doesn't have to guess?

eminence avatar Oct 23 '22 22:10 eminence

Yes. Try to add ,MA to the location name:

$ curl -ks https://wttr.in/Gloucester,MA | grep Location:
Location: Gloucester, Essex County, Massachusetts, United States [42.6159286,-70.6619888]

This works. I swear I tried this but I must have missed it. Thanks very much.

pneumic avatar Oct 26 '22 20:10 pneumic

Is there a way to tell wttr "this is a US ZIP code", so that wttr doesn't have to guess?

I'd also like to know if this might be possible, so that postal codes that may be shared in different regions can be disambiguated.

paulrudy avatar Jun 09 '24 05:06 paulrudy