News:

Thanks to everyone for the feedback on what errors you encountered from the forum database changes made in Fall 2023. Let us know if you discover anymore.

Main Menu

Status of Travel Mapping

Started by Purgatory On Wheels, June 01, 2015, 10:49:44 AM

Previous topic - Next topic

Jim

#50
Quote from: Jim on June 18, 2015, 10:13:38 PM
Quote from: yakra on June 18, 2015, 09:26:26 PM
Render unclinched first, layer 3 -> layer 1. Then render clinched segments, layer 3 -> layer 1.

Makes sense.  I think I can make that happen next time I get back into the mapping code.  I think the same ordering will be used for the static maps.

Should be doing this now.  It was a lot easier than I thought, accomplished using the zIndex option on Polylines.

Edit: note that if you have trouble getting maps to display your results, there's a good chance you have JS errors in your browser console because an old version of the JS code is cached.  A shift-reload worked for me in Firefox.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)


yakra

For those reading the thread wondering what I mean by "layer", it's a concept Tim outlined back in 2010:
Layer 1: Freeway/motorway/expressway systems
Layer 2: Continental systems
Layer 3: State/prov. systems (big countries) and national systems (small countries)

Me, I further break Layer 1 down into:
Layer 1A: Freeway/motorway/ systems (displayed in blue on the static maps)
Layer 1B: Expressway systems (displayed in teal / light green on the static maps)

As an aside, The Layer 2 systems have 3 different color schemes:
* Red for USAUS, CANTCH, and EURE
* Purple for USAUSB
* Dark Green for USAIB
"Officer, I'm always careful to drive the speed limit no matter where I am and that's what I was doin'." Said "No, you weren't," she said, "Yes, I was." He said, "Madam, I just clocked you at 22 MPH," and she said "That's the speed limit," he said "No ma'am, that's the route numbah!"  - Gary Crocker

Jim

Minor improvements to the clinched segment overlay mapping:

1) overall clinched stats now report, will be adding breakdowns by system, highway, etc, as time permits.

2) line thickness changes with zoom level, so the zoomed-out maps aren't just a blur of fat lines overlapping each other.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

rickmastfan67

So, I thought I would bring this up early in the process, but how are we going to deal with routes that have 'special' shields compared to what the other 'normal' shields are in the state/province/country?

Like the special 'toll' shields in Florida.  Are we just going to use the same shield for all, or will we code exceptions to the rule (like the QEW and 407 in Ontario)?

oscar

Jim:

Is there a way for those of us who haven't yet signed up with GitHub to view our statistics and regional maps (as they now stand)?

I'm between road trips, and will sign up and get familiar with GitHub once my life calms down a little. But a central place for me to view my data would help me comment on the progress made to date.
my Hot Springs and Highways pages, with links to my roads sites:
http://www.alaskaroads.com/home.html

mapcat

#55
Looks great, Jim!  Thanks!

Is there any way to see a larger region (such as the USA) on a single map?

Also, would you be willing to make the "show markers" stay off if a user unchecks the box?

Edit: the stats are significantly different from CHM.  Total mileage for Ohio, for example, comes to 21,000 miles, whereas it was 19,000 miles on CHM.  Looking at a few other states, I'm seeing the same (Travel Mapping stats are always higher).  Are concurrencies being double-counted now?

SSOWorld

I'm sure he's starting small and working his way out.
Scott O.

Not all who wander are lost...
Ah, the open skies, wind at my back, warm sun on my... wait, where the hell am I?!
As a matter of fact, I do own the road.
Raise your what?

Wisconsin - out-multiplexing your state since 1918.

english si

Quote from: rickmastfan67 on June 21, 2015, 12:24:32 PM
So, I thought I would bring this up early in the process, but how are we going to deal with routes that have 'special' shields compared to what the other 'normal' shields are in the state/province/country?

Like the special 'toll' shields in Florida.  Are we just going to use the same shield for all, or will we code exceptions to the rule (like the QEW and 407 in Ontario)?
A big issue in the British Isles, where all A roads are given primary 'shields' despite most being non-primary (black on white, rather than yellow on green). There's also stuff like the named freeway systems where there's a variety of different ones.
Quote from: mapcat on June 21, 2015, 01:02:50 PMEdit: the stats are significantly different from CHM.  Total mileage for Ohio, for example, comes to 21,000 miles, whereas it was 19,000 miles on CHM.  Looking at a few other states, I'm seeing the same (Travel Mapping stats are always higher).  Are concurrencies being double-counted now?
Now they are, but they won't be. That hasn't been sorted yet if you read above.
Quote from: oscar on June 21, 2015, 12:25:36 PMIs there a way for those of us who haven't yet signed up with GitHub to view our statistics and regional maps (as they now stand)?
http://www.teresco.org/~terescoj/travelmapping/hbtest/?rg=AK&u=oscar_voss <-just change the region code to the one you want.

