-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find stops that appear to be misplaced #14
Comments
Also, we don't have to do coordinate transforms; we can just multiply all of the longitudes by (radius of earth at equator)/(length of chord at agency latitude), and units will be invariant enough. |
K-function might be better to find groups of misplaced stops. |
How do you define misplaced?
|
I was thinking more of stops that are not near the rest of the stops in the entire feed, e.g. reversed lat/lon or at null island (0 lat 0 lon, due to math errors). |
Using the number of stops in of a cluster or iterative k-means are good formulations. If machine learning approaches seem a bit confusing, I have a suggestion: If you know the overall precision you want to target, use geohashes as a heuristic. If you spot something that does not have the same prefix, calculate the adjacent hashes and compare with those. https://en.wikipedia.org/wiki/Geohash This library has a method for calculating adjacent hashes. If you're interested in a test set, I have a copy of the Amtrak feed from 2013. I'm not able to think of a GTFS for a bigger region. |
We want to find stops that are a long way away from the nearest stop. A good way to do this would be to compute the G function of all the stops and then see if this stop lies far from the distribution.
This seems like it would be slow, but this takes an imperceptible amount of time using one core of my machine, computing the G function for 14,000 randomly distributed stops (which is about how many there are in Chicago, the largest GTFS feed I know of).
The text was updated successfully, but these errors were encountered: