Regional forecasts for annotating maps

  • 1
  • Idea
  • Updated 6 years ago
What I'm trying to achieve is to show the forecast temperature and conditions for a large area on a map. The map is interactive and also contains other information so a static gif is not realistic. Is there a better way about this than to query the forecast with a separate API call for each location?

If I query each location individually, each response contains more than a hundred key-value pairs. What I would like to have is a couple main items: latitude, longitude, city name, temperature, precipitation and condition.

The amount of locations would then depend on the size of the region. If I query the whole USA or Europe, I get 1-2 measurements per state/country. If I query a single state, I get a couple more. It's not trivial to define the correct amount, but perhaps it's possible to figure out a reasonable density considering that the aim is to annotate a map.

To avoid the work of manually defining cities for each region, you could define a grid based on the region's size. For a European country include forecasts at 50 kilometer intervals; for a continent include them every 500 kilometers. You could even leave defining the resolution to the client.

I would probably want to define a single date and time in the query. If you combine multiple locations with multiple points in time you run a risk of it getting messy and heavy.

I'm just throwing around initial ideas. Perhaps there's a much better way to annotate a map already in existence.
Photo of Juhani


  • 1 Post
  • 0 Reply Likes

Posted 6 years ago

  • 1

Be the first to post a reply!