Giter Club home page Giter Club logo

gtfsoffline's People

Contributors

btdn avatar matthewseal avatar wbrenna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gtfsoffline's Issues

Trip Ending Alert

Sometimes it will state a new bus departure when it is that route's end-of-line. This should be checked for and no longer displayed.

Erroneous Favourite Stops

Testing with TTC STN and GRT, if I turn only TTC on, the Favourites tab gives TTC favourites with STN and GRT stop names.

Copy from Downloads

Now that the app is using an external storage permission, maybe just let it copy all *.db.gz from Downloads folder and do the gunzip itself.

*.db.gz made from mksql3db.sh no longer recognizable by GTFSOffline app

Symptom: GTFSOfline will scan Download folder, but database does not appear in app.

Environment:
Motorola X Play (Lux) running custom 7.1.2 firmware (problem noticed after a /sdcard wipe).
Could be possible Debian 9 gzip added a feature to format to break readability, or (admittedly) gzip on phone unavailable/broken.

gzip on PC to compile *.db.gz is 1.6

Partial logcat to come to this conclusion:

01-24 15:50:19.251 W/System  (9639): ClassLoader referenced unknown path: /data/app/com.wbrenna.gtfsoffline-1/lib/arm
...
01-24 15:50:26.881 V/UpdateActivity(9639): Download folder is: Download
01-24 15:50:26.885 V/UpdateActivity(9639): File found: halifax.db.gz
01-24 15:50:26.886 V/UpdateActivity(9639): halifax.db.gz
01-24 15:50:26.888 E/UpdateActivity(9639): IOException exception
01-24 15:50:26.888 W/System.err(9639): java.util.zip.ZipException: Not in GZIP format
01-24 15:50:26.888 W/System.err(9639): 	at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:163)
01-24 15:50:26.888 W/System.err(9639): 	at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:77)
01-24 15:50:26.889 W/System.err(9639): 	at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:89)
01-24 15:50:26.892 W/System.err(9639): 	at com.wbrenna.gtfsoffline.UpdateActivity$DBMover.doInBackground(UpdateActivity.java:153)
01-24 15:50:26.892 W/System.err(9639): 	at com.wbrenna.gtfsoffline.UpdateActivity$DBMover.doInBackground(UpdateActivity.java:95)
01-24 15:50:26.892 W/System.err(9639): 	at android.os.AsyncTask$2.call(AsyncTask.java:305)
01-24 15:50:26.892 W/System.err(9639): 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
01-24 15:50:26.892 W/System.err(9639): 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
01-24 15:50:26.892 W/System.err(9639): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
01-24 15:50:26.892 W/System.err(9639): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
01-24 15:50:26.892 W/System.err(9639): 	at java.lang.Thread.run(Thread.java:761)
01-24 15:50:26.910 V/UpdateActivity(9639): Finished copying stops!
01-24 15:50:26.938 I/ActivityManager(768): Displayed com.wbrenna.gtfsoffline/.UpdateActivity: +100ms

List Stops more Nicely

Put the Stop Number up next to the Stop Name, and use Route Number in the yellow box so it's easier to see. Add a direction to the route.

