• Getting The Band Back Together

    Well, I did it — I started taking cello lessons again. I was flirting with this for a while, but only made the decision last week, and I called my old teacher over the weekend. She’s is no longer taking students, but she did have an alternate for me, a woman named Marge who teaches at Twin Rivers Music in Easton. (As a former NJ resident, and former Easton resident, I’m going to cringe every time I hear that name.) Today was my first lesson.

    Despite its unfortunate name, Two – er, Twin Rivers is pretty legit: music and instruments on the sales floor, studios in the back; it was busy, and bigger than I expected, and my new teacher seems really pleasant. We talked a bit about my goals, my reason for wanting to play cello — basically so I can play for fun, with Anne and others — and she explained her teaching approach and how it would address those goals. In terms of playing? I’m not exactly starting over, but the situation is pretty close to that: I picked things up today about halfway through my original first lesson book.

  • Brew Day, Soap Day

    Happy Birthday, Joni Mitchell! Seventy five years old today. WXPN has been playing her albums in full, along with singles and a bunch of covers.

    Meantime, today is brew day. We’re making a Roggenbier, a style of German rye beer that became extinct with the coming of the beer purity laws at the end of the Middle Ages, and has only been resurrected withinin the last few decades; we’re also kegging that Pale Ale we made a few weeks ago. There has been much heating and cooling of liquids, and much cleaning of pots, kegs, glassware and other items and, in the middle of all this, we also made laundry soap — we ran out yesterday.


  • New Project: Down the Rabbit Hole and Still Digging

    I started looking into my new project the other day. The first steps will have to be extracting information from GPX or FIT files, and adding the information to a PostGIS database. I managed to do this in several ways, mostly through a combination of GPSBabel and ogr2ogr, though no single way has done exactly what I want yet: ogr2ogr automatically adds GPX data to the tables in a manner similar to what I want, but extension data (heart rate, temperature) is not treated the way I want, while the FIT data needs to be extracted first into a format readable by ogr2ogr, and then put in the right table form after being put in the database, all of which turned out to be surprisingly easy. (Even so, I may just choose to go with adding the data from GPX for now.)

    The biggest problem I’ve run into so far is that GPSBabel does not extract all the data from the FIT file, and FIT is a proprietary, binary file format — I can’t get lap information, for example, just by scanning the file with awk or something. I may have to download and use the (again, proprietary) FIT SDK, in a C or other program I write myself. This may fit in well with what else I have to do, since I can call the parts of ogr2ogr I specifically need, directly from C.

    Before it gets to that point though, I have to decide what I especially want to do with this data, which will tell me what I need to extract, what I need to save, and what I can disregard, or discard after processing. Do I want to build a full-blown replacement for Garmin Connect, where I keep all relevant data? Or do I want to just build something, like a web badge, to show a minimum of data about the ride, data like distance, duration and a map of the ride, with maybe a link to the ride’s Garmin activity page? I am leaning towards the minimalist approach (which would entail just saving one record per activity, with fields containing aggregate data), but I think I want at least some of the individual track point data because I may want to graph things like elevation or heart rate.

    But maybe I don’t need to keep trackpoint data to build my graphs on the fly. Maybe I can make small graphs as PNG’s or GIF’s for the badge, and store those images in the database — hopefully they would be smaller than the trackpoints themselves. Alternately, I could store the entire FIT file (which is actually pretty small) in the database, and extract whatever I need on the fly. (I would still do a one-time analysis to get and store my aggregate data, since this might be a little too slow for on-the-fly data generation.) These choices will depend on the results of all the little coding/database/GIS experiments I’m doing now, extracting, converting and aggregating sample data.

    Ten Years Gone: This is what I wrote on this date in 2008. We voted today, and I remain hopeful, but it is certainly not as happy a day as that one was, and even with good news I don’t think we’ll match that day.


  • Back From The Dead

    Yesterday was a completely wasted day — I was tired and headachey from the time I got up until around 9:00. I couldn’t tell if it was a sinus headache, or maybe tension, or dehydration. It felt for all the world like a hangover, but even though we went out Tuesday night I had only one beer; if one beer can knock me out of the game like that, it’s time for me to to hang up my drinking shoes.

    I suspect it was the aftermath of the ride we did Tuesday. Anne and I did a solid 65 miles, through four counties and over two gaps: we rode over Blue Mountain at Little Gap and came home by way of Wind Gap, with a lunch stop at the diner there. Not the most difficult of rides, but my nose was seriously draining and I have not done any rides like that in a while, and maybe that was what beat me down. (Anne of course was fine, the weeks I took off from riding were the weeks she spent riding, over New England mountains on a loaded tour bike.)

    I would show you the ride’s GPS and stats, but well, you know how that has been working out with Garmin, and that gave me the germ of an idea for my next map project: something that can extract and display my ride data in a frame on my blog. I started looking into it yesterday, and promptly fell down the GPX/FIT rabbit hole. I learned a lot though — mostly that this might be more of a PIA than I figured. Oh well, everybody needs a hobby…

    Meantime, Halloween. We had Trick or Treat on Friday, and we had a few friends over to help (they got adult-liquid treats), and then on Sunday the parade came by on Broad Street. Yesterday was pretty subdued, though the library did a cover-to-cover reading of Mary Shelley’s Frankenstein, in honor of the 200th anniversary of its publishing. Anne was there for a big part of the afternoon, and I went for a bit too, listening through several readers before heading back home. I forgot how sad the story really is.

    Here are some pictures from the parade:

  • It Is Done

    My second GIS routing project is now finished; I just added the final touches to the front end a few minutes ago. It can be improved in several ways — the routing engine could be quite a bit faster, for one thing — and the data it runs on, from OpenStreetMap and other sources, should be updated periodically, but This Project version 1.0 is basically done. (I suppose I should add a write-up here before I put the thing to rest, but you know what I mean: the program/website itself is complete and fully functional.)

    That means I need a new map project. The routing experiment was meant to have three projects, or rather one project done three ways: one each using QGIS, pgRouting, and GRASS, before I decided to branch out into separate projects. I’ve now got the first two completed, but I have no idea what to do for the GRASS project — I guess it will just have to wait until inspiration strikes. In the meantime, I may go back to the first project, or at least glean some of the results from it, to help build a web page for the Lehigh Towpath, something I can add to my old bike page. This may also morph into some trail promotion project in real life.

    Yesterday was pretty nice, if cool, and Trick or Treat was really fun. Today is chilly, rainy, and windy, and I spent the day inside with no regrets. We’re going to see a concert, featuring Anne’s violin teacher, tonight in Palmerton.

  • Towpath Life

    I have a bell on each of my offroad bikes, but I normally don’t use them — I prefer verbal communication when I overtake someone, since it’s more effective and (in my opinion) way more polite. Yesterday, on the way back from the Museum, I came across a little old lady walking her German shepherd, and called out my usual “hi, passing on your left!” She moved over to the left (oops!), but by that time I’d stopped, and we were doing that neighborly, chuckling “yes, hello, passing you on the towpath” sort of greetings and negotiation, when her dog just absolutely went bonkers — barking, snarling, leaping at me at the end of its leash. It looked for all the world like an attack dog in some kind of video.

    It dragged the woman over as it came at me, completely out of her control — luckily it was not as hardcore as it wanted me to believe, because when it attacked it went for my ankle. Luckily again, I was wearing street clothes, including hiking boots, and the dog couldn’t really get a purchase on them. (I’m guessing it happened too fast for me to react, since I felt strangely calm throughout the entire situation.) All the while the woman was yanking at the dog, and when she finally got it under control I got a little snarky and said “good thing your dog was on a leash.”

    I don’t think she got it, because her reply was “well, it is the law.” I just rode off…

    Her parting shot, once I was down the trail? “If you had a bell you could have warned me!” I was tempted, but I didn’t ring my bell.

  • Race Day

    Well, we’re back from the half marathon in Hersey, and now back also from our nap…

    The race started at 7:30 AM, so we had to be there at say 6:30, so had to leave the house at 5:00, meaning we all had to get up by 4:30. We were all in bed by 9:00 last night, but it was still a hard morning. We got there about 6:45 — crazy parking traffic — and that was almost like “just in the nick of time” considering the bathroom lines, but Bruce & Heather lined up with no problems and the race went off without a hitch, then just as the race started we met up with Lorraine.

    We walked around to several different vantages together, managed to see all our runners (Heather & Bruce, and Adelle & Liz who did it as a relay), and I even got a few photos. The whole thing was over by about 10:00. After navigating back through the parking traffic mess, we all met up for brunch at a place in Hersey. Good to get some food and to catch up with everyone, but it had been a cold, windy day and the place was chilly inside; we were glad to get back in the car and crank the heat. We were home by 2:00.

    New Tools Bring New Opportunities

    One area on my routing map has been a bit problematic: Rt 329 out of Northampton goes past a reservoir, or old quarry or something, and the DEM elevation data dips pretty hard right next to the road, as well as under it at a bridge. Since I find total ascent and descent for each road using interpolated DEM data at points along them, the roads that go over, or even just near, big elevation changes can have large ascent/descent values even of they are relatively flat.

    The bridges have had an easy enough fix for a while: I simply make the ascent and descent (and adjusted ascent/descent) zero for each bridge, and I do the same for very short roads connecting to the bridge, like abutments. In other words, I fudge the data… (I figure the bridges are all fairly flat anyway except some longer, river-crossing ones, and since those are pretty far apart their actual ascent/descent values won’t affect the routing calculations much.)

    Fixing these roads near the quarry was a bit harder. I didn’t want to set ascent/descent values down to zero for the whole long and moderately hilly road, but now that I can update the ascent/descent data much more quickly — this was that “the task went from several hours to under a minute” process improvement from the other day — I was able to do my fudging on the elevation-at-road-points data: I made the elevations in the “dipped” spots the same as the points just outside, then re-updated my database with the new script. It worked great, the roads now route more realistically in that area, and it took about 5 minutes to do.

  • Brew Day

    The Hershey Half Marathon is tomorrow. Neither of us is doing it, but a number of Anne’s nieces and nephews are, and Heather & Bruce are coming to visit today so they can be closer to Hershey for tomorrow morning’s drive. It’s still pretty far, they could have found somewhere closer I’m sure, but we’re also brewing today (we’re doing our Bell’s Two-Hearted Ale clone) and they want to learn the process. They should be here in about an hour, and the brew stuff is all set up in the backyard. Of course Anne is cooking up a storm.

  • Milestone

    So I’ve been messing with that Lehigh Valley bike commuter routing program again, and I have made some important strides:

    • I found a way to update the recommend routes easy/advanced, etc, by maintaining separate tables of these routes as linestrings (which I can add and subtract, draw and redraw), then updating the relevant field in the main table using a spatial join. The update process is now automated simply by running SQL files, one for each type of route.
    • I sat down with the workflow for updating the main map table, and managed to automate much of it — everything but the SAGA tasks, though I think I can automate them too, eventually. I also managed to streamline one of the more time-consuming tasks: Generating the ascent/descent tables used to take upwards of 12 hours when I first did it (using Python within QGIS), and my next iteration (using PostGIS) took about 20 minutes, but my latest method got it down to about 57 seconds. Fifty-seven seconds! All of these are now also stored as SQL files or functions, so they are available almost at the push of a button. (My goal is a shell script putting all of this together.)

    These were both pretty big deals, since they were the only things keeping the project from being truly functional. Before this, keeping the database up-to-date was like pulling teeth. Unfortunately, I decided to add some front-end functionality, testing to see if selected points are within the Lehigh Valley, and that’s been a bit of a struggle, but if I can find a host for the project I think I can go live really soon.


  • Donnie Getchyer Annie

    So the Big Stick Cleanup got started yesterday, but did not get finished: I got a call from Anne just before 2:00; she said she was somewhere in Connecticut riding alone, she was cold and wet, it was raining, and was done. I packed up what I was doing, got home and ready to go, and was on the road by 2:05 after getting her exact location by email. It was about four hours away, but the drive was pretty easy, and with an hour for dinner we were home by 11:00 or so, and totally crashed not long after. I guess we’ll have that pot roast tonight.