QRank for dynamic styling #8472

Open
opened 2024-06-16 20:52:24 +00:00 by euf · 0 comments
euf commented 2024-06-16 20:52:24 +00:00 (Migrated from github.com)

This is a raw idea, which is quite ambitious per se, and a discussion of its technical feasibility is needed.

Is your feature request related to a problem? Please describe.

There were several previous discussions of "dynamic styling", which as a theoretical solution to the limitations of existing hardcoded drawing rules. See #6016, #6331, #6332, #8464, and many others.

The idea of utilizing QRank for better importance ranking was raised in #7967.

Describe the ideal solution

The "ideal solution" would essentially be the one which always shows the most relevant map features in favor of less interesting ones. In other words, any viewport at any zoom should include as much data as it can fit, all ranked by prominence. Since it's not realistic with the current implementation, I suggest we try to move towards it with some heuristics.

Could it be technically possible to

  1. At the generator stage, add a QRank value to all map objects, which have wikidata / brand:wikidata / operator:wikidata in their tags?
  2. At the map rendering, always prioritize features with QRank over those which don't have it?

This way a first step could be made towards "dynamic styling". I imagine an algorithm which

  • Draws a base layer (land, water, roads) depending on existing drawing rules.
  • Runs a first pass of POI candidates displacement for QRanked map features, using current drawing rules for them but with increased zoom (for example, if museums are usually [z10-], those with rank are allowed at [z9-]). Obviously we don't show lower ranked features if they overlap with a higher ranked ones.
  • Finally, features without QRank are rendered, but if and only if they don't overlap the ones we prioritized in the previous step.

Describe alternatives you have considered

  • Popular apps, such as Google and Apple Maps, seem to heavily utilize search ranking for POIs display order. It's not possible to replicate their results with limited access to aggregated user data, but my idea seems to be as close as we can realistically get.
  • Since I'm not an expert either in MWM file structure or in drape architecture, my algorithm may be suboptimal from the technical point of view. I hope it's still possible to find an efficient solution with the same motivation.
  • Further tweaks to my naive algorithms are possible, such as calculating a combined weight of population × QRank for human settlements, using a multiplier for features tagged as attraction, etc. At the moment I don't think these complex approaches are really needed, but there's definitely room for even more creative algorithms.
This is a raw idea, which is quite ambitious per se, and a discussion of its technical feasibility is needed. **Is your feature request related to a problem? Please describe.** There were several previous discussions of "dynamic styling", which as a theoretical solution to the limitations of existing hardcoded drawing rules. See #6016, #6331, #6332, #8464, and many others. The idea of utilizing QRank for better importance ranking was raised in #7967. **Describe the ideal solution** The "ideal solution" would essentially be the one which always shows the most relevant map features in favor of less interesting ones. In other words, any viewport at any zoom should include as much data as it can fit, all ranked by prominence. Since it's not realistic with the current implementation, I suggest we try to move towards it with some heuristics. Could it be technically possible to 1. At the generator stage, add a QRank value to all map objects, which have `wikidata` / `brand:wikidata` / `operator:wikidata` in their tags? 2. At the map rendering, always prioritize features with QRank over those which don't have it? This way a first step could be made towards "dynamic styling". I imagine an algorithm which - Draws a base layer (land, water, roads) depending on existing drawing rules. - Runs a first pass of POI candidates displacement for QRanked map features, using current drawing rules for them but with increased zoom (for example, if museums are usually [z10-], those with rank are allowed at [z9-]). Obviously we don't show lower ranked features if they overlap with a higher ranked ones. - Finally, features without QRank are rendered, but if and only if they don't overlap the ones we prioritized in the previous step. **Describe alternatives you have considered** - Popular apps, such as Google and Apple Maps, seem to heavily utilize search ranking for POIs display order. It's not possible to replicate their results with limited access to aggregated user data, but my idea seems to be as close as we can realistically get. - Since I'm not an expert either in MWM file structure or in drape architecture, my algorithm may be suboptimal from the technical point of view. I hope it's still possible to find an efficient solution with the same motivation. - Further tweaks to my naive algorithms are possible, such as calculating a combined weight of population × QRank for human settlements, using a multiplier for features tagged as attraction, etc. At the moment I don't think these complex approaches are really needed, but there's definitely room for even more creative algorithms.
This repo is archived. You cannot comment on issues.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#8472
No description provided.