Jim

Quote from: oscar on June 21, 2015, 12:25:36 PM
Jim:

Is there a way for those of us who haven't yet signed up with GitHub to view our statistics and regional maps (as they now stand)?

I'm between road trips, and will sign up and get familiar with GitHub once my life calms down a little. But a central place for me to view my data would help me comment on the progress made to date.

For now, you (or anyone) can send me your .list updates and they'll become part of the system.  No list files in GitHub yet, and I am sure we would not require the average end user to be interacting with GitHub to update.  I envision an upload form and project maintainers would take those updates and put them into some official place.  But that's a ways off.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

Jim

Quote from: mapcat on June 21, 2015, 01:02:50 PM
Is there any way to see a larger region (such as the USA) on a single map?

Not yet.

QuoteAlso, would you be willing to make the "show markers" stay off if a user unchecks the box?

As of now, there's no persistent state (DB modifications, cookies, etc), but I think the better short term solution is to make the default that the markers are not shown, as I expect most people find that view more useful.

Quote
Edit: the stats are significantly different from CHM.  Total mileage for Ohio, for example, comes to 21,000 miles, whereas it was 19,000 miles on CHM.  Looking at a few other states, I'm seeing the same (Travel Mapping stats are always higher).  Are concurrencies being double-counted now?

No effort was made yet to avoid double-counting.  Those stats are just the total of the segments clinched and the total segments.  I haven't decided how much of the stats should be generated at site update time and stored in the DB and what should be computed on the fly when maps (and some day, other pages with stats) are viewed.  I'm leaning toward the former, as all concurrencies are represented conveniently in the data structures at that time, and it's a whole lot easier to code things up in Python from existing data structures than it is in JavaScript, obtaining information from DB queries.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

oscar

Quote from: Jim on June 21, 2015, 02:39:06 PM
Quote from: oscar on June 21, 2015, 12:25:36 PM
Jim:

Is there a way for those of us who haven't yet signed up with GitHub to view our statistics and regional maps (as they now stand)?

I'm between road trips, and will sign up and get familiar with GitHub once my life calms down a little. But a central place for me to view my data would help me comment on the progress made to date.

For now, you (or anyone) can send me your .list updates and they'll become part of the system.  No list files in GitHub yet, and I am sure we would not require the average end user to be interacting with GitHub to update.  I envision an upload form and project maintainers would take those updates and put them into some official place.  But that's a ways off.

I wasn't asking about updating list files (which is by e-mail for now), but rather about viewing the resulting statistics and regional maps.
my Hot Springs and Highways pages, with links to my roads sites:
http://www.alaskaroads.com/home.html

english si

Quote from: oscar on June 21, 2015, 03:33:00 PMI wasn't asking about updating list files (which is by e-mail for now), but rather about viewing the resulting statistics and regional maps.
Quote from: english si on June 21, 2015, 02:36:34 PM
Quote from: oscar on June 21, 2015, 12:25:36 PMIs there a way for those of us who haven't yet signed up with GitHub to view our statistics and regional maps (as they now stand)?
http://www.teresco.org/~terescoj/travelmapping/hbtest/?rg=AK&u=oscar_voss <-just change the region code to the one you want.

oscar

Quote from: english si on June 21, 2015, 03:41:59 PM
Quote from: oscar on June 21, 2015, 03:33:00 PMI wasn't asking about updating list files (which is by e-mail for now), but rather about viewing the resulting statistics and regional maps.
Quote from: english si on June 21, 2015, 02:36:34 PM
Quote from: oscar on June 21, 2015, 12:25:36 PMIs there a way for those of us who haven't yet signed up with GitHub to view our statistics and regional maps (as they now stand)?
http://www.teresco.org/~terescoj/travelmapping/hbtest/?rg=AK&u=oscar_voss <-just change the region code to the one you want.

Thanks -- that takes care of the regional maps. Still leaves open the statistics Jim recently added.
my Hot Springs and Highways pages, with links to my roads sites:
http://www.alaskaroads.com/home.html

