Skip to content

Store _con.csv order in the DB #87

Closed

Description

@jteresco

To support things like TravelMapping/Web#40 better we could add a field to each route with its position in the corresponding connected route. This wouldn't directly address "chopped up" routes like I-69, I-73, etc, as discussed in #55, and it would be nice to include a solution that would allow us to order those properly as well.

Activity

  1. jteresco commented on May 28, 2018

    @jteresco
    ContributorAuthor

    Looking at https://github.com/TravelMapping/HighwayData/blob/2edcc244bf6173635f9f7f064692d496aab758cc/hwy_data/_systems/usai_con.csv#L72 for example, we might be able to get the chopped routes handled correctly by not resetting the position counter unless the "route" field changes.

  2. michihdeu commented on May 28, 2018

    @michihdeu
    Contributor

    Not sure that I got you right...

    _con.csv:

    usai;I-74;;Iowa - Ohio;ia.i074,il.i074,in.i074,oh.i074
    usai;I-74;;Mount Airy, NC;nc.i074
    usai;I-74;;High Point, NC;nc.i074hig
    usai;I-74;;Pembroke, NC;nc.i074pem

    --> add new "order" column to csv:

    usai;IA;I-74;;;;ia.i074;;1
    usai;IL;I-74;;;;il.i074;;2
    usai;IN;I-74;;;;in.i074;;3
    usai;OH;I-74;;;;oh.i074;;4
    usai;NC;I-74;;;Mount Airy, NC;nc.i074;;1
    usai;NC;I-74;;Hig;High Point, NC;nc.i074hig;I-74Sea,I-74_E,I-74FutEll,I-74FutHig;1
    usai;NC;I-74;;Pem;Pembroke, NC;nc.i074pem;;1

    I think it would work but what's about compatibility?

    I think we could automatically convert all csv files (if there's no objection by anyone don't wanna has his files touched at all):
    Read _con.csv, take root column position and put this value to the new order column in the corresponding .csv file.

    I'd love to see #55 implemented

  3. jteresco commented on May 28, 2018

    @jteresco
    ContributorAuthor

    No, no changes would be needed to existing CSV files. The extra information can be gathered from existing files.

  4. jteresco commented on May 28, 2018

    @jteresco
    ContributorAuthor

    Of course this would assume that each _con.csv file has its routes in the proper order, but I expect most if not all already do.

  5. michihdeu commented on May 28, 2018

    @michihdeu
    Contributor

    Ok, got it!

  6. added a commit that references this issue on Jun 18, 2018
  7. jteresco commented on Jun 18, 2018

    @jteresco
    ContributorAuthor

    The systems, routes, and connectedRoutes tables now have the csvOrder column available. I'll see if I can sprinkle "order by" qualifiers on some SQL queries to improve ordering on the web front end. Any requests?

  8. ssoworld commented on Jun 18, 2018

    @ssoworld
  9. jteresco commented on Jun 24, 2018

    @jteresco
    ContributorAuthor

    The systems, routes, and connectedRoutes tables now have the csvOrder column available. I'll see if I can sprinkle "order by" qualifiers on some SQL queries to improve ordering on the web front end. Any requests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions