geo-activity-playground 0.35.0__py3-none-any.whl → 0.36.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. geo_activity_playground/__main__.py +12 -0
  2. geo_activity_playground/core/activities.py +21 -13
  3. geo_activity_playground/core/raster_map.py +246 -0
  4. geo_activity_playground/core/tiles.py +6 -50
  5. geo_activity_playground/explorer/video.py +1 -1
  6. geo_activity_playground/heatmap_video.py +93 -0
  7. geo_activity_playground/importers/activity_parsers.py +1 -1
  8. geo_activity_playground/importers/directory.py +6 -15
  9. geo_activity_playground/webui/activity/blueprint.py +3 -10
  10. geo_activity_playground/webui/activity/controller.py +10 -71
  11. geo_activity_playground/webui/app.py +32 -22
  12. geo_activity_playground/webui/{auth/blueprint.py → auth_blueprint.py} +1 -1
  13. geo_activity_playground/webui/calendar/blueprint.py +2 -5
  14. geo_activity_playground/webui/{eddington/controller.py → eddington_blueprint.py} +17 -13
  15. geo_activity_playground/webui/equipment/blueprint.py +2 -8
  16. geo_activity_playground/webui/explorer/blueprint.py +2 -10
  17. geo_activity_playground/webui/heatmap/blueprint.py +36 -10
  18. geo_activity_playground/webui/heatmap/heatmap_controller.py +151 -71
  19. geo_activity_playground/webui/heatmap/templates/heatmap/index.html.j2 +30 -12
  20. geo_activity_playground/webui/{search/blueprint.py → search_blueprint.py} +1 -1
  21. geo_activity_playground/webui/settings/blueprint.py +1 -2
  22. geo_activity_playground/webui/square_planner_blueprint.py +118 -0
  23. geo_activity_playground/webui/{summary/controller.py → summary_blueprint.py} +23 -24
  24. geo_activity_playground/webui/templates/page.html.j2 +11 -0
  25. geo_activity_playground/webui/tile_blueprint.py +42 -0
  26. geo_activity_playground/webui/upload_blueprint.py +1 -3
  27. {geo_activity_playground-0.35.0.dist-info → geo_activity_playground-0.36.0.dist-info}/METADATA +1 -1
  28. {geo_activity_playground-0.35.0.dist-info → geo_activity_playground-0.36.0.dist-info}/RECORD +36 -43
  29. geo_activity_playground/core/heatmap.py +0 -194
  30. geo_activity_playground/webui/eddington/__init__.py +0 -0
  31. geo_activity_playground/webui/eddington/blueprint.py +0 -19
  32. geo_activity_playground/webui/square_planner/__init__.py +0 -0
  33. geo_activity_playground/webui/square_planner/blueprint.py +0 -38
  34. geo_activity_playground/webui/square_planner/controller.py +0 -101
  35. geo_activity_playground/webui/summary/__init__.py +0 -0
  36. geo_activity_playground/webui/summary/blueprint.py +0 -17
  37. geo_activity_playground/webui/tile/__init__.py +0 -0
  38. geo_activity_playground/webui/tile/blueprint.py +0 -32
  39. geo_activity_playground/webui/tile/controller.py +0 -36
  40. /geo_activity_playground/webui/{auth/templates → templates}/auth/index.html.j2 +0 -0
  41. /geo_activity_playground/webui/{eddington/templates → templates}/eddington/index.html.j2 +0 -0
  42. /geo_activity_playground/webui/{search/templates → templates}/search/index.html.j2 +0 -0
  43. /geo_activity_playground/webui/{square_planner/templates → templates}/square_planner/index.html.j2 +0 -0
  44. /geo_activity_playground/webui/{summary/templates → templates}/summary/index.html.j2 +0 -0
  45. {geo_activity_playground-0.35.0.dist-info → geo_activity_playground-0.36.0.dist-info}/LICENSE +0 -0
  46. {geo_activity_playground-0.35.0.dist-info → geo_activity_playground-0.36.0.dist-info}/WHEEL +0 -0
  47. {geo_activity_playground-0.35.0.dist-info → geo_activity_playground-0.36.0.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geo-activity-playground
3
- Version: 0.35.0
3
+ Version: 0.36.0
4
4
  Summary: Analysis of geo data activities like rides, runs or hikes.
5
5
  License: MIT
6
6
  Author: Martin Ueding
@@ -1,28 +1,29 @@
1
1
  geo_activity_playground/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- geo_activity_playground/__main__.py,sha256=qbKjs7IsJwF2gB3b0lh7tGt6uraPqq5w-xGBIxrgoHI,3988
2
+ geo_activity_playground/__main__.py,sha256=vFKB0Jjk8ImDHqok6Fddb5CRWHEnxyn5r4Zs0A1EsCQ,4585
3
3
  geo_activity_playground/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- geo_activity_playground/core/activities.py,sha256=MiQev1L7NnSVnxgbArlT-FpWTESTwnKh7pyT1tcEHqU,6926
4
+ geo_activity_playground/core/activities.py,sha256=CYIr7bw9IJ7QQjjt1AWMGXcjZwl7PT-4gaxBOmuO2Qg,7197
5
5
  geo_activity_playground/core/config.py,sha256=uqiwk7CgcuGx8JemHSsRKjRwyNT1YTb7V0gX0OJhfaI,5109
6
6
  geo_activity_playground/core/coordinates.py,sha256=tDfr9mlXhK6E_MMIJ0vYWVCoH0Lq8uyuaqUgaa8i0jg,966
7
7
  geo_activity_playground/core/enrichment.py,sha256=fUmk6avy_rqePlHmJQFTQhAxjgIRaxxmq18N2OSXBBg,7771
8
8
  geo_activity_playground/core/heart_rate.py,sha256=IwMt58TpjOYqpAxtsj07zP2ttpN_J3GZeiv-qGhYyJc,1598
9
- geo_activity_playground/core/heatmap.py,sha256=iTxefUTjTToPrKpVbauJHXkqxpNppXOEK6vvKuNkHkk,5906
10
9
  geo_activity_playground/core/paths.py,sha256=RBeUi38riP_msTGPy1TsPRNiblzE-lFivaJSLULE8b0,2503
11
10
  geo_activity_playground/core/privacy_zones.py,sha256=4TumHsVUN1uW6RG3ArqTXDykPVipF98DCxVBe7YNdO8,512
11
+ geo_activity_playground/core/raster_map.py,sha256=RrbpotWIIT1friSewSxRczk4FY6v8ofOO6kO1ERMWvM,6962
12
12
  geo_activity_playground/core/similarity.py,sha256=Jo8jRViuORCxdIGvyaflgsQhwu9S_jn10a450FRL18A,3159
13
13
  geo_activity_playground/core/tasks.py,sha256=aMDBWJqp6ek2ao6G6Xa8GOSZbcQqXoWL74SGRowRPIk,2942
14
14
  geo_activity_playground/core/test_tiles.py,sha256=zce1FxNfsSpOQt66jMehdQRVoNdl-oiFydx6iVBHZXM,764
15
15
  geo_activity_playground/core/test_time_conversion.py,sha256=Sh6nZA3uCTOdZTZa3yOijtR0m74QtZu2mcWXsDNnyQI,984
16
- geo_activity_playground/core/tiles.py,sha256=qUe4h3rzHJb8xThAgUKSLElt8S6zID_OuaWXDkWLwAU,3539
16
+ geo_activity_playground/core/tiles.py,sha256=lV6X1Uc9XQecu2LALIvxpnMcLsVtWx7JczJ5a_S1eZE,2139
17
17
  geo_activity_playground/core/time_conversion.py,sha256=x5mXG6Y4GtdX7CBmwucGNSWBp9JQJDbZ7u0JkdUY1Vs,379
18
18
  geo_activity_playground/explorer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  geo_activity_playground/explorer/grid_file.py,sha256=k6j6KBEk2a2BY-onE8SV5TJsERGGyOrlY4as__meWpA,3304
20
20
  geo_activity_playground/explorer/tile_visits.py,sha256=CSHAjgzKWe1iB-zvaqgsR5Z_lFycpWqUfxnPCAWvYaU,14173
21
- geo_activity_playground/explorer/video.py,sha256=35-mMEvD8phnc2xbWdwCHhl_uMIUogHrnFwrTfk2Yj8,4392
21
+ geo_activity_playground/explorer/video.py,sha256=7j6Qv3HG6On7Tn7xh7Olwrx_fbQnfzS7CeRg3TEApHg,4397
22
+ geo_activity_playground/heatmap_video.py,sha256=Oc3EAAsW27zhG28Rmy3i2GoN1rjm1UFgb53eSHr9GP8,3503
22
23
  geo_activity_playground/importers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
- geo_activity_playground/importers/activity_parsers.py,sha256=XNQs0ziqAcVqIoiLAX5Ndmhb6v__29XdjUPvNvc7oBI,11082
24
+ geo_activity_playground/importers/activity_parsers.py,sha256=5MvtjmXruPAoUO1KlDycoj677NeETgODiyxsFjXNppg,11103
24
25
  geo_activity_playground/importers/csv_parser.py,sha256=O1pP5GLhWhnWcy2Lsrr9g17Zspuibpt-GtZ3ZS5eZF4,2143
25
- geo_activity_playground/importers/directory.py,sha256=CA-vFOMm8G4MSM_Q09OwQKduCApL2PWaxLTVxgw_xpw,5908
26
+ geo_activity_playground/importers/directory.py,sha256=v9YC65cSXMmZBDW094HHUfTC-4H98sEkatRZJ38OHos,5454
26
27
  geo_activity_playground/importers/strava_api.py,sha256=cJCZsLemhOlxTtZh0z_npidgae9SD5HyEUry2uvem_A,7775
27
28
  geo_activity_playground/importers/strava_checkout.py,sha256=dAKW1wVqlA5zRw25SvpYZZrEikJtaUluInyhJ0RfsFc,10002
28
29
  geo_activity_playground/importers/test_csv_parser.py,sha256=LXqva7GuSAfXYE2zZQrg-69lCtfy5MxLSq6BRwL_VyI,1191
@@ -30,43 +31,38 @@ geo_activity_playground/importers/test_directory.py,sha256=ljXokx7q0OgtHvEdHftcQ
30
31
  geo_activity_playground/importers/test_strava_api.py,sha256=4vX7wDr1a9aRh8myxNrIq6RwDBbP8ZeoXXPc10CAbW4,431
31
32
  geo_activity_playground/webui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
33
  geo_activity_playground/webui/activity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- geo_activity_playground/webui/activity/blueprint.py,sha256=2Fa_6a86Aa3Yr3hQdkRylQqqVusyyVzPd1x3il5ZXNk,4176
34
- geo_activity_playground/webui/activity/controller.py,sha256=0HXQZAD9Muf62jV-GqQKJPq5qNgdbV-KEcPmHX_8iGo,21429
34
+ geo_activity_playground/webui/activity/blueprint.py,sha256=J2f6zzBtwkrem51WDakLXKahVcOxMT2JKbbFgu0VFws,3914
35
+ geo_activity_playground/webui/activity/controller.py,sha256=Gps0qGa3vd3xvBW4EIpwoQxYbkYItFfzlz0tzaj8HCA,19508
35
36
  geo_activity_playground/webui/activity/templates/activity/day.html.j2,sha256=wkYmcnIsMlvE9wgKemYCNU6jwsk5IJvg8pcBA2OMh00,2795
36
37
  geo_activity_playground/webui/activity/templates/activity/edit.html.j2,sha256=ckcTTxcQOhmvvAGNTEOtWCUG4LhvO4HfQImlIa5qKs8,1530
37
38
  geo_activity_playground/webui/activity/templates/activity/lines.html.j2,sha256=_ZDg1ruW-9UMJfOudy1-uY_-IcSSaagq7tPCih5Bb8g,1079
38
39
  geo_activity_playground/webui/activity/templates/activity/name.html.j2,sha256=tKviMqMouHEGv3xBQVIsJgwj_hjwAsmGVefM3UMqlYg,2437
39
40
  geo_activity_playground/webui/activity/templates/activity/show.html.j2,sha256=bEx37UGSTeeJl7gN4fjyOpINFQwZ5Zm-HOKpLqcJGfs,6905
40
- geo_activity_playground/webui/app.py,sha256=KghChBgJvRZ9Cx7Z5wmqx6X0Q6GH-2hi97eaKEE_Zvc,5118
41
- geo_activity_playground/webui/auth/blueprint.py,sha256=Lx-ZvMnfHLC1CMre1xPQI3k_pCtQoZvgRhtmafULzoE,812
42
- geo_activity_playground/webui/auth/templates/auth/index.html.j2,sha256=ILQ5HvTEYc3OrtOAIFt1VrqWorVD70V9DC342znmP70,579
41
+ geo_activity_playground/webui/app.py,sha256=eXF7reuw6bX-Ez3hDK3nPacePrD4XRcElp0gBRdyWoI,5440
42
+ geo_activity_playground/webui/auth_blueprint.py,sha256=sERpBU6cXdBuVjMMiRQBGJMibFZCfrUXMPj4ukzd_Ug,783
43
43
  geo_activity_playground/webui/authenticator.py,sha256=k278OEVuOfAmTGT4F2X4pqSTwwkK_FA87EIhAeysEqc,1416
44
44
  geo_activity_playground/webui/calendar/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- geo_activity_playground/webui/calendar/blueprint.py,sha256=rlnhgU2DWAcdLMRq7m77NzrM_aDyp4s3kuuQHuzjHhg,782
45
+ geo_activity_playground/webui/calendar/blueprint.py,sha256=Kjyx9lkJoM5tL8vNba0Y7HhJuFRVId4F-ONZsXpKyyg,721
46
46
  geo_activity_playground/webui/calendar/controller.py,sha256=QpSAkR2s1sbLSu6P_fNNTccgGglOzEH2PIv1XwKxeVY,2778
47
47
  geo_activity_playground/webui/calendar/templates/calendar/index.html.j2,sha256=xoR6R4cUgTQNRHQv3m3f4Bc-yCjJEsJj5d4_CWlJsRo,1427
48
48
  geo_activity_playground/webui/calendar/templates/calendar/month.html.j2,sha256=sRIiNo_Rp9CHary6e-lnpKJKOuAonoDEBvKMxzbTLQE,1802
49
- geo_activity_playground/webui/eddington/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- geo_activity_playground/webui/eddington/blueprint.py,sha256=evIvueLfDWVTxJ9pRguqmZ9-Pybd2WmBRst_-7vX2QA,551
51
- geo_activity_playground/webui/eddington/controller.py,sha256=ly7JSkSS79kO4CL_xugB62uRuuWKVqOjbN-pheelv94,2910
52
- geo_activity_playground/webui/eddington/templates/eddington/index.html.j2,sha256=XHKeUymQMS5x00PLOVlg-nSRCz_jHB2pvD8QunULWJ4,1839
49
+ geo_activity_playground/webui/eddington_blueprint.py,sha256=70Jyrlv9s2HAbspJ-7JAOZsH02PrIbMCRL28wNomVgk,3084
53
50
  geo_activity_playground/webui/entry_controller.py,sha256=McxbyouKWHJ3a2R9agPazZoG7VHiFO1RvnkBr08dMH8,2168
54
51
  geo_activity_playground/webui/equipment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
- geo_activity_playground/webui/equipment/blueprint.py,sha256=_NIhRJuJNbXpEd_nEPo01AqnUqPgo1vawFn7E3yoeng,636
52
+ geo_activity_playground/webui/equipment/blueprint.py,sha256=kJhCSdakke_UhT2RIP-fMoAMaC1oFttRoCPeiAIaB6g,491
56
53
  geo_activity_playground/webui/equipment/controller.py,sha256=lMivui3EBUnkYZf9Lgv1kHZ0c7IxRAza-ox8YOz3ONY,4079
57
54
  geo_activity_playground/webui/equipment/templates/equipment/index.html.j2,sha256=fvRaDbCuiSZ8AzJTpu1dk8FTAGZ2yfsLhprtVYHFZWo,1802
58
55
  geo_activity_playground/webui/explorer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
- geo_activity_playground/webui/explorer/blueprint.py,sha256=EKnBs8llqT6Wy1uac18dF2epp3TebF9p3iGlSbj6Vl0,2337
56
+ geo_activity_playground/webui/explorer/blueprint.py,sha256=iLmdayavR7B1_l67VvkMGsaYeABSXEe9IwTydK_-Owg,2027
60
57
  geo_activity_playground/webui/explorer/controller.py,sha256=pIzWh0TpLJgKQZlS325-QT7nA1q9ms7fRqQIp24PNfo,11705
61
58
  geo_activity_playground/webui/explorer/templates/explorer/index.html.j2,sha256=3t9ikAF6oMvEaVlS3Kb1tj9ngomIQlatzqPnqVsEDKA,6908
62
59
  geo_activity_playground/webui/heatmap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
- geo_activity_playground/webui/heatmap/blueprint.py,sha256=ZEImDIwT3uiDIKapqCU49llvyqG79n7ZEu1GHgoLZqo,1558
64
- geo_activity_playground/webui/heatmap/heatmap_controller.py,sha256=Qw9MGW3TFWlG2JkA_r9RHgYq4hvPiJaZeAg5D9lIFC0,7821
65
- geo_activity_playground/webui/heatmap/templates/heatmap/index.html.j2,sha256=BMjqbZ-btSFawuNDxgZxOkF5JvhD_p9DOBJ-4-1IKnU,1833
60
+ geo_activity_playground/webui/heatmap/blueprint.py,sha256=-Cd-b2_3uU-6tBDsqlbyrVacftDod8SoIZnDRsIC5H8,2548
61
+ geo_activity_playground/webui/heatmap/heatmap_controller.py,sha256=kO9IrRdaIcCuTu6d5lSOi8rLbBl_gqbht9psGtPzbIk,10709
62
+ geo_activity_playground/webui/heatmap/templates/heatmap/index.html.j2,sha256=lO3WdD7CkLSnTuQeQMvCkuFpJbL_TDp7Zocbwbug0wg,2512
66
63
  geo_activity_playground/webui/plot_util.py,sha256=pTTQoqOCkLVjkgOit7mbry28kMruZIL8amZozSzEpxQ,283
67
- geo_activity_playground/webui/search/blueprint.py,sha256=7TDsiqEowMyHNlFImk-hCGso69KOieG4rfJnLRHpRz8,3300
68
- geo_activity_playground/webui/search/templates/search/index.html.j2,sha256=d39uhteoY6JOZePqhLIYLERqkckW3oghMnTUZa7X1J8,3798
69
- geo_activity_playground/webui/settings/blueprint.py,sha256=GIrCOBNw-uNWDmKj4uduYOiKpoTLEfFbGmUmXkoBqro,9405
64
+ geo_activity_playground/webui/search_blueprint.py,sha256=3EBj70BHxEj8ZInK0Fj04p3JJMcHByj-xwOISmaj_4E,3299
65
+ geo_activity_playground/webui/settings/blueprint.py,sha256=l5H9kxjwMpqPQoF8moIp3r6oU-RQmuWr38yiHUZYU00,9391
70
66
  geo_activity_playground/webui/settings/controller.py,sha256=MIZVBfoGNvmJnB_ECV_x5eH2i6gDZvkWSQ4PcSKyLKs,9170
71
67
  geo_activity_playground/webui/settings/templates/settings/admin-password.html.j2,sha256=VYwddpObD1RpeTH5Dm4y7VtmT7kwURDCIjxyzJeq08c,495
72
68
  geo_activity_playground/webui/settings/templates/settings/color-schemes.html.j2,sha256=iR91Wxd2_TMuIo9dBDZBrWSUGHNwTwzC6O8oNH-XBt4,1653
@@ -80,10 +76,7 @@ geo_activity_playground/webui/settings/templates/settings/privacy-zones.html.j2,
80
76
  geo_activity_playground/webui/settings/templates/settings/segmentation.html.j2,sha256=QV72TZcIxqql-vEsq2lKHzo5UxoxeeXkRA9se46GWKU,1187
81
77
  geo_activity_playground/webui/settings/templates/settings/sharepic.html.j2,sha256=qZkfEpd4CtKKMaSSVadqvNEgMRYLV-0X-pw5-nJvukk,678
82
78
  geo_activity_playground/webui/settings/templates/settings/strava.html.j2,sha256=FrXgT-m1PgvsQWo9kMKpk8QenKeifSDBCZFqKgsHRxQ,1827
83
- geo_activity_playground/webui/square_planner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
- geo_activity_playground/webui/square_planner/blueprint.py,sha256=r2VkSM547chX85g6c1BQ8NC-tkdqGdYp-2ZALBiiDTc,1320
85
- geo_activity_playground/webui/square_planner/controller.py,sha256=ML6ftOyr3tTh7D4DBcRP76CvkyTxqI5QWgMeG9wC8FE,3561
86
- geo_activity_playground/webui/square_planner/templates/square_planner/index.html.j2,sha256=xFbYBQtkOl3U4WGkvIuU_5uazGHn8ObvQfNgPGq0Gqg,6469
79
+ geo_activity_playground/webui/square_planner_blueprint.py,sha256=A-bTwSsT1JpMyQ6qVlXoitAW1u4OXAoNAbA61RrGgow,3975
87
80
  geo_activity_playground/webui/static/Leaflet.fullscreen.min.js,sha256=MMWj_yFOercjzhk8wKIIKyDCK7olXrwk_7R7TjDhGYs,3677
88
81
  geo_activity_playground/webui/static/MarkerCluster.Default.css,sha256=LWhzWaQGZRsWFrrJxg-6Zn8TT84k0_trtiHBc6qcGpY,1346
89
82
  geo_activity_playground/webui/static/MarkerCluster.css,sha256=-bdWuWOXMFkX0v9Cvr3OWClPiYefDQz9GGZP_7xZxdc,886
@@ -113,20 +106,20 @@ geo_activity_playground/webui/static/vega-lite@4,sha256=roXmcY9bUF91uB9V-eSEUHEg
113
106
  geo_activity_playground/webui/static/vega@5,sha256=5DLHUaY2P0ph2mKSDMfX69E88J2ClJ-PSGJI-Acdw84,514536
114
107
  geo_activity_playground/webui/static/web-app-manifest-192x192.png,sha256=eEImN6iWfSv-EnSNPL5WbX84PKakse_8VZMBPWWye3o,13582
115
108
  geo_activity_playground/webui/static/web-app-manifest-512x512.png,sha256=vU9oQ4HnQerFDZVzcAT9twj4_Doc6_9v9wVvoRI-f_E,48318
116
- geo_activity_playground/webui/summary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
- geo_activity_playground/webui/summary/blueprint.py,sha256=tfA2aPF19yKwkQOb5lPQBySoQYYhTn49Iuh0SYvsGP8,593
118
- geo_activity_playground/webui/summary/controller.py,sha256=FyPdC98maX0P5sJ4j5Z7-ZSiirLh_jmu_PszKXqTV8A,9425
119
- geo_activity_playground/webui/summary/templates/summary/index.html.j2,sha256=ctOx3Qjx6nRDpUtFf1DlJhK_gtU77Vwx_S6euLz9-W4,5183
109
+ geo_activity_playground/webui/summary_blueprint.py,sha256=FrPQgx6-lOX3DiaCveJu_n0a_mSTt-XUMxWVcHNkUUU,9399
110
+ geo_activity_playground/webui/templates/auth/index.html.j2,sha256=ILQ5HvTEYc3OrtOAIFt1VrqWorVD70V9DC342znmP70,579
111
+ geo_activity_playground/webui/templates/eddington/index.html.j2,sha256=XHKeUymQMS5x00PLOVlg-nSRCz_jHB2pvD8QunULWJ4,1839
120
112
  geo_activity_playground/webui/templates/home.html.j2,sha256=IdCqI_LLcYrpUjjCO-tbXR4s05XYrPOateiJ4idF3bo,2202
121
- geo_activity_playground/webui/templates/page.html.j2,sha256=Mt1M0hw1V7sPnQmo6kRO_e49B4to30eDkAf-J35xXas,10624
113
+ geo_activity_playground/webui/templates/page.html.j2,sha256=7OzIcK2buk1GoRMBcjSMfmsEHHrKWSytfI9GzECeSAM,11229
114
+ geo_activity_playground/webui/templates/search/index.html.j2,sha256=d39uhteoY6JOZePqhLIYLERqkckW3oghMnTUZa7X1J8,3798
115
+ geo_activity_playground/webui/templates/square_planner/index.html.j2,sha256=xFbYBQtkOl3U4WGkvIuU_5uazGHn8ObvQfNgPGq0Gqg,6469
116
+ geo_activity_playground/webui/templates/summary/index.html.j2,sha256=ctOx3Qjx6nRDpUtFf1DlJhK_gtU77Vwx_S6euLz9-W4,5183
122
117
  geo_activity_playground/webui/templates/upload/index.html.j2,sha256=I1Ix8tDS3YBdi-HdaNfjkzYXVVCjfUTe5PFTnap1ydc,775
123
118
  geo_activity_playground/webui/templates/upload/reload.html.j2,sha256=YZWX5eDeNyqKJdQAywDBcU8DZBm22rRBbZqFjrFrCvQ,556
124
- geo_activity_playground/webui/tile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
- geo_activity_playground/webui/tile/blueprint.py,sha256=q0sw_F8L367Df01yjZijikEIglFBgg9lN61sbTAEOKQ,1018
126
- geo_activity_playground/webui/tile/controller.py,sha256=XjUTbyAMeQET1D3mFtT8r5-xMcMOaELPZWtQ1Xp7Cuw,1428
127
- geo_activity_playground/webui/upload_blueprint.py,sha256=topLI9ytDUFkqCc9AlOqDkjhABUwnPJ1tX_7XrBPbxc,4412
128
- geo_activity_playground-0.35.0.dist-info/LICENSE,sha256=4RpAwKO8bPkfXH2lnpeUW0eLkNWglyG4lbrLDU_MOwY,1070
129
- geo_activity_playground-0.35.0.dist-info/METADATA,sha256=KhGiQyU5qPwJ05X9AexPz-FbFelLg6r11_LteCF2tnk,1573
130
- geo_activity_playground-0.35.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
131
- geo_activity_playground-0.35.0.dist-info/entry_points.txt,sha256=pbNlLI6IIZIp7nPYCfAtiSiz2oxJSCl7DODD6SPkLKk,81
132
- geo_activity_playground-0.35.0.dist-info/RECORD,,
119
+ geo_activity_playground/webui/tile_blueprint.py,sha256=QU8YRjhMf-lhPJGqrCjV49QBX0ATgTny96GYhqJwwyI,1755
120
+ geo_activity_playground/webui/upload_blueprint.py,sha256=Ha3H5Dsl6YS6YYmFouXamU8viEpLIj1YIE9XJVCiakY,4368
121
+ geo_activity_playground-0.36.0.dist-info/LICENSE,sha256=4RpAwKO8bPkfXH2lnpeUW0eLkNWglyG4lbrLDU_MOwY,1070
122
+ geo_activity_playground-0.36.0.dist-info/METADATA,sha256=obUFk4jsPZxyInR5rx2iZO1FqZN1FJGU---UswdoNwY,1573
123
+ geo_activity_playground-0.36.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
124
+ geo_activity_playground-0.36.0.dist-info/entry_points.txt,sha256=pbNlLI6IIZIp7nPYCfAtiSiz2oxJSCl7DODD6SPkLKk,81
125
+ geo_activity_playground-0.36.0.dist-info/RECORD,,
@@ -1,194 +0,0 @@
1
- """
2
- This code is based on https://github.com/remisalmon/Strava-local-heatmap.
3
- """
4
- import dataclasses
5
- import logging
6
-
7
- import numpy as np
8
-
9
- from geo_activity_playground.core.config import Config
10
- from geo_activity_playground.core.tiles import compute_tile_float
11
- from geo_activity_playground.core.tiles import get_tile
12
- from geo_activity_playground.core.tiles import get_tile_upper_left_lat_lon
13
-
14
-
15
- logger = logging.getLogger(__name__)
16
-
17
-
18
- @dataclasses.dataclass
19
- class GeoBounds:
20
- lat_min: float
21
- lon_min: float
22
- lat_max: float
23
- lon_max: float
24
-
25
-
26
- def get_bounds(lat_lon_data: np.ndarray) -> GeoBounds:
27
- return GeoBounds(*np.min(lat_lon_data, axis=0), *np.max(lat_lon_data, axis=0))
28
-
29
-
30
- def add_margin(lower: float, upper: float) -> tuple[float, float]:
31
- spread = upper - lower
32
- margin = spread / 20
33
- return max(0.0, lower - margin), upper + margin
34
-
35
-
36
- def add_margin_to_geo_bounds(bounds: GeoBounds) -> GeoBounds:
37
- lat_min, lat_max = add_margin(bounds.lat_min, bounds.lat_max)
38
- lon_min, lon_max = add_margin(bounds.lon_min, bounds.lon_max)
39
- return GeoBounds(lat_min, lon_min, lat_max, lon_max)
40
-
41
-
42
- OSM_TILE_SIZE = 256 # OSM tile size in pixel
43
- OSM_MAX_ZOOM = 19 # OSM maximum zoom level
44
- MAX_TILE_COUNT = 2000 # maximum number of tiles to download
45
-
46
-
47
- @dataclasses.dataclass
48
- class TileBounds:
49
- zoom: int
50
- x_tile_min: int
51
- x_tile_max: int
52
- y_tile_min: int
53
- y_tile_max: int
54
-
55
-
56
- @dataclasses.dataclass
57
- class PixelBounds:
58
- x_min: int
59
- x_max: int
60
- y_min: int
61
- y_max: int
62
-
63
- @classmethod
64
- def from_tile_bounds(cls, tile_bounds: TileBounds) -> "PixelBounds":
65
- return cls(
66
- int(tile_bounds.x_tile_min) * OSM_TILE_SIZE,
67
- int(tile_bounds.x_tile_max) * OSM_TILE_SIZE,
68
- int(tile_bounds.y_tile_min) * OSM_TILE_SIZE,
69
- int(tile_bounds.y_tile_max) * OSM_TILE_SIZE,
70
- )
71
-
72
- @property
73
- def shape(self) -> tuple[int, int]:
74
- return (
75
- self.y_max - self.y_min,
76
- self.x_max - self.x_min,
77
- )
78
-
79
-
80
- def geo_bounds_from_tile_bounds(tile_bounds: TileBounds) -> GeoBounds:
81
- lat_max, lon_min = get_tile_upper_left_lat_lon(
82
- tile_bounds.x_tile_min, tile_bounds.y_tile_min, tile_bounds.zoom
83
- )
84
- lat_min, lon_max = get_tile_upper_left_lat_lon(
85
- tile_bounds.x_tile_max, tile_bounds.y_tile_max, tile_bounds.zoom
86
- )
87
- return GeoBounds(lat_min, lon_min, lat_max, lon_max)
88
-
89
-
90
- def get_sensible_zoom_level(
91
- bounds: GeoBounds, picture_size: tuple[int, int]
92
- ) -> TileBounds:
93
- zoom = OSM_MAX_ZOOM
94
-
95
- while True:
96
- x_tile_min, y_tile_max = map(
97
- int, compute_tile_float(bounds.lat_min, bounds.lon_min, zoom)
98
- )
99
- x_tile_max, y_tile_min = map(
100
- int, compute_tile_float(bounds.lat_max, bounds.lon_max, zoom)
101
- )
102
-
103
- x_tile_max += 1
104
- y_tile_max += 1
105
-
106
- if (x_tile_max - x_tile_min) * OSM_TILE_SIZE <= picture_size[0] and (
107
- y_tile_max - y_tile_min
108
- ) * OSM_TILE_SIZE <= picture_size[1]:
109
- break
110
-
111
- zoom -= 1
112
-
113
- tile_count = (x_tile_max - x_tile_min) * (y_tile_max - y_tile_min)
114
-
115
- if tile_count > MAX_TILE_COUNT:
116
- raise RuntimeError("Zoom value too high, too many tiles to download")
117
-
118
- return TileBounds(
119
- zoom=zoom,
120
- x_tile_min=x_tile_min,
121
- x_tile_max=x_tile_max,
122
- y_tile_min=y_tile_min,
123
- y_tile_max=y_tile_max,
124
- )
125
-
126
-
127
- def build_map_from_tiles_around_center(
128
- center: tuple[float, float],
129
- zoom: int,
130
- target: tuple[int, int],
131
- inner_target: tuple[int, int],
132
- config: Config,
133
- ) -> np.ndarray:
134
- background = np.zeros((target[1], target[0], 3))
135
-
136
- # We will work with the center point and have it in terms of tiles `t` and also in terms of pixels `p`. At the start we know that the tile center must be in the middle of the image.
137
- t = np.array(center)
138
- p = np.array([inner_target[0] / 2, inner_target[1] / 2])
139
-
140
- # Shift both such that they are in the top-left corner of an even tile.
141
- t_offset = np.array([center[0] % 1, center[1] % 1])
142
- t -= t_offset
143
- p -= t_offset * OSM_TILE_SIZE
144
-
145
- # Shift until we have left the image.
146
- shift = np.ceil(p / OSM_TILE_SIZE)
147
- p -= shift * OSM_TILE_SIZE
148
- t -= shift
149
-
150
- num_tiles = np.ceil(np.array(target) / OSM_TILE_SIZE) + 1
151
-
152
- for x in range(int(t[0]), int(t[0] + num_tiles[0])):
153
- for y in range(int(t[1]), int(t[1]) + int(num_tiles[1])):
154
- source_x_min = 0
155
- source_y_min = 0
156
- source_x_max = source_x_min + OSM_TILE_SIZE
157
- source_y_max = source_y_min + OSM_TILE_SIZE
158
-
159
- target_x_min = (x - int(t[0])) * OSM_TILE_SIZE + int(p[0])
160
- target_y_min = (y - int(t[1])) * OSM_TILE_SIZE + int(p[1])
161
- target_x_max = target_x_min + OSM_TILE_SIZE
162
- target_y_max = target_y_min + OSM_TILE_SIZE
163
-
164
- if target_x_min < 0:
165
- source_x_min -= target_x_min
166
- target_x_min = 0
167
- if target_y_min < 0:
168
- source_y_min -= target_y_min
169
- target_y_min = 0
170
- if target_x_max > target[0]:
171
- a = target_x_max - target[0]
172
- target_x_max -= a
173
- source_x_max -= a
174
- if target_y_max > target[1]:
175
- a = target_y_max - target[1]
176
- target_y_max -= a
177
- source_y_max -= a
178
-
179
- if source_x_max < 0 or source_y_max < 0:
180
- continue
181
-
182
- tile = np.array(get_tile(zoom, x, y, config.map_tile_url)) / 255
183
-
184
- background[target_y_min:target_y_max, target_x_min:target_x_max] = tile[
185
- source_y_min:source_y_max, source_x_min:source_x_max, :3
186
- ]
187
-
188
- return background
189
-
190
-
191
- def convert_to_grayscale(image: np.ndarray) -> np.ndarray:
192
- image = np.sum(image * [0.2126, 0.7152, 0.0722], axis=2)
193
- image = np.dstack((image, image, image))
194
- return image
File without changes
@@ -1,19 +0,0 @@
1
- from flask import Blueprint
2
- from flask import render_template
3
-
4
- from ...core.activities import ActivityRepository
5
- from .controller import EddingtonController
6
-
7
-
8
- def make_eddington_blueprint(repository: ActivityRepository) -> Blueprint:
9
- blueprint = Blueprint("eddington", __name__, template_folder="templates")
10
-
11
- eddington_controller = EddingtonController(repository)
12
-
13
- @blueprint.route("/")
14
- def index():
15
- return render_template(
16
- "eddington/index.html.j2", **eddington_controller.render()
17
- )
18
-
19
- return blueprint
File without changes
@@ -1,38 +0,0 @@
1
- from flask import Blueprint
2
- from flask import render_template
3
- from flask import Response
4
-
5
- from ...core.activities import ActivityRepository
6
- from ...explorer.tile_visits import TileVisitAccessor
7
- from .controller import SquarePlannerController
8
-
9
-
10
- def make_square_planner_blueprint(
11
- repository: ActivityRepository, tile_visit_accessor: TileVisitAccessor
12
- ) -> Blueprint:
13
- blueprint = Blueprint("square_planner", __name__, template_folder="templates")
14
- controller = SquarePlannerController(repository, tile_visit_accessor)
15
-
16
- @blueprint.route("/<zoom>/<x>/<y>/<size>")
17
- def index(zoom, x, y, size):
18
- return render_template(
19
- "square_planner/index.html.j2",
20
- **controller.action_planner(int(zoom), int(x), int(y), int(size))
21
- )
22
-
23
- @blueprint.route("/<zoom>/<x>/<y>/<size>/missing.<suffix>")
24
- def square_planner_missing(zoom, x, y, size, suffix: str):
25
- mimetypes = {"geojson": "application/json", "gpx": "application/xml"}
26
- return Response(
27
- controller.export_missing_tiles(
28
- int(zoom),
29
- int(x),
30
- int(y),
31
- int(size),
32
- suffix,
33
- ),
34
- mimetype=mimetypes[suffix],
35
- headers={"Content-disposition": "attachment"},
36
- )
37
-
38
- return blueprint
@@ -1,101 +0,0 @@
1
- import pickle
2
-
3
- import geojson
4
-
5
- from geo_activity_playground.core.activities import ActivityRepository
6
- from geo_activity_playground.explorer.grid_file import make_explorer_rectangle
7
- from geo_activity_playground.explorer.grid_file import make_explorer_tile
8
- from geo_activity_playground.explorer.grid_file import make_grid_file_geojson
9
- from geo_activity_playground.explorer.grid_file import make_grid_file_gpx
10
- from geo_activity_playground.explorer.grid_file import make_grid_points
11
- from geo_activity_playground.explorer.tile_visits import TileVisitAccessor
12
-
13
-
14
- class SquarePlannerController:
15
- def __init__(
16
- self, repository: ActivityRepository, tile_visit_accessor: TileVisitAccessor
17
- ) -> None:
18
- self._repository = repository
19
- self._tile_visit_accessor = tile_visit_accessor
20
-
21
- self._tile_visits = self._tile_visit_accessor.tile_state["tile_visits"]
22
-
23
- def action_planner(
24
- self, zoom: int, square_x: int, square_y: int, square_size: int
25
- ) -> dict:
26
- square_geojson = geojson.dumps(
27
- geojson.FeatureCollection(
28
- features=[
29
- make_explorer_rectangle(
30
- square_x,
31
- square_y,
32
- square_x + square_size,
33
- square_y + square_size,
34
- zoom,
35
- )
36
- ]
37
- )
38
- )
39
-
40
- missing_geojson = geojson.dumps(
41
- geojson.FeatureCollection(
42
- features=[
43
- make_explorer_tile(
44
- tile_x,
45
- tile_y,
46
- {},
47
- zoom,
48
- )
49
- for tile_x in range(square_x, square_x + square_size)
50
- for tile_y in range(square_y, square_y + square_size)
51
- if (tile_x, tile_y) not in self._get_explored_tiles(zoom)
52
- ]
53
- )
54
- )
55
-
56
- return {
57
- "explored_geojson": self._get_explored_geojson(zoom),
58
- "missing_geojson": missing_geojson,
59
- "square_geojson": square_geojson,
60
- "zoom": zoom,
61
- "square_x": square_x,
62
- "square_y": square_y,
63
- "square_size": square_size,
64
- }
65
-
66
- def export_missing_tiles(
67
- self, zoom: int, square_x: int, square_y: int, square_size: int, suffix: str
68
- ) -> str:
69
- points = make_grid_points(
70
- (
71
- (tile_x, tile_y)
72
- for tile_x in range(square_x, square_x + square_size)
73
- for tile_y in range(square_y, square_y + square_size)
74
- if (tile_x, tile_y) not in self._get_explored_tiles(zoom)
75
- ),
76
- zoom,
77
- )
78
- if suffix == "geojson":
79
- return make_grid_file_geojson(points)
80
- elif suffix == "gpx":
81
- return make_grid_file_gpx(points)
82
- else:
83
- raise RuntimeError(f"Unsupported suffix {suffix}.")
84
-
85
- def _get_explored_tiles(self, zoom: int) -> set[tuple[int, int]]:
86
- return set(self._tile_visits[zoom].keys())
87
-
88
- def _get_explored_geojson(self, zoom: int) -> str:
89
- return geojson.dumps(
90
- geojson.FeatureCollection(
91
- features=[
92
- make_explorer_tile(
93
- tile_x,
94
- tile_y,
95
- {},
96
- zoom,
97
- )
98
- for tile_x, tile_y in self._tile_visits[zoom].keys()
99
- ]
100
- )
101
- )
File without changes
@@ -1,17 +0,0 @@
1
- from flask import Blueprint
2
- from flask import render_template
3
-
4
- from ...core.activities import ActivityRepository
5
- from .controller import SummaryController
6
- from geo_activity_playground.core.config import Config
7
-
8
-
9
- def make_summary_blueprint(repository: ActivityRepository, config: Config) -> Blueprint:
10
- summary_controller = SummaryController(repository, config)
11
- blueprint = Blueprint("summary", __name__, template_folder="templates")
12
-
13
- @blueprint.route("/")
14
- def index():
15
- return render_template("summary/index.html.j2", **summary_controller.render())
16
-
17
- return blueprint
File without changes
@@ -1,32 +0,0 @@
1
- from flask import Blueprint
2
- from flask import Response
3
-
4
- from .controller import TileController
5
- from geo_activity_playground.core.config import Config
6
-
7
-
8
- def make_tile_blueprint(config: Config) -> Blueprint:
9
- blueprint = Blueprint("tiles", __name__, template_folder="templates")
10
-
11
- tile_controller = TileController(config)
12
-
13
- @blueprint.route("/color/<z>/<x>/<y>.png")
14
- def tile_color(x: str, y: str, z: str):
15
- return Response(
16
- tile_controller.render_color(int(x), int(y), int(z)), mimetype="image/png"
17
- )
18
-
19
- @blueprint.route("/grayscale/<z>/<x>/<y>.png")
20
- def tile_grayscale(x: str, y: str, z: str):
21
- return Response(
22
- tile_controller.render_grayscale(int(x), int(y), int(z)),
23
- mimetype="image/png",
24
- )
25
-
26
- @blueprint.route("/pastel/<z>/<x>/<y>.png")
27
- def tile_pastel(x: str, y: str, z: str):
28
- return Response(
29
- tile_controller.render_pastel(int(x), int(y), int(z)), mimetype="image/png"
30
- )
31
-
32
- return blueprint
@@ -1,36 +0,0 @@
1
- import io
2
-
3
- import matplotlib.pyplot as pl
4
- import numpy as np
5
-
6
- from geo_activity_playground.core.config import Config
7
- from geo_activity_playground.core.tiles import get_tile
8
-
9
-
10
- class TileController:
11
- def __init__(self, config: Config):
12
- self._config = config
13
-
14
- def render_color(self, x: int, y: int, z: int) -> bytes:
15
- map_tile = np.array(get_tile(z, x, y, self._config.map_tile_url)) / 255
16
- f = io.BytesIO()
17
- pl.imsave(f, map_tile, format="png")
18
- return bytes(f.getbuffer())
19
-
20
- def render_grayscale(self, x: int, y: int, z: int) -> bytes:
21
- map_tile = np.array(get_tile(z, x, y, self._config.map_tile_url)) / 255
22
- map_tile = np.sum(map_tile * [0.2126, 0.7152, 0.0722], axis=2) # to grayscale
23
- map_tile = np.dstack((map_tile, map_tile, map_tile)) # to rgb
24
- f = io.BytesIO()
25
- pl.imsave(f, map_tile, format="png")
26
- return bytes(f.getbuffer())
27
-
28
- def render_pastel(self, x: int, y: int, z: int) -> bytes:
29
- map_tile = np.array(get_tile(z, x, y, self._config.map_tile_url)) / 255
30
- averaged_tile = np.sum(map_tile * [0.2126, 0.7152, 0.0722], axis=2)
31
- grayscale_tile = np.dstack((averaged_tile, averaged_tile, averaged_tile))
32
- factor = 0.7
33
- pastel_tile = factor * grayscale_tile + (1 - factor) * map_tile
34
- f = io.BytesIO()
35
- pl.imsave(f, pastel_tile, format="png")
36
- return bytes(f.getbuffer())