Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor - vector tiles #369

Open
vmarc opened this issue Dec 8, 2023 · 3 comments
Open

Monitor - vector tiles #369

vmarc opened this issue Dec 8, 2023 · 3 comments
Assignees
Labels
1-monitor monitor functionality related issue enhancement

Comments

@vmarc
Copy link
Owner

vmarc commented Dec 8, 2023

Today, when displaying monitor maps, the details about the routes, deviations and segments are sent to the browser in geojson format. The geojson contains the coordinates of all nodes in all ways, independent of the zoom level. This is also how it works in waymarked trails when highlighting a particular route on the map. This worked very well for the routes that were originally added in the monitor. It was known from the start that with large routes being added to the monitor this would not scale very well. The amount of data that has to be sent to the browser for cross-continent routes is just too large and takes too much time. This is why for super-routes the map always just shows the information per sub-relation, and there is no map for relations only containing other relations.

Issues have been opened asking for also displaying complete super-routes (see issues #361, #356 and also to lesser extent #352). With the current technique of shipping geojson this would lead to unacceptable performance.

A solution that would scale better for large routes would be to use vector tiles instead of geojson (just like is done today for node network routes). This would allow to only ship the amount of data that is appropriate for the current zoom level (DouglasPeuckerSimplifier).

@vmarc vmarc self-assigned this Dec 8, 2023
@vmarc vmarc added enhancement 1-monitor monitor functionality related issue labels Dec 8, 2023
@vmarc
Copy link
Owner Author

vmarc commented Dec 12, 2023

Some initial investigation, these are more or less the number of tiles that have to be generated per zoom level:

level tile count
2 4
3 6
4 12
5 27
6 79
7 230
8 645
9 1676
10 4248
11 10253
12 23999
13 54249
14 119737
total 215165

@vmarc
Copy link
Owner Author

vmarc commented Feb 26, 2024

Some further investigation: what would it take to do hiking- and bicycle-route analysis and vector tile generation for all routes worldwide?

route type node_network other total
bicycle route 40 983 66 155 107 138
bicycle superroute 0 1 062 1 062
foot route 42 958 12 233 55 191
foot superroute 0 43 43
walking route 0 131 131
walking superroute 0 4 4
hiking route 45 371 168 382 213 753
hiking superroute 0 1 304 1 304
mtb route 30 16 898 16 928
mtb superroute 0 67 67
inline_skates route 55 166 221
inline_skates superroute 0 3 3
motorboat route 454 1 455
motorboat superroute 0 0 0
canoe route 350 287 637
canoe superroute 0 3 3
  • node network routes: 130 201

  • non node network routes: 266 739

  • total routes: 396 940

Estimated size for mongodb monitor-relations collection: 700Mb.

Time to create monitor-relations collection with 4038 relations (reading relations from overpass database one by one) remote: 1:30h, non-remote: 1:05h.

Estimated time to create all remote: 6 days!

vmarc added a commit that referenced this issue Feb 26, 2024
@vmarc
Copy link
Owner Author

vmarc commented Feb 27, 2024

Additional test to create collection monitor-relations remotely, but using batches of 100 routes for the requests to the Overpass API database, estimate: 25 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-monitor monitor functionality related issue enhancement
Projects
Status: Part of new design
Development

No branches or pull requests

1 participant