trafficguide/alt-routes

Suggest to the features

Opened this issue · 5 comments

Hello ,i have some sharing on the 2 aspect that may make the tool more useful to user:

Boundaries for district areas

  1. We may use the district council ordinary election constituency boundaries( https://www.eac.hk/en/distco/2019dc_elect_map.htm ) as our areas codes

  2. It is not down to building, but it is quite small area in a district. Serveral nearby housing or buildings which may be withen walkable distance are grouped,which reduce the number of areas to compute.

  3. some constituency boundaries are quite unreasonable, for example the A01, Central and western district, which includes a large area of central.

  4. Some boundaries looks quite suitable for the tool's usage, like Tai Po Market area,Tai Po district, some boundaries size are quite small and within walking distance.

  5. For some rural area,like in sai kung, a boundary may represent a very large area. In certain extent, it seems acceptable as there may be a less demand for commuting.

Estimate of travel times

  1. (Only applicable to KMB) In web version of KMB route search, normal travel time between bus stop for a specific route can be shown to user.
    Screenshot_20191004_080513_com android chrome
  2. If we can scarp the value to the database, could be a reference for the user.

Thanks for your development time!

First of all, thanks for your feedback!

Re: Boundaries

Current situation

These are already implemented/is being implemented:

The entire HK is divided into many small "districts" (I call them "sectors"). Each sector has exactly 1 "waypoint". Bus lines are described as a list of waypoints that the bus line will travel through, like connecting dots on a piece of paper.

When I summarize how I justify making a waypoint, there are a few rules:

  1. It is an MTR station (obvious) (e.g. 沙田 MTR)
  2. It is a highway/"main road"/tunnel
    • "Main roads" e.g. 大埔道
    • Highways e.g. 獅子山隧道公路
    • Tunnel e.g. 城門隧道 (obvious)
    • Highways can be further split apart depending on their length; e.g., 吐露港公路 Tolo Highway can be split to Tolo Highway (Coastal/馬料水) and Tolo Highway (大埔)
    • Aim to make sure that the roads represented by the highway waypoints take about the same time to travel through
  3. It is an interchanging place (e.g. 粉嶺華明)
  4. It has special status (e.g. 彩虹 紅萼樓 for allowing 東九 people to switch to buses that goes to 大老山)
  5. When it does not seem to belong anywhere but omitting it will cause estimation problems (e.g. 耀東邨 at 筲箕灣, some buses will be 西灣河 -> 耀東邨 -> 筲箕灣, clearly it is not equal to just 西灣河 -> 筲箕灣

And finally, when you put every waypoint together, and their sectors they represent, you could see a fully-filled HK map.

What I want to do

It can be difficult to remember all the waypoints (I am using VS Code auto-complete to help a bit, but still, I need to remember something), and sometimes, I may forget to add in some waypoints when entering (e.g. missing a highway segment accidentally).

I hope to generate/make a map that indicates where the waypoints are, so I can avoid forgetting waypoints, and also determine whether the waypoints are good.

What I have tried so far

I thought about District Council boundaries, but then I remembered, each election they may adjust their boundaries a bit, which can make maintenance a bit problematic.

I tried Google My Maps. It should allow others to edit the map and divide HK map while e.g. I go do other things. But:

  • Cannot edit Google My Maps when not logged in (even when the share link is set to "allow link to edit")
  • Driving paths (to represent the highway segments) will be placed on a separate map layer, and will not mix well with other driving paths
  • There is a maximum amount of driving paths that a My Map can support

Conclusion

I still don't know. Maybe I find a group of people just to divide the map, but the people-finding process can be inefficient... Need some suggestions here.

Re: Travel time

Getting data from KMB is legally not possible... There had been several apps that got banned and/or received legal letters because they accessed KMB's ETA API.... Just Google a bit...

(But Citybus/New World is OK, we can access through data.gov.hk )

Fortunately, we have USHB providing similar information: travel time between two adjacent bus stops. Something like this:

690 Image USHB

When we implement the travel time using USHB's information, we will need to solve a problem: how do we know which bus stop should be used to provide travel time? e.g., for 源禾路, there are already 2 bus stops, which one should we use?

We face a similar problem when we try to implement ETA for the lines (you see the -1 分鐘 column to the left, that's the placeholder): so we print a ETA info, but which stop are we talking about in the ETA info? Or, which bus stop should be used to print the ETA info?

Conclusion

This is a long text to write down what I have thought about...

Let's continue to discuss on the boundaries.

  • i agree that we divide place into sector with way point, for a mobile phone with limited resources, it may be difficult to compute all the possible way when using all stops of a transport means, not to say a possibility over weight database.

  • the advantage road transport is they can offer a short walking distance on some scenario, therefore it is attractive if the result can show the actual stop where the passenger get off.

  • while the grouping of places can reduce the complexity, stops within sector can be returned whenever more suitable. A user may choose to input a more precise location?

  • then i think we can perform a look up of the stop in a sector that is closest to the destination which can benefits the user.

  • alternatively, we can show all relavant stop in a sector, using some way to indicate the location of the stop with respect to the sector ,say Sai wan ho E,swh NW, swh Center? I am not sure whether this is pratical.

  • in reverse, we may need to develop a way to map a stop to its sector such that while the route searching can be done in less complexity,the user can still get off in a relatively nearby location.

  • one bruce force way is to get the lat. and long. of stop from a route to judge which sector the stop is in.once the automate part is completed, every update in stop location can be adopted by running the algorithm again.

  • if there exists a stop in a sector for a specific route,we can add the way point to that route automatically

  • in this way, i think you can keep your waypoint/sector logic to search for route,but display a much closer stop for each lookup?

time vs price

  • recently, i have a new mindset on the travel time vs travel fee. If the transportation that get me to the destination is just cheaper than taxi /uber,while faster time of travel than the ordinary route ,then it is a still acceptable route

  • some large transportation app uses fare as a higher order for sorting,but possibly missed out some more practical/actually faster routes, see if we can overcome this weakness

Re: Boundaries

This app is mainly for searching bus lines from and to some MTR stations, and because there are so many MTR stations properly placed, it is quite reliable to just use those MTR stations as waypoints.

But I agree we should make the search more precise. And to make it more precise, I can think of this way of modifying the search logic:

  • Divide the current "sectors" into smaller "sub-sectors", preferrably, each sub-sector can be represented by a single bus stop
  • Still the same, the user can only select where to travel from and to using the MTR station list at first. However, when they complete their first search, to first let them see if the results are OK, we can allow them to select from exactly which sub-sector to travel from, and similarly for the destination; then we will be able to do a more detailed search to tell the user where more exactly they should take the bus to
  • After the modification, we can tell the sectors to store the list of sub-sectors that are "within" the sector itself
  • Bus lines will not store what sectors they will pass through, but they will store which "sub-sector" they will pass through

So, for example:

  • I want to go from "Sha Tin Wai" to "CUHK"
  • I first do a search using the MTR station list, and obtain the result "72A 大埔工業邨" (maybe some other results also); you can verify the 72A indeed passes "near" Sha Tin Wai MTR
  • The webpage now asks me more details. I can then choose e.g. for the "Sha Tin Wai" part, I can choose "大涌橋路" or "沙角街"
  • Let's say now I choose "沙角街". Because 72A actually passes through "大涌橋路", the webpage tells me to first walk to 大涌橋路 first before taking 72A
  • Similarly for the destination part

This will either require a lot of human effort to divide the sectors, or require a lot of effort on the programming side to make a user interface to let others divide the sectors easily.

Re: Time and price

I think it is a challenge/difficulty to combine "time" and "price" into a single unit; after all, travel time is approximated here... we do not easily have a concrete value to be used as a standard.

Conclusion

A brief idea on how we may make the path-finder more precise and attractive to bus-riders.

For dividing sector, it seems referring to a term 'geofencing'. Searching on google, it seems we can combine open street map with leaflet.js to draw the boundaries: https://medium.com/@nnwabuokei/creating-editing-geo-fences-using-openstreetmap-with-the-leaflet-js-library-in-angular-5-project-44f0abbe2643

I have not look in detail, but the headings seem suggesting leaflet.js can help us.

Because this webpage/app is expected to also work when there is no Internet, we cannot rely on the libraries everytime we want to obtain map data.

However, we should be able to easily download and prepare map data just by using the libraries. This should help development a bit, but not sure how.

Still not looked into detail too, but this seems a possible approach.