• Sunday: Travel Day

    Posted on by Don

    This is the first in a series of posts about our bicycling trip down the Icefield Parkway, through Jasper and Banff National Parks in Alberta, Canada. The full series can be found here.

    This day had a lot of moving parts…

    It started the night before. We finished packing our bikes (and everything else), and then met Julie at the rental place to get our ground transportation, a huge pickup truck we rented one way for the trip to JFK. (This got Ben off the hook — he’d come up to be our backup driver in case the truck rental feel through.) We all trooped up the block afterward, to John & Donna’s, where Doug & Lori were porch-visiting, to say our hellos and goodbyes.

    Loading Bikes

    We got up in the morning, ate our breakfast and loaded the bikes, then said our goodbyes to Ben. We were giving our friend’s daughter Emma a ride to the airport with us, so she was our next pick-up; the last stop before we hit the road for real was Julie’s house.

    Ready To Roll

    Next came the drive to JFK. I can’t say that this part of the trip was pleasant exactly, but I’ve experienced worse on the Verrazano and the Belt Parkway, and the truck was easier to drive than I expected. We were there, with the truck returned and our stuff unloaded in front of the departures terminal, in just under three hours.

    Checking in the bikes went pretty smoothly (not surprising — we might not have ever done this before, but it was old hat to the airline), ditto security and boarding. And then we sat on the runway for an hour and a half before we took off. Something something, NYC airspace closures and backups…

    That put us way behind schedule, and when we finally we arrived at our Warm Showers hosts (after baggage, customs, midnight bike assembly in the airport, getting our next rental, and travel through Calgary) it was after 2:00 AM. Thank goodness they were sweethearts, and gracious, and they’d waited up for us. We chatted with them for a bit, then crashed and slept like the dead.


  • Look Who’s Back!

    Posted on by Don

    I’m back from our Alberta vacation (and in fact have been for almost a week), and my laptop is back from its journey to California for repairs. More on both of these soon.


  • I Drive The Big Rigs!

    Well, it’s only a few more days until we’re off for Jasper and Banff. Bikes are disassembled and packed, clothes and camping gear are (mostly) packed, and we only have a few things left to take care of before we go.

    I’ve got the bike dialed in, and all the new things I need are now installed. Here’s a picture of me with my new “high visibility” panniers after I put the front rack on. Anne and I did a ride out to Wegmans, going the “long way” (via the Nor-Bath Trail) and I got my first real test ride with a loaded bike. Easy peasy! (Our actual loads on the trip will be quite a bit more than that, but I got the idea.)

    Milk Run

    One last major task I have to do is send my laptop back to System76 to get the hinge fixed. I want this done when I’m not around to miss the computer, and shipping it back is almost the last thing I’ll do before leaving.

    Blogging will be pretty sparse for a few weeks, but stay tuned…


  • Going Mobile

    I downloaded the route data for our upcoming trip from Adventure Cyclist as a GPX file, and I also got the Adventure Cycling route app and downloaded the trip there as well. The trip data consists of the route itself (as a path) and the locations (points) of recommended places for food, lodging, bike repairs, and so on; the data is the distillation of their collected wisdom and experience for any given ride. It’s been a goldmine of information for planning our trip, and knowing that it’s based on the knowledge and experience of other travelers makes me a bit more comfortable relying on it.

    The GPX is what I got first, and I plan to put the relevant parts of it on my Garmin for the trip, but I opened it in QGIS first because of course I did…

    There were six GPX files representing the bike routes as GPX tracks — the main route, a spur to Banff, and a gravel-bike alternate near Fernie, one file for each route in each direction — and one other file with all the services as GPX waypoints. The tracks didn’t contain much information, though the trackpoints themselves did have elevations; the meat of the data was in the service waypoints, and it was interesting to see what information Adventure Cyclist put in for each feature, and how they fit it within the confines of the GPX format.

    I don’t usually use GPX except for when I move things to and from my Garmin, so I don’t know too much about it but my impression is that it is highly structured, and, unless you use “extensions,” which not every application will honor or display, it’s a bit rigid in what it can hold — my data has almost always been square pegs, and GPX is all about round holes…

    What Adventure Cyclist did was to stuff a lot of the information into the “name” field using initials and abbreviations (“R, CS, M” for restaurant, convenience store and motel, for instance) along with the name, and put the telephone number (along with some travel directions; these were the only contact info given) into both the “comment” and the “description” fields, possibly because different GPS software would look at different fields.

    I took this data and massaged it for my own purposes. I also got the app and downloaded the route there. It had the same data, in a very readable and actually beautiful form; it also looked like they maybe used the same GPX data, maybe in another file format but the same structure, and massaged it on the fly. Very interesting…

    This got me thinking about my trail amenities map:

    • Do I have too much contact information, or not enough? (Answer: my contact information is just right.)
    • Am I presenting the information well, especially for use on a phone? (Answer: not really.)
    • How should I represent my amenities data, especially for places that have multiple amenities — hotel with restaurant, convenience store with bathroom? (Answer: this will require a whole lot of rework, but I think I should show multiple amenities as multiple symbols in a popup.)

    So I am now rethinking my own map based on what I liked about the Adventure Cycling map, but in the meantime I compromised and added some information-massage code of my own, to turn my phone information a clickable link: click on the number (on your phone) and your phone will make the call.

    It’s a start.


  • More Whirlwind

    Posted on by Don

    Morning weigh-in: 167.5#, 13% BF (so close!)

    The busy days are continuing: we hosted a Warm Showers guest overnight Tuesday, Anne left Wednesday for DC (museum-hopping with Lorraine and and her grandkids — she’ll be back home tomorrow), I’m running around “putting the chess pieces on the chess board” and planning for our big Canadian Rockies trip, and in between has been riding, and cello, and… well, everything else…

    I had my cello lesson yesterday, then went to the Canal Museum for the afternoon. Last night Julie G and I sat down with a bunch of maps and guides — we had the Lonely Planet book open in front of us, and the Adventure Cycling maps, but I also downloaded the electronic version of the map the other day (more about that some other time) — and we got the first few days of our bike ride planned out.

    This morning I got some yardwork and food shopping done, and then got in a short, sweet afternoon road ride — Williams Township and Hellertown but still pretty mellow. My front rack came today, and so did my bike bags. Installation will have to wait until tomorrow: I’m meeting John & Donna on Southside.


  • Out And About

    Posted on by Don

    It’s been a whirlwind of a Memorial Day Weekend…

    We went out Friday night, met Jennifer & Sean for some wings at The Keystone Pub, then we all went up the street to meet Yana and her boyfriend Evan at Big Woody’s. The food didn’t agree with me — don’t know what it might have been, I made poor food choices at both places — but we had a good time.

    On Saturday Anne and I got in a good ride: we went to Easton to help CAT with a booth at the big bike race celebration (in other news, Easton now has an annual “Twilight Criterium” on Memorial Day Weekend), but we got into town just before the rain started and we were trapped at the Easton Market for about two hours while it absolutely dumped outside. Oh well, coffee and bakery items, and people-watching, and then Mr. Lee’s Noodles for lunch… Scott and Jennifer C eventually joined us after the CAT booth closed up, and we all took advantage of clearing skies to bike back together. We got home just as the next downpour started.

    Later we went over to the Rose Garden for the Saturday Evening Concert. We saw Larry & Joyce, Mark & Sarah, and a whole bunch of other people including tons of little kids splashing in the puddles. We ended the night at our neighbor Josh’s fire-pit, along with with neighbors John, Matt, and Scott & Kellyn.

    Sunday was another ride for me, north on the towpath to explore the improvement work they’re doing. (Looks good, but I’m going to miss those wilder paths.)

    Now we’re getting ready to head over to Somerville to watch the big annual bike race with Joe & Laura and hopefully Ben.

    Enjoy a safe and happy Memorial Day! Remember those who gave their all.


  • Piranesi

    Posted on by Don

    I surprised myself and just ripped through this book, and have to say I really enjoyed it. I think it hit the sweet spot in terms of length, and balance between world-building and action/drama; even the narrator’s voice and the writing style were not too much of one thing or another, but just where they needed to be.


  • Quick And Dirty For The Win

    Posted on by Don

    Well, that KML problem didn’t get to marinate for long: I decided to just have a python script write the output as a generic text file. It’s a pretty dumb program, but it worked like a charm. I tested it by making maps of all my remaining unofficial rides, maybe half a dozen in all. The process took less than a minute per map, thus saving me about an hour of work, at the cost of only a month of coding… Hey but it was an interesting learning experience!

    It was also interesting to see the difference between the maps of official rides and the less-developed, unofficial ones — the new ones seem so sparse, with missing lunch spots and fewer access locations. It’s clear, from seeing them on these maps, that at least some of the new rides aren’t ready for prime time.

    Anyway, yesterday was a bike rest day for me, and I got a bunch of yardwork and other chores done. Today and tomorrow look like rain.


  • Time To Face The Music

    Posted on by Don

    I’m slowly getting back in the swing of cello things: I played duets with Donna on Tuesday, and yesterday was my first lesson in probably a month. I thought I played well, for both the lesson and the duets — I’d been practicing since we got home, so I didn’t expect to stay rusty — but I was pretty tired after each one.

    Meanwhile: We haven’t done quartets in a while, and my ensemble is on hiatus for the summer, and the music studio I go to is about to close (the owners are retiring).

    That is all.


  • Another Day’s Useless Energy Spent

    Posted on by Don

    I make online maps of Shawnee’s Road Scholar bike rides, to help the sag-wagon drivers find things like drop-off and pick-up locations, lunch spots, and other places where they’d meet up with the riders. (I did this after a driver searched for directions to the “D&L trailhead in White Haven,” but there were two trailheads in the town and he went to the wrong one. No biggie, the trailheads were less than a mile apart, but this kind of ambiguity looked like a problem that needed solving.) My first iteration was just a list of all locations in Google Maps’ “My Places,” but now I have a separate, full-blown map (again in Google Maps) for each ride, showing the route itself as well as marked points for the drop-off, pick-up, lunch, and all practical access locations, each with appropriate symbology.

    Here is an example for the Lehigh Towpath ride:

    (You can view the legend by clicking the button to the left of my name at the top of that map, or view the bigger map by clicking the square at top right.)

    I use Google Maps because that’s what the drivers use on their phones for navigation, and this makes it easy for them to navigate to any of my marked points without having to leave the Google Maps universe. To make the maps available, I generate QR codes for each map link; the driver can get the map and open it almost effortlessly with their phone’s barcode scanner. They don’t always use it — they weren’t as dazzled by my geeky brilliance as I was hoping — but hey I was impressed.

    The map data comes from a QGIS project I keep for all of the rides we do, or might do, as part of Shawnee’s Road Scholar bike program. My workflow is: select the route for the chosen ride and add it to a KML file, then select the relevant points of interest and append them as another layer in that file. (KML is “Keyhole Markup Language,” Google’s XML-based geographic data format.) I then import the KML file into Google Maps, and I’ve got my route and points on their own new map. A little bit of styling and I’m done — easy peasy! It takes about 5-10 minutes for each map. (The QR codes are generated separately using Jasper Reports.)

    And Here My Troubles Began

    I have these maps made for all the rides we’ve done, but I have a whole bunch of other rides, either unused or not fully developed, which don’t have their own maps yet, so there are more maps to do. Making each individual map is pretty easy, but I don’t always get the symbology (or the data associated with each feature) exactly the same each time, and I think that automating the task will help with consistency; also, if I start creating a lot more potential rides, the automated map-making could be a potential time saver.

    To automate my workflow, I decided to break it down into three basic tasks:

    1. extract the data I’d need from the database,
    2. use that data to generate a KML file, and
    3. import the KML file into Google Maps. (OK, this last step is still pretty manual…)

    This is the project I took with me to Colorado, working on it whenever we had an hour or two of downtime — something I can get away with when I vacation with a bunch of readers…

    The first step was pretty straightforward, though the SQL (especially for the points of interest) grew into a behemoth, with multiple CTE’s and a whole lot of joins to get things the way I wanted — setting it up just so took a bit of work, but like I said, the task was straightforward.

    The next task was more convoluted, and involved a learning curve — I decided to use Python to generate the KML, and this meant using several new packages: geopandas, which makes working with data a bit easier, and simplekml, which, well, does the KML part. Geopandas was pretty easy to use, but simplekml was quirky, maybe a bit too simple, and in the end I actually had to modify the source code to make it work right.

    But, in the end I got my KML file (technically, a KMZ file, which included the icons I’d need for styling), and I was able to import it to both Google Earth and Google Maps — the only problem was that Google Maps ignored all my styling! (It worked fine in Google Earth.)

    So, somewhere between steps 2 and 3 there was a glitch, a mismatch between what “styles ” meant for KML, and what Google Maps actually used. I spent a good part of the last few days looking at different versions of KML and KMZ files, seeing what worked, or didn’t work, with Google Maps, and I think I have an idea of what’s going on:

    Google Maps — or at least, the “My Maps” part of Google Maps — ignores most of the style information, like “use this icon and color,” and seems to code the style information, what they actually use, directly within the style ID’s: a style ID of “icon-1567-9C27B0-normal” would mean “use specific icon #1567, with color #9C27B0 for the normal (un-highlighted) icon.”

    So OK, first mystery solved, but what does that get me? I suppose I can use Google’s hard-coded style ID’s, but simplekml does not allow you to specify ID’s or change them, so it looks like that package isn’t as useful as it needs to be, and other Python KML packages seem… not simple.

    My next steps? My original plan was to code the entire task in SQL, and I may fall back on that, or I may do something using PHP. I might even take some text-based approach (like I did with geojson a few years ago), since KML is at bottom just a text file. But the truth is, I’m really just going to put this away for a while and let it marinate.