jeancochrane / mellow-bike-map

🚲 Web app and routing API for finding safe, chill bike routes. Like Google Maps if it took you through cozy side streets.
https://mellowbikemap.com
MIT License
13 stars 5 forks source link

Prioritize low-speed streets #9

Open jeancochrane opened 4 years ago

jeancochrane commented 4 years ago

Related to #8, update the query and the API response to show which streets in the generated route are mellow or not. Also return which type of mellow route they are (#3).

jeancochrane commented 4 years ago

Let's also update the query to prioritize one-way streets.

jeancochrane commented 4 years ago

oneway alone isn't quite what we want because many large streets are actually split into two "one-way" lanes. Let's try using maxspeed as a scale factor instead.

jeancochrane commented 4 years ago

Hm, the distribution of max speeds isn't promising:

mbm=# select maxspeed_forward, count(maxspeed_forward) from chicago_ways group by maxspeed_forward;

 maxspeed_forward | count  
------------------+--------
          8.04673 |     23
         16.09346 |      6
         24.14019 |      5
         32.18692 |    267
         40.23365 |    100
         48.28038 |   1125
               50 | 179682
         56.32711 |    145
         64.37384 |     30
jeancochrane commented 4 years ago

Two other tags, width and traffic_calming, also don't seem very prevalent in the data:

mbm=# select count(*) from osm_ways where tags ? 'width';
 count
-------
    56
(1 row)

mbm=# select count(*) from osm_ways where tags ? 'traffic_calming';
 count
-------
     7
(1 row)