https://github.com/mdb/septa_stop_locator
A Ruby gem to find the SEPTA bus and/or trolley stops closest to a lat/long point.
https://github.com/mdb/septa_stop_locator
Last synced: 17 days ago
JSON representation
A Ruby gem to find the SEPTA bus and/or trolley stops closest to a lat/long point.
- Host: GitHub
- URL: https://github.com/mdb/septa_stop_locator
- Owner: mdb
- License: mit
- Created: 2015-03-11T13:22:47.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-02-02T13:19:30.000Z (over 10 years ago)
- Last Synced: 2025-02-16T23:16:41.300Z (over 1 year ago)
- Language: Ruby
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.org/mdb/septa_stop_locator)
# SeptaStopLocator
Get the SEPTA stops closest to a lat/long point for a given bus/trolley route.
SeptaStopLocator leverages the SEPTA stops API.
## Usage
``` ruby
require 'septa_stop_locator'
SeptaStopLocator.find(39.9539910, -75.1682170, 34)
=> [{"lng"=>-75.165345,
"lat"=>39.952672,
"stopid"=>20659,
"stopname"=>"15th St Trolley Station",
"distance"=>935.6262555741262},
{"lng"=>-75.165369,
"lat"=>39.952502,
"stopid"=>31140,
"stopname"=>"15th St Trolley Station",
"distance"=>963.389584130993}]
```
## About the stops returned
One stop is typically an inbound stop, while the other is typically an outbound stop.
The stops returned can be used to query the SEPTA Bus/trolley schedules API:
```
http://www3.septa.org/hackathon/BusSchedules/?req1=&req2=
```