Coder Social home page Coder Social logo

Manage multi-gtfs about gtfsdb HOT 1 CLOSED

opentransittools avatar opentransittools commented on September 23, 2024
Manage multi-gtfs

from gtfsdb.

Comments (1)

fpurcell avatar fpurcell commented on September 23, 2024

Hey francot. Thanks for the interest in gtfsdb. I have a possible solution to what you're asking by way of database schema manipulation (see below). Because of the added complexity in adding an import_id primary key to pretty much to every table and every query, I don't feel this would be the correct solution for gtfsdb. So I'm going to close this issue. But I'm happy to discuss further...

The solution to your problem of maintaining a history of gtfs data may be solved with the use of a db that supports multiple schemas (e.g., postgres, oracle, etc...). You could load new gtfs data into differently named schemas based on import_id (or better ... use feed_info.txt/feed_version as that schema name). For example, I use multiple schemas to load GTFS data from multiple different agencies into the same database. From there, I can make queries of all the data in the different schemas via a where clause (not a great query below, but a decent example):

select *
from "C-TRAN".stops cs, "TRIMET".stops ts
where st_distance(cs.geom, ts.geom) < 0.001

from gtfsdb.

Related Issues (20)

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.