OpenTransitTools / gtfsdb_realtime

Real-time GTFS database loader and ORM library.
Other
11 stars 1 forks source link

update documentation - gtfsdb-rt-loader doesnt'exists #5

Open francot opened 2 years ago

francot commented 2 years ago

Edit documentation to make it clearer. For example this is my experience and I cannot use the application to test trimet data.

Install and use via the gtfsdb source tree:

  1. Install Python 2.7 ok
  2. Install easy_install ok
  3. Install buildout : easy_install zc.buildout ok
  4. git clone https://github.com/OpenTransitTools/gtfsdb_realtime.git ok
  5. cd gtfsdb_realtime ok
  6. run buildout ok(buildout install prod pg return Error: The referenced section, 'pg', was not defined. )

Run TriMet example:

  1. get a TriMet api key: http://developer.trimet.org/appid/registration/ ok
  2. bin/gtfsdb-rt-loader -a TRIMET -d postgresql+psycopg2://ott@127.0.0.1:5432/ott --api_key -c bin/gtfsdb-rt-loader doesn't exists I try to run bin/gtfsrt-load -a TRIMET -d postgresql+psycopg2://ott@127.0.0.1:5432/ott --api_key -c but the script doesn't create the table trimet.routes so i get error relation "trimet.routes" doesn't exist

@fpurcell

fpurcell commented 2 years ago

Thanks @francot ... looking into this.

BTW, do you have the postgres database installed on your machine (docs could be better here)

francot commented 2 years ago

Thank you @fpurcell Yes a Postgres database is installed on my machine. But as I already write the command buildout install prod pg doesn't work for me.

Also I think you have to specify that first to run: bin/gtfsrt-load -a TRIMET -d postgresql+psycopg2://ott@127.0.0.1:5432/ott --api_key -c (not bin/gtfsdb-rt-loader -a TRIMET -d postgresql+psycopg2://ott@127.0.0.1:5432/ott --api_key -c as you write in documentation) you have to import the static gtfs using gtfsdb. The correct sequence could be:

Run TriMet example:

  1. get a TriMet api key: http://developer.trimet.org/appid/registration/
  2. import TRIMET static gtfs running: bin/gtfsdb-load --database_url postgresql://postgres:postgres@localhost:5432/dbname --schema trimet --is_geospatial local filename
  3. create real time tables. What is the command to create only table (schema trimet is already created by gtfsdb during static gtfs import) ?
  4. import trimet real time data running bin/gtfsrt-load -a TRIMET -d postgresql+psycopg2://postgres:postgres@localhost:5432/dbname --api_key apikey (without c because table are already created in step 3)