You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At Reboot the Commute, @ryankanno wanted to use the API to report incidents between two zip codes. I convinced him that what you really want is routes, because someone's not going to care about accidents that happen on a side street. He said, "Oh, never mind then. I'll just demo it saying it goes from Hawaii Kai to town and it'll report incidents along Kalanianaole Highway between 3 and 5 PM".
This lead me to an epiphany. Take this example from goakamai.org.
You've probably seen something similar many times on TV. What's really interesting is what's not on it. It only maps out the main arteries on the island, and we're on a pretty small island. So, why don't we only map out incidents along certain roads? Yes, some people will care about "the last mile", but everybody will care about incidents on the major roads they take to work.
Proposal
Let's start with neighboring areas. If the user's route is from Mililani to Waipahu (or vice versa), the user cares about incidents along H3 and incidents along a certain segment of Kamehameha Highway. We have the address and exit information, so we can figure this out. Now let's say the person is going from Waipahu to Pearl City. We would then look at incidents that happen along a certain segment of Kamehameha Highway and a certain segment of H1 (H1/H2 merge to Kaonohi Overpass). If the user goes from Mililani to Pearl City, we can combine the two.
So, more abstractly, we can start creating points that represent areas and then draw lines between each area's immediate neighbor. Each line represents the segments of major roads that we care about. The slightly tricky part is figuring out what's the shortest path in miles is between two areas. If you have a CS background, this sounds really familiar to you. For the rest of you, see Dijkstra's Algorithm.
Feedback
This isn't perfect and we'd probably have to make decisions for corner cases (Waimanalo to town, do you go through Hawaii Kai or go through Kailua?). I'm also thinking that this should be part of hitraffic/api-server. I'm only putting it here because the mobile team in February expressed interest in solving this problem. Let me know if this proposal makes sense. It's a challenging problem that requires actual computer science (gasp), but it'll also make the app complete.
@hitraffic/members, thoughts?
The text was updated successfully, but these errors were encountered:
While I'm not entirely sure what this app is doing - I think what might have been missed is that we solved this problem by decoding the polyline of the actual route and using a spatial query with a tiny radius - which seems to work out pretty well for our use case. I'm not sure if it's the same as this, though. :)
*kinda
Background
At Reboot the Commute, @ryankanno wanted to use the API to report incidents between two zip codes. I convinced him that what you really want is routes, because someone's not going to care about accidents that happen on a side street. He said, "Oh, never mind then. I'll just demo it saying it goes from Hawaii Kai to town and it'll report incidents along Kalanianaole Highway between 3 and 5 PM".
This lead me to an epiphany. Take this example from goakamai.org.
You've probably seen something similar many times on TV. What's really interesting is what's not on it. It only maps out the main arteries on the island, and we're on a pretty small island. So, why don't we only map out incidents along certain roads? Yes, some people will care about "the last mile", but everybody will care about incidents on the major roads they take to work.
Proposal
Let's start with neighboring areas. If the user's route is from Mililani to Waipahu (or vice versa), the user cares about incidents along H3 and incidents along a certain segment of Kamehameha Highway. We have the address and exit information, so we can figure this out. Now let's say the person is going from Waipahu to Pearl City. We would then look at incidents that happen along a certain segment of Kamehameha Highway and a certain segment of H1 (H1/H2 merge to Kaonohi Overpass). If the user goes from Mililani to Pearl City, we can combine the two.
So, more abstractly, we can start creating points that represent areas and then draw lines between each area's immediate neighbor. Each line represents the segments of major roads that we care about. The slightly tricky part is figuring out what's the shortest path in miles is between two areas. If you have a CS background, this sounds really familiar to you. For the rest of you, see Dijkstra's Algorithm.
Feedback
This isn't perfect and we'd probably have to make decisions for corner cases (Waimanalo to town, do you go through Hawaii Kai or go through Kailua?). I'm also thinking that this should be part of hitraffic/api-server. I'm only putting it here because the mobile team in February expressed interest in solving this problem. Let me know if this proposal makes sense. It's a challenging problem that requires actual computer science (gasp), but it'll also make the app complete.
@hitraffic/members, thoughts?
The text was updated successfully, but these errors were encountered: