From 322f4a13baff936e3a81e0d1274e65eaf5d87fef Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Thu, 15 Jun 2017 09:27:33 -0400 Subject: [PATCH 1/2] Fix presentation link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21fdbbfc..30ab2852 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ If you'd like to contribute to the project, please let us know! ## Papers and Presentations -If you're interested in the details of GO_Sync, check out our [paper](http://www.locationaware.usf.edu/wp-content/uploads/2011/10/Tran-et.-al.-GO_Sync-Framework-to-Synchronize-Crowd-sourced-Transit-Data-with-GTFS-ITS-final.pdf) and [presentation](http://www.locationaware.usf.edu/wp-content/uploads/2011/10/LocationDataSigning-ITSWC2011-sjb.pps) from the 2011 ITS World Congress: +If you're interested in the details of GO_Sync, check out our [paper](http://www.locationaware.usf.edu/wp-content/uploads/2011/10/Tran-et.-al.-GO_Sync-Framework-to-Synchronize-Crowd-sourced-Transit-Data-with-GTFS-ITS-final.pdf) and [presentation](https://www.slideshare.net/sjbarbeau/go-syncitsworldcongress20119703) from the 2011 ITS World Congress: Khoa Tran, Ed Hillsman, Sean J. Barbeau, and Miguel Labrador. “GO! Sync – A Framework to Synchronize Crowd-Sourced Mapping Contributions From Online Communities and Transit Agency Bus Stop Inventories,” Proceedings of the 2011 ITS World Congress, Orlando, FL, October 18, 2011. From 3bd069a2f19e3df156b95219a5487d9b5323d034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sun, 23 Jul 2017 15:48:01 -0700 Subject: [PATCH 2/2] Fix #30 - Strip BOM from first line of input files (#31) --- .../java/edu/usf/cutr/go_sync/io/GTFSReadIn.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/GO_Sync/src/main/java/edu/usf/cutr/go_sync/io/GTFSReadIn.java b/GO_Sync/src/main/java/edu/usf/cutr/go_sync/io/GTFSReadIn.java index 2eda90f1..73b9d90a 100644 --- a/GO_Sync/src/main/java/edu/usf/cutr/go_sync/io/GTFSReadIn.java +++ b/GO_Sync/src/main/java/edu/usf/cutr/go_sync/io/GTFSReadIn.java @@ -38,6 +38,7 @@ public class GTFSReadIn { private List stops; private final String ROUTE_KEY = "route_ref"; private final String NTD_ID_KEY = "ntd_id"; + private static final String UTF8_BOM = "\uFEFF"; private static Hashtable allRoutes; //TODO read agency.txt @@ -136,6 +137,9 @@ public List readBusStop(String fName, String agencyName, String routes_fNa { if (isFirstLine) { isFirstLine = false; + if (thisLine.startsWith(UTF8_BOM)) { + thisLine = thisLine.substring(1); + } OperatorInfo.setGtfsFields(thisLine); thisLine = thisLine.replace("\"", ""); String[] keys = thisLine.split(","); @@ -250,6 +254,9 @@ public Hashtable readRoutes(String routes_fName){ while ((thisLine = br.readLine()) != null) { if (isFirstLine) { isFirstLine = false; + if (thisLine.startsWith(UTF8_BOM)) { + thisLine = thisLine.substring(1); + } thisLine = thisLine.replace("\"", ""); String[] keys = thisLine.split(","); for(int i=0; i> matchRouteToStop(String routes_fName, S while ((thisLine = br.readLine()) != null) { if (isFirstLine) { isFirstLine = false; + if (thisLine.startsWith(UTF8_BOM)) { + thisLine = thisLine.substring(1); + } thisLine = thisLine.replace("\"", ""); String[] keys = thisLine.split(","); for(int i=0; i> matchRouteToStop(String routes_fName, S while ((thisLine = br.readLine()) != null) { if (isFirstLine) { isFirstLine = false; + if (thisLine.startsWith(UTF8_BOM)) { + thisLine = thisLine.substring(1); + } thisLine = thisLine.replace("\"", ""); String[] keys = thisLine.split(","); for(int i=0; i(); // readBusStop("C:\\Users\\Khoa Tran\\Desktop\\Summer REU\\Khoa_transit\\stops.txt"); } -} \ No newline at end of file +}