1. 12 May, 2020 1 commit
    • Volker Krause's avatar
      Exclude the polar regions from the timezone index · 435da2ca
      Volker Krause authored
      This allows us to move about 20% of the available z-order curve length
      to more relevant regions, increasing the precision there.
      
      This however further increases the aspect ration to ~2.2, it might
      therefore make sense to use an additional bit for an initial split
      on the longitude to get this back to around 1. While this doesn't
      generally break the approach, the spatial proximity property of the
      z-order curve degrades a bit with this, reducing the encoding efficiency
      of this.
      435da2ca
  2. 11 May, 2020 3 commits
    • Volker Krause's avatar
      Try to find an equivalent timezone in the right country · 3da35611
      Volker Krause authored
      This improves the situation for locations close to the boarder, where the
      coordinate-based lookup gives us the equivalent timezone in the wrong
      country, and where the right country has more than one timezone. This
      particularly helps with CA <-> US and MX <-> US cases, and thus improves
      test results for the airport location database.
      3da35611
    • Volker Krause's avatar
      Prefer coordinate over country lookup, if the countries match in both cases · 8ed24d9d
      Volker Krause authored
      This helps with countries that have several equivalent sub-zones such as
      AR or MY.
      8ed24d9d
    • Volker Krause's avatar
      Add a IANA timezone to country mapping · aacfed54
      Volker Krause authored
      This is largely unique, and should allow us to improve the result for the
      coordinate-based timezone lookup when having a country context.
      
      That was at least the initial motivation, however it looks like this might
      eventually allow us to build a coordinate -> country mapping as well,
      without needing an extra spatial index.
      aacfed54
  3. 10 May, 2020 3 commits
    • Volker Krause's avatar
      Use both the geo coordinate and the country to determine the timezone · 9b93d2ec
      Volker Krause authored
      When running this for all train stations in our database this gets very
      close to the expected timezones now, achieving 29789 matching results with
      only 9 deviations (some of those are mistakes, some are in disputed areas
      where the "correct" result isn't entirely obvious). Performance for
      airports is slightly worse, as those are more spread out over the world,
      and thus don't benefit as much from the fine-granular country structure
      in Europe that helps a lot here.
      
      There are some more ideas on how to further improve this, either way it
      looks very promising as a generic replacement for the timezone information
      in our static databases.
      9b93d2ec
    • Volker Krause's avatar
      Experimental geo coordinate to timezone mapping · 9650bb4c
      Volker Krause authored
      Conceptually this is a depth-limited quad tree. Practically this is
      implemented using a z-order curve and run-length encoding that in a
      vector together with the corresponding timezone.
      
      With the current settings the result is about 200kB, a maximum error
      distance of about 300m and a surface coverage of 99.2% for yielding the
      correct IANA timezone or 99.6% for yielding at least an equivalent
      IANA timezone. Not too bad considering the timezone shapefile that is
      the input for all this is 100+MB.
      
      Lookup cost is minimal, a single binary search and no memory allocations.
      
      The generation script is supposed to run inside QGIS with the IANA
      timezone shapefile loaded. With the current parameters it should finish
      within an hour on 8 cores.
      
      Before being fully integrated this needs a few more measurements with
      different parameters. Also still to be investigated is how this can
      replace the about 74kB worth of timezone data in the airport and train
      station databases.
      9650bb4c
    • Volker Krause's avatar
      Change the way we store timezones in the static database · 14800de9
      Volker Krause authored
      So far this were offsets into the the IANA string table, now it's a flat
      enum. The old way needed 13 bits per record, the new only needs 9 bit, at
      the cost of an extra ~800 bytes for an offset table to get back to IANA
      names. This however quickly pays of when storing large quantities, which
      we do (~37k in the current database, more in the upcoming experiments for
      an efficient geo coordinate to timezone mapping).
      14800de9
  4. 10 Dec, 2018 1 commit
  5. 07 Sep, 2018 1 commit
  6. 05 Sep, 2018 2 commits
  7. 12 May, 2018 2 commits
  8. 01 May, 2018 1 commit
  9. 20 Apr, 2018 1 commit
    • Volker Krause's avatar
      Explicitly take care of meta type registration · 29ff1a7d
      Volker Krause authored
      moc's auto-magic for this fails us for some forward-declared type on first
      use, which breaks JSON-LD deserialization. So provide the means to do this
      manually where needed without bothering the users of this API.
      29ff1a7d
  10. 31 Mar, 2018 1 commit
  11. 18 Mar, 2018 1 commit