Jim

Quote from: oscar on June 21, 2015, 03:46:50 PM
Thanks -- that takes care of the regional maps. Still leaves open the statistics Jim recently added.

The very limited stats so far are just displayed across the top of the regional map.

Any really meaningful stats are not yet computed, stored, or displayed.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

english si

Quote from: oscar on June 21, 2015, 03:46:50 PMThanks -- that takes care of the regional maps. Still leaves open the statistics Jim recently added.
It's at the top. It's very limited. eg, "4807.82 of 15359.05 miles (31.3%) clinched by oscar_voss." is what you have of IL.

And Jim beats me just to it...

sammi

Quote from: Jim on June 21, 2015, 02:39:06 PM
For now, you (or anyone) can send me your .list updates and they'll become part of the system.  No list files in GitHub yet, and I am sure we would not require the average end user to be interacting with GitHub to update.  I envision an upload form and project maintainers would take those updates and put them into some official place.  But that's a ways off.

What I'm thinking of doing here is having three types of data sources. You can upload a .list file (directly to the website and not through email), OR you can have your .list file stored on the server and edit it through some web interface, OR you can provide a link to a GitHub repo so whenever it does an update it checks out the latest version.

oscar

Quote from: sammi on June 21, 2015, 05:04:14 PM
Quote from: Jim on June 21, 2015, 02:39:06 PM
For now, you (or anyone) can send me your .list updates and they'll become part of the system.  No list files in GitHub yet, and I am sure we would not require the average end user to be interacting with GitHub to update.  I envision an upload form and project maintainers would take those updates and put them into some official place.  But that's a ways off.

What I'm thinking of doing here is having three types of data sources. You can upload a .list file (directly to the website and not through email), OR you can have your .list file stored on the server and edit it through some web interface, OR you can provide a link to a GitHub repo so whenever it does an update it checks out the latest version.

ISTM that the first and third options would require some form of virus/malware checking. I don't know if that can be done without human intervention. Submitting by e-mail might make the checking easier.

