Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Forgot sql file in last commit, added license info

  • Loading branch information...
commit 3d39978ff4ef08e9b43b6771c391a5c877ed1593 1 parent af610e0
javacolin authored
Showing with 37 additions and 6 deletions.
  1. +19 −0 LICENSE
  2. +16 −5 README
  3. +2 −1  gtfs_tables.sql
View
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Colin Bick, Robert Damphousse
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
21 README
@@ -10,8 +10,12 @@ List of Public GTFS feeds:
http://code.google.com/p/googletransitdatafeed/wiki/PublicFeeds
+== License ==
+Released under the MIT (X11) license. See LICENSE in this directory.
+
+
== How To ==
-This is how to import GTFS data into a PostgreSQL database:
+This is how to import GTFS data into SQL:
1. Initial import
@@ -22,16 +26,21 @@ cat gtfs_tables.sql \
vacuumer.sql \
| psql mydbname
-Most GTFS data has errors in it, so you will likely encounter an error when running the step above. After fixing the error by manually correcting the GTFS files, you can simply repeat the command (which will likely break again, and so on).
+Most GTFS data has errors in it, so you will likely encounter an error when
+running the step above. After fixing the error by manually correcting the GTFS
+files, you can simply repeat the command (which will likely break again, and
+so on).
*** If you don't have PostgreSQL, then the python line should be as follows:
<(python import_gtfs_to_sql.py path/to/gtfs/data/directory nocopy)
This will use "INSERT" statements instead of "COPY" statements.
-Also, I believe the vacuumer.sql file is also postgres specific, so omit it if it gives errors.
+Also, I believe the vacuumer.sql file is also postgres specific, so omit it if
+it gives errors.
2. Modification within SQL db
-If you are editing data within the SQL database, it is usually much faster to drop all the indexes first and then reapply them afterwards:
+If you are editing data within the SQL database, it is usually much faster to
+drop all the indexes first and then reapply them afterwards:
psql -f gtfs_tables_dropindexes.sql
# do your stuff
@@ -41,7 +50,9 @@ psql -f gtfs_tables_makeindexes.sql
== Test/Demonstration ==
-The (CORRECTED -- yes even google's example data has errors) demo feed from the GTFS website is included in this distribution. You should play around with that first to see how everything gets put into tables.
+The (CORRECTED -- yes even google's example data has errors) demo feed from the
+GTFS website is included in this distribution. You should play around with that
+first to get everything to work and to see how the data gets put into tables.
From this directory (assuming postgres):
View
3  gtfs_tables.sql
@@ -21,7 +21,8 @@ drop table gtfs_payment_methods cascade;
drop table gtfs_location_types cascade;
drop table gtfs_transfer_types cascade;
-
+drop table service_combo_ids cascade;
+drop table service_combinations cascade;
begin;
Please sign in to comment.
Something went wrong with that request. Please try again.