Skip to content
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

logging for equal consecutive distances and segment mismatch case #482

Merged
merged 1 commit into from
Mar 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/models/route_stop_pattern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def calculate_distances
total_distance += RGeo::Feature.cast(splits[0], RouteStopPattern::GEOFACTORY).length
distances << total_distance.round(DISTANCE_PRECISION)
end
if (i != 0 && distances[i-1] == distances[i])
logger.info "stop #{self.stop_pattern[i]} has the same distance as #{self.stop_pattern[i-1]}, which may indicate a segment matching issue."
end
cast_route = splits[1]
end
if (distances[i] > geometry_length)
Expand Down