Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in coordinate query #1047

Open
abdulkadirozyurt opened this issue Jan 14, 2025 · 2 comments
Open

Error in coordinate query #1047

abdulkadirozyurt opened this issue Jan 14, 2025 · 2 comments

Comments

@abdulkadirozyurt
Copy link

Hi.

https://wttr.in/raleigh?format=j1

https://wttr.in/35.833960,-78.564961?format=j1

the output of the requests are different. The coordinates specified are a coordinate within Raleigh. However, it does not detect it correctly. So I have queried with many different coordinates and the results are really different. I think the query by coordinate is not working properly or I am doing something wrong. Can you help me with this?

@chubin
Copy link
Owner

chubin commented Jan 14, 2025

Hi, it looks like it is a caching problem.

When you are running

$ curl -s https://wttr.in/35.7803977,-78.6390988?format=j1 | jq .current_condition
$ curl -s https://wttr.in/raleigh?format=j1 | jq .current_condition

there is no difference, exactly as it should be:

$ curl -s https://wttr.in/35.7803977,-78.6390988?format=j1 | jq .current_condition
[
  {
    "FeelsLikeC": "4",
    "FeelsLikeF": "40",
    "cloudcover": "25",
    "humidity": "28",
    "localObsDateTime": "2025-01-14 01:56 PM",
    "observation_time": "06:56 PM",
    "precipInches": "0.0",
    "precipMM": "0.0",
    "pressure": "1023",
    "pressureInches": "30",
    "temp_C": "7",
    "temp_F": "45",
    "uvIndex": "3",
    "visibility": "16",
    "visibilityMiles": "9",
    "weatherCode": "116",
    "weatherDesc": [
      {
        "value": "Partly cloudy"
      }
    ],
    "weatherIconUrl": [
      {
        "value": ""
      }
    ],
    "winddir16Point": "NW",
    "winddirDegree": "308",
    "windspeedKmph": "17",
    "windspeedMiles": "10"
  }
]
$ curl -s https://wttr.in/raleigh?format=j1 | jq .current_condition
[
  {
    "FeelsLikeC": "4",
    "FeelsLikeF": "40",
    "cloudcover": "25",
    "humidity": "28",
    "localObsDateTime": "2025-01-14 01:34 PM",
    "observation_time": "06:34 PM",
    "precipInches": "0.0",
    "precipMM": "0.0",
    "pressure": "1023",
    "pressureInches": "30",
    "temp_C": "7",
    "temp_F": "45",
    "uvIndex": "3",
    "visibility": "16",
    "visibilityMiles": "9",
    "weatherCode": "116",
    "weatherDesc": [
      {
        "value": "Partly cloudy"
      }
    ],
    "weatherIconUrl": [
      {
        "value": ""
      }
    ],
    "winddir16Point": "NW",
    "winddirDegree": "308",
    "windspeedKmph": "17",
    "windspeedMiles": "10"
  }
]

@0PandaDEV
Copy link

I have the exact same problem, but I need to use coordinates because names are just simply not precise enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants