Author Topic: using csv order for routes  (Read 8116 times)

0 Members and 2 Guests are viewing this topic.

Offline Highway63

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 528
  • Gender: Female
  • Last Login:February 16, 2024, 01:40:37 am
Re: using csv order for routes
« Reply #15 on: June 28, 2018, 01:50:05 am »
Interstates and US routes are appearing in random order in Map View.

My WI USH order: 141, 8, 53, 151, 10, 141N, 14, 18, 45, 2, 51, 63, 12, 41, 61, 2W, then the auxiliary routes in order. That's not by number, total miles, or clinched miles. State highways are all in order.

Offline mapcat

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1627
  • Last Login:Yesterday at 11:32:22 pm
Re: using csv order for routes
« Reply #16 on: June 28, 2018, 08:54:08 am »
Interstates and US routes are appearing in random order in Map View.

My WI USH order: 141, 8, 53, 151, 10, 141N, 14, 18, 45, 2, 51, 63, 12, 41, 61, 2W, then the auxiliary routes in order. That's not by number, total miles, or clinched miles. State highways are all in order.
Confirmed.  And it seems to be limited to US routes and Interstates; other tier 1 and 2 systems (such as usaib and canqca) look fine.
Clinched:

Offline Bickendan

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 543
  • Last Login:March 14, 2024, 08:16:12 pm
Re: using csv order for routes
« Reply #17 on: June 29, 2018, 05:04:44 am »
Is there a hierarchy for the aux US routes?
Byp 14 Brookings, SD is listed before Trk 14 Pierre. If intentional, great; if not, Trk 14 should be first as it's further west.

Offline Bickendan

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 543
  • Last Login:March 14, 2024, 08:16:12 pm
Re: using csv order for routes
« Reply #18 on: June 29, 2018, 05:43:23 am »
Split interstates (76, 84 notably) are listed in non-sequential order.
76: CO, OH, NE, PA, NJ
84: OR, PA, ID, NY, UT, CT, MA

86 and 88 avoid this by only having one state in their western portions.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2727
  • Last Login:Yesterday at 10:00:41 pm
Re: using csv order for routes
« Reply #19 on: June 29, 2018, 10:15:11 am »
I did some experimenting with more complicated SQL queries and came up with one that seems to order things just as we'd want.  The downside is that it's slow.  There will be a delay of a few seconds on smaller areas, maybe a minute on large (like loading all of the USA data).

Try it by using the tmtest.teresco.org server.  So far, I've only modified mapview but will look into a couple other spots for similar orderings.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2727
  • Last Login:Yesterday at 10:00:41 pm
Re: using csv order for routes
« Reply #20 on: June 29, 2018, 10:26:05 am »
region.php on the tmtest server is also now using the more expensive but hopefully preferred ordering.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2727
  • Last Login:Yesterday at 10:00:41 pm
Re: using csv order for routes
« Reply #21 on: July 05, 2018, 09:18:57 am »
Unless I hear objections soon, I'll put the new ordering code into place.  It will slow down loading somewhat on larger sets.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2727
  • Last Login:Yesterday at 10:00:41 pm
Re: using csv order for routes
« Reply #22 on: July 06, 2018, 09:59:43 pm »
mapview and region.php on the production server are now using the new and improved but somewhat slower implementation that improves order of routes listed by using csv file ordering.