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. 10 May, 2020 1 commit
    • 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