Weather Lookup Returning an Invalid City

  • 1
  • Problem
  • Updated 6 years ago
We are performing a forecast weather lookup

http://api.wunderground.com/api//fore...,

The JSON reply will include location, and simple forecast

"location": {
"type":"CITY",
"country":"US",
"country_iso3166":"US",
"country_name":"USA",
"state":"CO",
"city":"Erie",
"tz_short":"MST",
"tz_long":"America/Denver",
"lat":"39.996734",
"lon":"-105.056461",
"zip":"80026",
"magic":"13",
....
}

"forecast" : {
"simpleforecast" : {
"forecastday" : [ { weather for today }, { weather for tomorrow }, .... ]
{ .... another day ... }
],
},
}

In some cases, the location city will not be a city, like "San Francisco", but
a strange name, like:

"Airport Mail Center"
"Permanente"

Any idea why?

Thx.
Photo of Tempo

Tempo

  • 2 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
The rest of your query was cut off. If you search by city you should get the city, but sometimes a lat/lon search will return a neighborhood name from our db.
Photo of Tempo

Tempo

  • 2 Posts
  • 0 Reply Likes
Is there no way to get the city instead of the neighborhood? Sometimes the neighborhood seems very wrong:

eg, we have received Airport Mail Center and Permanente

Please advise?
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
We have to handle these on a case by case basis, so we need the lat/lon each time there is a neighborhood name issue like this.