Gee - a GTFS editor

104 views
Skip to first unread message

Mark_Lester

unread,
Feb 16, 2014, 2:50:39 PM2/16/14
to opentripp...@googlegroups.com
I've built this
http://80.47.164.11:8080/Gee/Editor.html

There is a lot of work to do on every level, especially input handling, but I thought the sooner I came clean the better.
I dont care at all if you break it or the data. I think I'm not closing a hibernate session somewhere, so it might just blow up anyway. And I reserve the right to turn it off at any second :).

You cant create new stops via the map at the moment (you can by clicking the add button on stops on the left, but then you have to come up with the co-ords), I was just about to add that but for some reason the default click from the Leaflet demo isnt working and I am done for just now. But if you select a trip it will light up with the stops in green and you should be able to edit stuff. If you click on a station that's not on that trip you can add it to the current trip. (there's a catch there with the sequence ID, I have a dirty solution to that called "heal" in Mapdata.java based on my assumption that the stopSequence must surely match the passing of time)

I am awaiting several bits of machine and software tomorrow and will then need to spend a few days in IT land and then reconstituting the project and cleaning up the total pigs ear I have made of Git and GitHub.(regulars will be very aware that I've had to learn just about everything to get this far). But you can see the entire code in here https://github.com/mark-lester/Gee/tree/master/GeeREST/, so if you know what you are doing you can at last see what I have done.
The REST consists of Entity.java which does almost all the interface, and Mapdata.java which is the stuff that I havent worked out how to do properly with hibernate yet, and GtfsLoader.java which was obviously what I started with to populate the DB and needs renaming. My create-gtfs.sql is missing I just saw, but it's as vanilla as it's possible to get, identical to the official schema but with a hibernate_id everywhere.
 
The webapp consists of Editor.html and Editor,js

I havent writ the dumper yet but that's the least of my worries, and you have to upload via GtfsLoader.java as a "java Application" and I couldnt work out how to do that once I'd made my project a Web Application. I'll get the web application  to read one straight off the exchange . It's also not showing frequencies and the fare stuff as yet, but they are, literally, a couple of lines in Editor.js and a few simple forms in Editor,html.
 
If you want to use this yourself then hold fire for about a week. I am off to Bangladesh at the end of the month so it will be deployable by then.
And if you just happen to be in Calcutta and want to help me get the local trams timetabled and on to OTP, please get in touch.

And of course, if you want to chip in, just holler. If you have any pedigree at all you can have the keys and help me at least work out the branching and stuff.

Mark_Lester

unread,
Feb 22, 2014, 2:40:13 AM2/22/14
to opentripp...@googlegroups.com

Somewhat more functional and less buggy, closer to a first cut beta anyway. The validation is next to none existent, e.g. times MUST be entered as hh:mm:ss, dates as yyyy-MM-dd.
if you click on a red station it will be added to the current trip (must enter the times correctly!), to delete it you have to use the select list on stop times.
Before I set off next week I will get the $().validate stuff to work, and have a crude fire-and-forget publish mechanism via the UI,. During March and April it will get debugged in the field and I will flesh out some kind of UI based publishing strategy to handle sanity checking, graph building, your beta OTP instance, the exchange, etc.

code here
 https://github.com/mark-lester/Stretchsoft/tree/master/Gee

Reply all
Reply to author
Forward
0 new messages