Null Pointer Exception moving DB

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.NullPointerException
at com.wbrenna.gtfsoffline.UpdateActivity$DBMover.doInBackground(UpdateActivity.java:134)
at com.wbrenna.gtfsoffline.UpdateActivity$DBMover.doInBackground(UpdateActivity.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more

Time ordering breaks in Far Future

Set the lookahead time to 8 hours and notice that 7.5 hour-away trips are returned before 19 minute-away ones. Tested 10.49PM on a Monday.

More options for closest stops

10 is sometimes (rarely) too few. Create some settings like 30 and 90 maybe, in case you need to look far away (or at large bus terminals).

Cannot parse data for IDS-JMK [CZ] agency

Dataset for IDS-JMK agency downloaded from

IDSJMK

What is wrong?

./mksql3db.sh idsjmk.db idsjmk/*.txt
mksql3db.sh: no existing db; using version 1
using database version 2
idsjmk/agency.txt
idsjmk/api.txt
idsjmk/calendar_dates.txt
idsjmk/calendar.txt
idsjmk/routes.txt
idsjmk/stops.txt
idsjmk/stop_times.txt
idsjmk/transfers.txt
idsjmk/trips.txt
Checking for missing calendar_dates.txt or calendar.txt...
Creating indices...
Indices created.
Adding head signs if not already in DB...
Error: in prepare, no such column: table
select sql from sqlite_master where type="table" and tbl_name="trips";
error here ---^
Parse error near line 1: duplicate column name: trip_headsign
Parse error near line 2: near ",": syntax error
insert into trips select ,trip_headsign from (select ,(select coalesce(stop_na
error here ---^
Adding head signs completed
Deleting departure time of last stop of each trip...
Error: in prepare, no such column: table
select sql from sqlite_master where type="table" and tbl_name="stop_times";
error here ---^
Parse error near line 1: near "from": syntax error
insert into stop_times select from (select from stop_times group by trip_id
error here ---^
Parse error near line 2: no such column:
here departure_time is not NULL and arrival_time<>"" and rowid not in (select
error here ---^
Deleting departure times completed
Renaming and cleaning up...
mv: cannot stat 'idsjmk.db': No such file or directory
mv: cannot stat 'idsjmk.db.version': No such file or directory
idsjmk.db: 75.5% -- replaced with stdout

Search feature

I noticed the search feature is absent in this fork. Was this a privacy decision or to keep it simple? Would it be something you'd consider adding in the future?

Data loss while using the app (dialog disappears on-screen rotation)

When I perform these sequences of events, the dialog disappears on-screen rotation:

  1. Go to the Main activity
  2. Tap in Settings
  3. Tap in Search Window (km)
  4. A fragment similar to this will appear:

  1. Force the pause from the activity and then return to the activity (double rotation). Note that the fragment disappears. Note: the pause from activity can be performed in several ways. We suggest using a double rotation (starts in portrait, goes to landscape, and back to portrait) with this function previously enabled in the smartphone.

The expected behavior is the return to the previous state with the fragments of the previous image.

However, the fragment disappears.

Device:

  • Device: Mi5X with OS: Android 7.1.2
  • Device language: English

[FR] Maps

Privacy preserving maps could be implemented by using mapsforge which uses OpenStreetMap vector data rendered locally similar to OsmAnd. Mapsforge files are stored in a shared directory so they can be used by multiple applications.

An example of an app that uses mapsforge is SatStat which also has an integrated downloader. If you don't wish to add an internet permission, the files could be added via drag and drop.

Statically link hourtoggle

Hourtoggle should be equal to the lookahead time in order to make things more efficient. Currently breaks on lookahead > 8 since hourtoggle = 8.

Leaked Databases

Even slowly changing tabs leaks databases. Sometimes it still reports database leaks that have been removed from the system! It could be an onPostExecute not being reached due to a screen rotation or something like that...

At the worst I can try taking the closeDB out of onPostExecute and putting it immediately after all database queries.

rtd denver

greetings. I've been trying to get rtd denver's gtfs data to work, but it's not. dunno where to begin to figure out why not, since i'm quite new to android, although my phone is not: this is in a zte n817 running android v4.4.4.x. Hoping a kind programmer might take a look at rtd's data and clue me in whether the fault is theirs, mine or other :)
thanks in advance. rtd's gtfs page is here
http://www.rtd-denver.com/gtfs-developer-guide.shtml

DB Change is Messed Up

When the DBs are changed in preferences, it sometimes just shows new tabs without loading the new DB or changing the DB for the tab.

Bug in location manager

If only one location service is enabled, the alternate service is queried (GPS/NETWORK). This probably means location services won't work if one of the two is turned off. Fix required in LocationHelper.java.

Add Stale Database Warning

For each database, search calendar.txt and if the end dates are all before our date, just give a fixed warning.

Errors and empty db file when running mksql3db.sh

Hello,

I get errors when launching DB generation script under Ubuntu 12.04 LTS. I only get a nearly empty file whereas GTFS data is OK:

nicolas@spiralo2:~/transports/GTFSOffline/data$ ./mksql3db.sh aTER.db ../../GTFS-viz/gtfs-data/ter/*.txt
using database version 7
../../GTFS-viz/gtfs-data/ter/agency.txt
../../GTFS-viz/gtfs-data/ter/calendar_dates.txt
../../GTFS-viz/gtfs-data/ter/calendar.txt
../../GTFS-viz/gtfs-data/ter/routes.txt
../../GTFS-viz/gtfs-data/ter/stops.txt
../../GTFS-viz/gtfs-data/ter/stop_times.txt
../../GTFS-viz/gtfs-data/ter/transfers.txt
../../GTFS-viz/gtfs-data/ter/trips.txt
Checking for missing calendar_dates.txt or calendar.txt...
WARNING: Could not find calendar_dates.txt. Creating an empty table for holiday data...
WARNING: Could not find calendar.txt. Creating an empty table for regular data...
Creating indices...
Error: near line 1: no such table: main.stops
Error: near line 2: no such table: main.routes
Error: near line 3: no such table: main.trips
Error: near line 4: no such table: main.trips
Error: near line 5: no such table: main.stop_times
Error: near line 6: no such table: main.stops
Indices created. Renaming and cleaning up...
aTER.db: 93.8%
-rw-r--r-- 1 nicolas nicolas 6144 août 13 14:34 aTER.db
-rw-rw-r-- 1 nicolas nicolas 412 août 13 14:34 aTER.db.gz
-rw-rw-r-- 1 nicolas nicolas 37 août 13 14:34 aTER.db.version
7 0 fe02b00de4d4fe2a93d2bd98e8c02387

aTER.db is "empty":

nicolas@spiralo2:~/transports/GTFSOffline/data$ more aTER.db
SQLite format 3
dar_dates_datecalendar_datesCREATE INDEX calendar_dates_date on calendar_dates ( date )?
?itablecalendarcalen
darCREATE TABLE``calendar(service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_
date)d))?tablecalendar_datescalendar_datesCREATE TABLE``calendar_dates(service_id,date,exception_type)l--?
tab
leandroid_metadataandroid_metadataCREATE TABLE "android_metadata" ("locale" TEXT DEFAULT``'en_US')

Still I have GTFS data:

nicolas@spiralo2:~/transports/GTFSOffline/data$ ls -l ../../GTFS-viz/gtfs-data/ter/
total 13072
-rw-rw-r-- 1 nicolas nicolas 116 juil. 7 09:35 agency.txt
-rw-rw-r-- 1 nicolas nicolas 292597 juil. 7 09:35 calendar_dates.txt
-rw-rw-r-- 1 nicolas nicolas 127098 juil. 7 09:35 calendar.txt
-rw-rw-r-- 1 nicolas nicolas 75653 juil. 7 09:35 routes.txt
-rw-rw-r-- 1 nicolas nicolas 473513 juil. 7 09:35 stops.txt
-rw-rw-r-- 1 nicolas nicolas 11309282 juil. 7 09:35 stop_times.txt
-rw-rw-r-- 1 nicolas nicolas 57 juil. 7 09:35 transfers.txt
-rw-rw-r-- 1 nicolas nicolas 1081951 juil. 7 09:35 trips.txt
nicolas@spiralo2:~/transports/GTFSOffline/data$

Do you know where the problem comes from?

Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.