Skip to content

Commit

Permalink
stop stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeballcode committed Oct 13, 2019
1 parent 822230e commit 0c3cf45
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions load-gtfs/utils/load-stops.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,21 @@ module.exports = async function (stopsData, stops, mode, lookupTable, adjustStop

let mergedStops = {}

function canMerge(shortName) {
return !(shortName.endsWith('St') || shortName.endsWith('Rd')
|| shortName.endsWith('Pde') || shortName.endsWith('Cl')
|| shortName.endsWith('Dr') || shortName.endsWith('Ave')
|| shortName.endsWith('Gr') || shortName.endsWith('Ct')
|| shortName.endsWith('Hwy') || shortName.endsWith('Tce')
|| shortName.endsWith('Wat') || shortName.endsWith('Cl')
|| shortName.endsWith('Crst') || shortName.endsWith('Pl')
|| shortName.endsWith('Bvd') || shortName.endsWith('Cres'))
}

function getStopHashID(bayData, shortName) {
let stopHash = createStopHash(bayData.fullStopName)
if (!canMerge(shortName)) return stopHash

let bayCoordinates = bayData.location.coordinates

let mergeDistance = 100
Expand Down

0 comments on commit 0c3cf45

Please sign in to comment.