Ultimately, if and when we develop a web interface, that might become the primary (and my preferred) method of doing updates, with basic password protection to prevent kids from screwing around with our data, but no need for virus/malware checking. List files would then be used mainly for (a) initial data entry by users transitioning from CHM, and (b) assembling and spitting out modified list files reflecting changes made through the web interface, as a backup in case of a Travel Mapping system meltdown, or for users to consult offline to plan their travels (something I do quite a bit with my CHM list file, at times and places where I can't go online).
my Hot Springs and Highways pages, with links to my roads sites:
http://www.alaskaroads.com/home.html

vdeane

I don't see an issue with uploading .list files; anti-virus software could easily be installed on the server, we could make sure that ONLY .list files can be uploaded, make sure that uploaded files don't have execute permissions, etc.  They'll only be used by the .list processing program, so making sure that program has good error handling capabilities (which is what most malware exploits) is the best protection, no matter what method of submission is used.
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.

Jim

I have no concern (maybe I should?) about viruses with .list file uploads, but more with denial of service attacks or something as simple as people overwriting each others' files.  It was my understanding that the main reason CHM didn't allow uploads was because it allowed the site not to need any user accounts.  Anyone can look at anyone's maps and stats, and with a human processing the .list updates from an email and putting them in place, anything that came from the wrong place would just be ignored.

I think sammi's ideas sound good, though I'd have the same concerns Tim had from the original project about maintaining user accounts.  I hadn't considered the possibility of having files from individuals' private GitHub repositories could be fetched automatically as part of a site update.

Fortunately, that can be treated as a separate issue.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

Jim

I've separated out the "highway browser" functionality from the regional map viewer, reorganized some code, made better use of the screen real estate, and added multi-region support.

For example:

http://www.teresco.org/~terescoj/travelmapping/hbtest/mapview.php?rg=MA,NH,VT,ME,CT,RI&u=terescoj

will show all of my travels in the six regions of New England.  Note in particular the new "mapview.php" part of the URL.

You can list as many regions as you wish, comma separated, in the rg= query string parameter.  If you leave it out completely, it will attempt to show your global travels.  I think it works, but the browsers I've tried weren't happy with a JS program that attempts to add several hundred thousand Polylines to a Google Map.  You're welcome to try, but don't say I didn't warn you when your browser crashes.

The code reorganization should allow me to add support soon for things like showing an individual system (like usai, for example), optionally restricted to a subset of regions.  Maybe tomorrow night, but it's looking like a busy week coming up.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

mapcat

Quote from: Jim on June 21, 2015, 11:33:15 PM
I think it works, but the browsers I've tried weren't happy with a JS program that attempts to add several hundred thousand Polylines to a Google Map.  You're welcome to try, but don't say I didn't warn you when your browser crashes.
After several fails in Chrome, I got it to work on Firefox.  Loading took several minutes and several clicks on "continue", and zooming in/out on the complete map still takes a while.  But the result is awesome!

yakra

Quote from: Jim on June 21, 2015, 02:39:06 PM
For now, you (or anyone) can send me your .list updates and they'll become part of the system.  No list files in GitHub yet, and I am sure we would not require the average end user to be interacting with GitHub to update.  I envision an upload form and project maintainers would take those updates and put them into some official place.  But that's a ways off.
I don't think there's an official thread for this (saw a bunch of these posts in another one), but please include my file!

Quote from: mapcat on June 22, 2015, 12:07:02 AM
Quote from: Jim on June 21, 2015, 11:33:15 PM
I think it works, but the browsers I've tried weren't happy with a JS program that attempts to add several hundred thousand Polylines to a Google Map.  You're welcome to try, but don't say I didn't warn you when your browser crashes.
After several fails in Chrome, I got it to work on Firefox.  Loading took several minutes and several clicks on "continue", and zooming in/out on the complete map still takes a while.  But the result is awesome!
My browser won't crash! This is Linux! :bigass:
I only have 3 GB of RAM though. I'd try it, but after closing all other programs and prolly a reboot for good measure.

mapcat: Kudos, good sir!
"Officer, I'm always careful to drive the speed limit no matter where I am and that's what I was doin'." Said "No, you weren't," she said, "Yes, I was." He said, "Madam, I just clocked you at 22 MPH," and she said "That's the speed limit," he said "No ma'am, that's the route numbah!"  - Gary Crocker

Bickendan

When loading in states/provinces to the RG= argument one at a time, is the request being refreshed each time the URL is entered, eg, I load up Oregon, then I add Washington, then California, and so on?

I wonder if using that approach would keep browsers from choking when users want to display continental or world wide travels, by only polling each new region instead of reloading what has already been added to the map because those states/provinces were already in cache. I doubt I'm articulating this as well as I should be.

Jim

Quote from: Bickendan on June 22, 2015, 11:36:06 AM
When loading in states/provinces to the RG= argument one at a time, is the request being refreshed each time the URL is entered, eg, I load up Oregon, then I add Washington, then California, and so on?

I wonder if using that approach would keep browsers from choking when users want to display continental or world wide travels, by only polling each new region instead of reloading what has already been added to the map because those states/provinces were already in cache. I doubt I'm articulating this as well as I should be.

There's no persistent state, and the way I've coded things so far, there's not a good way to augment what's displayed without recreating everything anyway.  Whether it's good or not, I make no claims, but I rely on the order in which information comes out of the DB, and things would be intermingled differently each time a different subset of regions is loaded.

All that said, the bottleneck is not in querying the DB or generating the JS code, it's in getting all that data onto the map.  So maybe it's worth (some day by someone) coding things up so markers and waypoints are added/deleted from the maps as things change.  Not a priority for me right now, though.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)

Jim

You can now add a sys= query string parameter to the mapview.php page and restrict by system instead of region.  This one will show my travels on the US Interstate system, including future and bannered (business loop/spur) routes:

http://www.teresco.org/~terescoj/travelmapping/hbtest/mapview.php?sys=usai,usaif,usaib&u=terescoj

rg= continues to function as before, but it doesn't yet work to specify both rg= and sys= together, so just provide one or the other for now.

Also, anyone who sent me a .list should now be able to see their maps.

Note that the stat summary at the top still does not account for concurrencies properly, so don't use the numbers there on your tax returns or anything.
Photos I post are my own unless otherwise noted.
Signs: https://www.teresco.org/pics/signs/
Travel Mapping: https://travelmapping.net/user/?u=terescoj
Counties: http://www.mob-rule.com/user/terescoj
Twitter @JimTeresco (roads, travel, skiing, weather, sports)



Opinions expressed here on belong solely to the poster and do not represent or reflect the opinions or beliefs of AARoads, its creators and/or associates.