Skip to content

Commit

Permalink
Merge pull request #5 from CUTR-at-USF/master
Browse files Browse the repository at this point in the history
master
  • Loading branch information
reubot authored Dec 12, 2017
2 parents 91d0a3f + 3bd069a commit cd6a736
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion GO_Sync/src/main/java/edu/usf/cutr/go_sync/io/GTFSReadIn.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class GTFSReadIn {
private List<Stop> 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<String, Route> allRoutes;
//TODO read agency.txt

Expand Down Expand Up @@ -136,6 +137,9 @@ public List<Stop> 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(",");
Expand Down Expand Up @@ -250,6 +254,9 @@ public Hashtable<String, Route> 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<keys.length; i++){
Expand Down Expand Up @@ -321,6 +328,9 @@ public Hashtable<String, HashSet<Route>> 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<keys.length; i++){
Expand Down Expand Up @@ -362,6 +372,9 @@ public Hashtable<String, HashSet<Route>> 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<keys.length; i++){
Expand Down Expand Up @@ -441,4 +454,4 @@ public GTFSReadIn() {
allRoutes = new Hashtable<String, Route>();
// readBusStop("C:\\Users\\Khoa Tran\\Desktop\\Summer REU\\Khoa_transit\\stops.txt");
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit cd6a736

Please sign in to comment.