1. 16 Jan, 2021 1 commit
  2. 30 Nov, 2020 1 commit
  3. 27 Nov, 2020 1 commit
  4. 28 Oct, 2020 1 commit
  5. 27 Oct, 2020 1 commit
    • Volker Krause's avatar
      Turn MapData into a shared value type · 3411f0b4
      Volker Krause authored
      This makes it easier and safer to pass this through QML, and it will make
      it possible to expose API to QML (which we cannot do on the previous raw
      pointer, nor a shared pointer directly).
  6. 26 Oct, 2020 2 commits
  7. 19 Oct, 2020 1 commit
  8. 18 Oct, 2020 23 commits
    • Volker Krause's avatar
    • Volker Krause's avatar
      First pass on better separation of public/private API · ff804ffa
      Volker Krause authored
      Prepares this for being installed as a shared library.
    • Volker Krause's avatar
      Reorder level evaluation · 4dd89755
      Volker Krause authored
      We now look at building:levels first, and interpret an also present level
      tag as building:min_level in that case. That's not how this is supposed
      to be used IIUC, but it reflects how this combination is used in reality
    • Volker Krause's avatar
    • Volker Krause's avatar
      Initial work on inter-level navigation · 416f1cf9
      Volker Krause authored
      When clicking on stairs or a ramp connecting two levels, this now changes
      the view to the destination level of that way. This also prepares support
      for elevators connecting more than two levels, but that still requires a
      bit more work.
    • Volker Krause's avatar
      Factor out the level parser, and add unit tests for it · 0581721f
      Volker Krause authored
      We need this code also for the upcoming work on inter-level navigation.
      This also identified a few issues with level ranges that were fixed along
      the way.
    • Volker Krause's avatar
      Port the remaining level filter code to use MapCSS · 68efe2a5
      Volker Krause authored
      This adds a third filter state now for "dependent elements", ie. things
      that make little sense on their own, but can be displayed if we have other
      things on the same level as well. Underground railway lines are such an
      example: They are important in the context of a subway station, but on
      their own they add no value at all.
    • Volker Krause's avatar
      Replace hard-coded level filters with a MapCSS-based input filter · 1214d9a4
      Volker Krause authored
      This gives us a much more flexible ways to discard elements we don't want
      to consider at all for rendering. Rather than making those invisible in
      styling, doing this earlier is not only more efficient (as we only do it
      once), but also affects level detection (ie. we can use this to drop levels
      only containing otherwise invisible elements).
      While at it, also move the filtering of tagless elements to the input
      filtering stage, no need to do this for every frame.
    • Volker Krause's avatar
      Discard roof-only levels · 25af9df0
      Volker Krause authored
      We don't render roof elements (as they would cover the indoor areas we are
      actually interested in), so the top (roof) level would be visually empty.
    • Volker Krause's avatar
    • Volker Krause's avatar
      Relax MapData const-ness · 77b94952
      Volker Krause authored
      We need to be able to call the non-const makeX() methods on it for creating
      synthetic elements for overlays, so the object itself cannot be const when
      we pass it to the overlay sources.
    • Volker Krause's avatar
      Reduce OSM::Member size from 24 to 16 byte · 722c5de0
      Volker Krause authored
      We do that by packing the type information in the free bits in the role
      name pointer.
      This saves about 1MB (or 10%) of RAM for a loading and showing a map for
      a large train station.
    • Volker Krause's avatar
      Store OSM tag values as byte arrays rather than QStrings · 008e7c2f
      Volker Krause authored
      Half of them don't contain user-visible strings, and we only display a
      tiny minority of them, so doing the conversion to QStrings on-demand is
      more efficient and saves quite some memory. This also gets us closer to
      use value strings without copying directly from mmap'ed o5m data.
    • Volker Krause's avatar
    • Volker Krause's avatar
      Deduplicate relation member role names · 7d9d0475
      Volker Krause authored
      Same approach as we already use for tag keys. Saves about 7-10% of RAM,
      and enables pointer-based role name comparisons on hot paths.
    • Volker Krause's avatar
      Try harder to clip to the scene bounding box · b54ab10b
      Volker Krause authored
      This fixes showing parts cut of by the binary searcher, which are not
      interactive and thus confusing to use.
    • Volker Krause's avatar
      Allow to explicitly set the bounding box of the loaded data · 6eb77cb8
      Volker Krause authored
      Will be used to crop the area to what the upcoming automatic boundary
      search determines.
    • Volker Krause's avatar
      Make map loading asynchronous · 8488872b
      Volker Krause authored
      Combined with the tile cache work, this now already allows us to
      load vector tiles around the given coordinate, and then display
      the corresponding map, ie. we no longer depend on local handcrafted
      files for testing/demoing.
      The result isn't perfect yet though, as we aren't stitching split
      geometry together again.
    • Volker Krause's avatar
      Rework OSM tag key handling · 85fa9ca5
      Volker Krause authored
      This now uses opaque keys that only cost a single pointer comparison,
      rather than a QString. This saves memory in loading, but more importantly
      it significantly speeds up MapCSS rule evaluation, especially as the
      complexity of the styles keeps growing.
      This however requires some extra work to translate key names to the new
      keys, requiring a preparation step on the CSS rules that ties them to a
      specific data set.
      String-based lookup still exists for compatibility (e.g. for the generator
      code that isn't performance-sensitive), but that's now O(N) rather than
      O(logN). The impact of that is surprisingly small even, given we usually
      only have a small amount of tags per element.
      Overall this brings a 20-40% speed-up on scene updates, due to the faster
      CSS evaluation. That's still the number one cost still, but all the string
      comparison cost there is gone.
    • Volker Krause's avatar
      Remove hard-coded bounding box · 19bbd164
      Volker Krause authored
    • Volker Krause's avatar
    • Volker Krause's avatar
    • Volker Krause's avatar
      Add proper floor level handling · 5991e81d
      Volker Krause authored
      This replaces the previous primitive ad hoc hacks we needed to get started.
      In particular this can parse the full set of level-related OSM tags
      including labels, ranges and repetition. This also can now properly handle
      intermediate levels (e.g. half-way levels in stair cases), and sort the
      level stack properly. We also explicitly filter node-only levels where
      we cannot render anything meaningful.
      This still needs proper API to access the level information for the UI