you want to read the files through java then ummm parse then and create whatever the database or stuff?
Would it matter that the file size is 30MB for the stop times of a mid-sized city? Plus keeping in mind that it's gonna be processed on a phone, would it be possible...if yes, roughly how much time do you think it would take?
@RK: even if I fail to import databases from the text files, the end result would still mean that I'll be able to edit the database manually and use the app for my own use so I don't mind the amount of time spent.
I had a nice look at the data files.
It's supposed to be like this:
The user goes to a list of transit services, clicks a services, goes to the list of stops for that service.
That list of stops will be grabbed from the data in stops.txt
Then, they click one of the stops and it should show the arrival time of the next bus relative to the time on the phone...to get the stop times, the program will use the "stop_id" to query the "stop_times" table (from stop_times.txt).
The tricky part starts here: the stop_times table holds "stop_id" (not primary), arrival/depart time (I'll probably only use arrival time since it's identical mostly) and "trip_id" (not primary in this table)
Now this trip_id, sadly is not in routes.txt (which is the bus list), so now it has to look up in the trips.txt's table to find which route_id are we talking about (trip_id is a primary key in trips table)
that's how we see which bus is coming on the matched time to the corresponding stop. Holy shit. I salute you Google Maps.
Btw Stop Times has a stupid 701719 rows (that's a mid-sized city) and trips.txt has 15142 rows, stops is 2393 and routes is just a measly 66. Got nothing to do with shapes as of yet.
Brain fart. I'm gonna go to sleep before my brain implodes. I'll think later about what happens when a user wants the route list.
Oh and did I mention that the user has to be able to search stops by stop_desc? Since, at least in my city... stop_id != the stop id on the bus stop.
Tomorrow...or probably hopefully on 4th November, I'll be making the Stop list activity...lol, laughing at myself at the amount of work I think it's gonna be.
---------- Post added at 01:03 AM ---------- Previous post was at 12:40 AM ----------
edit: looks like importing the csv files is the least of my worries. It's the actual working
I have found some stuff, a bit of python which I might be able to use the concept of to help in converting