Hi, Please help review. This patch fixed a bug. When we initialize the feed, we ...
13 years, 12 months ago
(2010-05-06 07:46:34 UTC)
#1
Hi,
Please help review.
This patch fixed a bug.
When we initialize the feed, we will generate the trip.shape_id if trip has no
shapes. But the shape_id is not saved to DB (table:trips field:shape_id).
If we click 'Export GTFS Feed', we find that the listings of DB will be exported
to the new zip file, so the shape_id we generated will be lost in the new zip
file.
This patch is added that the trip.shape_id will be saved to DB before DB to zip
file.
BTW: the other question you mentioned is that the speed of generating all the
shapes is slowly. It's not happened.
There are 1934 shapes in Boston.zip, and it costs less than one minute when
checking all shape exists.
Add unittest to check whether shape_id has been set properly? http://codereview.appspot.com/1135041/diff/4001/5001 File python/transitfeed_editor.py (right): http://codereview.appspot.com/1135041/diff/4001/5001#newcode372 ...
13 years, 12 months ago
(2010-05-06 07:57:13 UTC)
#2
Hi, I've added the unit test. Please help review. Thanks. http://codereview.appspot.com/1135041/diff/4001/5001 File python/transitfeed_editor.py (right): http://codereview.appspot.com/1135041/diff/4001/5001#newcode372 ...
13 years, 11 months ago
(2010-05-13 14:05:50 UTC)
#3
Hi,
I've added the unit test.
Please help review.
Thanks.
http://codereview.appspot.com/1135041/diff/4001/5001
File python/transitfeed_editor.py (right):
http://codereview.appspot.com/1135041/diff/4001/5001#newcode372
python/transitfeed_editor.py:372: (name, ''.join(fields), name,
','.join(fields)))
On 2010/05/06 07:57:13, wLiu.sjtu wrote:
> Why adding a duplicate name here?
In sqlite we can generate two index which are the same name. Because we need to
create trip_id in table trips and table stop_times, we create index with using
table_name, field_name.
http://codereview.appspot.com/1135041/diff/4001/5001#newcode408
python/transitfeed_editor.py:408: 'trip_id = "%s";' % (trip.shape_id,
trip.trip_id))
On 2010/05/06 07:57:13, wLiu.sjtu wrote:
> Indent
Done.
Issue 1135041: Importing the trip.shape_id into table trips if it's empty when exporting GTFS feeds
Created 13 years, 12 months ago by quguangfan
Modified 7 years, 4 months ago
Reviewers: wliu.sjtu_gmail.com, leio.chen, baiming, calidion, heian911_gmail.com
Base URL: http://scheduleeditor.googlecode.com/svn/trunk/
Comments: 4