WXforum.net
Weather Software => Station Software Development => Topic started by: dnavarrojr on January 07, 2019, 07:04:25 AM
-
I am running into issues with forecast data using the "forecast.weather.gov/MapClick.php" XML interface. I can't target specific stations with it, unless I do a LOT of messing with the LAT/LON coordinates.
I'm using Geocodio to convert zipcodes into LAT/LON coordinates, but they often don't match the nearest airport. So I have to spend time messing with LAT/LON until I get the right numbers to the airport using the MapClick interface. What's TRULY ODD is that if I put in a zip code using the web interface, I get the correct station. I then copy the LAT/LON coordinates into my code and I still don't get the correct station.
I built my own database of Zipcodes to Stations, but I can't target the stations for Forecast data, only current weather unless I use the new API interface. But even then I don't get the same data I get from MapClick.... It's all a big mess.
-
I'm pretty sure Ken said this is still in beta, which is why I am running version 4.05 of the advforecast2.php script on my site.
-
Yes, it's still in Beta with no time announced for implementation into production. That applies to api.weather.gov and forecast-v3.weather.gov sites.
-
It probably means creating a different topic / question to better fit, but could you explain in detail what you are trying to accomplish? From my read (although I do miss things... :grin:) it seems that you are trying to get the forecast for the nearest airport location for any given location (lat/long). That's why it isn't making sense for me. In my case, I want *my* point forecast, not the one for the nearest airport, which in my case happens to be in a different forecast zone.
But anyway, I'm sure I'm missing something, so if you feel like going into detail, someone might come up with a solution.
-
My issue is that forecast.weather.gov is not accurate. It does not, in fact, show the closest airport to those coordinates. I have put in the EXACT coordinates for an airport and still got a smaller airport nearby.
In one case (I can't remember which) the coordinates using forecast.weather.gov to target a specific airport are, in fact, 1.8 miles off from the actual coordinates of the airport tower, in the middle of a corn field.
I am working on a weather widget for 487 radio stations/web sites owned by my employer. And I want to target very specific airports/weather stations for each location. Doing it by geocordinates has proven difficult.
I may just use api.weather.gov anyway, which does allow me to just specify the station name that I want for forecast data.
-
If anyone is interested, I downloaded data from the API to build a CSV with Station Info
https://github.com/dnavarrojr/CSV-Data-Sets
The city isn't accurate, but the rest of the data comes directly from the API.