commons-app / apps-android-commons

The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons
https://commons-app.github.io/
Apache License 2.0
979 stars 1.18k forks source link

Adventure: Suggest a route of X kilometers around me, via as many Nearby points as possible #5671

Open nicolas-raoul opened 3 months ago

nicolas-raoul commented 3 months ago

Imagine you are at a train station, with 30 minutes of free time before you have to board your train. You estimate that you can walk 2 kilometers in 30 minutes.

The app could:

  1. Fetch points from Nearby (only points existing and needing a picture) around the user's current position, similar to what the GPX export feature is doing but instead of 10 kilometers use the half of 2 kilometers.
  2. Use some optimization algorithm (maybe a variation of the Travelling salesman problem) to find a route that goes through as many points as possible in less than 2 kilometers, starting from the train station and ending back at the train station. Because we have no geographic data about rivers/streets/obstacles we can only make an approximation, so we should take a margin of 50%, meaning only 1 kilometer as the crow flies from point to point.
  3. Show the route on the Nearby map, apparently OsmDroid can draw polylines.
  4. Show a button to open the route on Google Maps, I hope we can construct a URL like this: https://www.google.com/maps/dir/MUSEUM+OF+ICE+CREAM,+558+Broadway,+New+York,+NY+10012,+United+States/Washington+Square+Park/Ukrainian+Village/@40.7251567,-73.9958407,15.96z/data=!4m20!4m19!1m5!1m1!1s0x89c259e713d43875:0xbfd5eb3c3e1bb328!2m2!1d-73.9979167!2d40.7238545!1m5!1m1!1s0x89c25990e23d7e8d:0xfa615edfd1b67e18!2m2!1d-73.997332!2d40.7308838!1m5!1m1!1s0x89c2599cd5c824f5:0xb1c419b3b8a7b355!2m2!1d-73.9874105!2d40.7273114!3e2?entry=ttu This allows the user to check whether the route actually takes less than 30 minutes or not.

I would suggest "Adventure" as the activity's name to make it fun, but other name suggestions (and other idea improvements) are welcome. :-)

Once this is done, the next phases (as separate issues) could be:

  1. Walk from a point to another.
  2. As an alternative to asking for kilometers, offer a way to input for instance "30 minutes walk", "30 minutes cycling", "30 minutes by car".
  3. Real itinerary planning, maybe using https://maps.openrouteservice.org or https://github.com/GIScience/graphhopper or https://github.com/graphhopper/jsprit. No answers at https://discuss.graphhopper.com/t/visit-as-many-points-as-possible-within-certain-time/2778

This old app that does not work anymore since 2015 had a similar feature: https://commons.wikimedia.org/wiki/Commons:Unvisited_app No source code unfortunately.

unvisited_trip_map_around_elm_street_historic_district _new_haven_ct

rohit9625 commented 3 months ago

It seems really fun to work on this feature. I would like to work on this enhancement :)

ShashwatKedia commented 3 months ago

@nicolas-raoul this seems to be closely related to #1118 ?