* Move the function `draw_position` to the maps module and split it up
* Replace and refactor `pollen_at` and `uvi_at` methods on `Maps`
by `pollen_mark` and `uvi_mark`
* Drop the `pollen_project` and `uvi_project` methods on `Maps`,
just call the `project` helper method directly
* Add `map_at` and `mark` helper methods that handle maps slicing
and drawing
* Rename `pollen_sample` and `uvi_sample` methods on `Maps` to their
plural forms
* Also, rename the map handlers to `map_address` and `map_geo`
* Use the `Europe::Amsterdam` time zone from `chrono_tz` to determine
what date/time it is in that time zone
* Parse timestamps in the rain text API relative to this date/time
* Add the `fix_items_day_boundary` function to fix up stuff if
the series of timestamps in the rain text cross the day boundary
* Adapt `retrieve_image` to also return a timestamp based on the
CDN's last modified time; adapt other methods accordingly
* For the maps module, use `chrono::Utc` instead of
`tokio::time::Instant` and use `chrono::Duration` instead of
`tokio::time::Duration`
* Pass the maps timestamp to the `sample` function so it can use
that timestamp as base
* Define the map key for Buienradar as `MAP_KEY` (colors used on
Buienradar maps)
* Define a `MapkeyHistogram` type and add the `map_key_historgram()`
function to construct one
* Define the sample size to look for pixels around the sampling
coordinate
* Introduce a separata `sample` function that returns the samples
for a map and the provided coordinates and starting timestamp
* Implement `Maps::pollen_sample` and Maps::uvi_sample`
* A map is a view into the image of concatenated maps
* Ensure that projection only happens on the first map
* Make `project` generic over all generic image views
* Add map reference point constants `*_MAP_REF_POINTS `that can be used
for map projections
* Add (unimplemented )`*_project` and `*_sample` methods to the `Maps`
implementation
* Add `PollenSample` and `UviSample` structs
* Make `Position::new` const
* Add `is_*_stale` methods to the `MapRefresh` trait
* Only update the maps of a type if `retrieve_image` yielded something
or if the maps are stale
* Also only then bump the timestamp for the map type
This means if there is nothing in the cache, it will retry each refresh
to get something because the timestamp is not bumped until there is
something. Once there are maps, it will only update it and bump the
timestamp if there is an image, that or, it has become stale and it
can be set to `None` and we end up in the initial state.
This calculates which offset to use in the maps series with respect to
the instant of caching. It assumes the first map is current for the
instant it was retrieved.
* Rename `*_first` to `*_at` methods
* For convenience, change the types of `*_MAP_COUNT` to `u32`
* Introduce `*_MAP_INTERVAL` constants to indicate the number of
seconds each map in the series applies to
* Return `None` if the provided instant is too far in the future
* Use `Position` everywhere instead of latitude/longitude float values
* Implement `Partial`, `Eq` and `Hash` for `Position` so it can
part of a cache key
* Drop the `cache_key` helper function
* Rename the `address_position` function to `resolve_address`
* Add methods on `Position` for formatting latitude/longitude with
a given precision (used for URL parameters in providers)
* Also cache address geocoding requests to OSM Nomatim!
* Use the `cached` crate for an easy implementation
* Add the `cache_key` helper function to deal with floats being annoying
* Cache Buienradar get request for 5 minutes (per position/metric)
* Cache Luchtmeetnet get request for 5 minutes (per position/metric)
* Note the `Item` structs need to implement `Clone` now because
the cache will own them and Rocket will want a copy too
* Add the `csv` crate as a dependency
* Use the `Row` struct as intermediate object
* Turn the `parse_value` function into the `convert_value` function that
cannot fail