summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcreate-data.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/create-data.js b/create-data.js
index a365e2c..d97092c 100755
--- a/create-data.js
+++ b/create-data.js
@@ -1515,6 +1515,17 @@ function loadBusData(collections, callback) {
function(routes, callback) {
async.eachSeries(routes, function(route, callback) {
processRoute(route, null, stopAreaRoutes, function(err, feature) {
+ // Check if this route is a duplicate
+
+ for (var i in collections.busRoutes.features) {
+ var route = collections.busRoutes.features[i];
+
+ if (route.properties.name === feature.properties.name) {
+ callback(err);
+ return;
+ }
+ }
+
collections.busRoutes.features.push(feature);
callback(err);