• Native Paths Update

    I kept at it, and am now about a quarter of the way through the trails — the motorway parts, at least — in my Indian Paths of Pennsylvania project. I have a pretty good idea of how the book is organized now, and came up with a pretty decent workflow that gets me through a single path in just under an hour. I do one or two a day. It’s pretty easy to get absorbed, trying to find the tiny old roads and landmarks based on their descriptions in the book, and I’ve been totally sucked into the history of that Colonial-Revolutionary era. (I picked up Mason & Dixon again, since it goes right through the middle of that time and place.)

    I also think there will be some epic rides this summer, based on these routes — I’ve been drooling over some of the scenes I see in Google Street View.


  • N+1

    I knew it would come to this sooner or later — I’m in the market for a new bike. There’s nothing wrong with any of my other bikes, but none of them are really touring bikes, and I’ll be joining Anne on a trip this summer. Fully self-supported, front and rear panniers, camping in the Rockies — the works. (I hated “touring” every time I’ve ever done it, but I suspect that that’s really an equipment issue — I do enjoy our towpath “bikepacking” trips.)

    Anyway, I’ve been doing some research, and what I think I need is:

    • a bike with a “touring” frame — low bottom bracket, longer wheelbase and chainstays,
    • a triple chainring,
    • mechanical disk brakes, and
    • a few add-ons that would be nice if they came stock, like racks and fenders.

    There are a few bikes that I think might fit the bill, ones I found in several “best touring bike” listicles, namely the Trek 520, the Kona Sutra SE, and the Surly Disk Trucker. The Trek looks to be impossible to find anywhere right now, and the Surly only seems available (sight unseen) via the Internet, but I found a Sutra SE at a local bike shop, and it looks like my size. I need to do a bit more search and research — I’m also looking among the world’s used bikes — but I think I can already see how this will shake out.


  • I’ll Always Have September

    Meanwhile: Happy New Year! We had a really good time, hanging out with Ben and Candace and a few of our neighbors. We also had Anne’s family Christmas celebration this Saturday, pretty much the final event of the season. Now it’s time to pick up the pieces, and maybe make some resolutions. Actual “resolutions” may take some time to formulate, but I do know one thing I want to get back to — weight loss. Read it and weep:

    My weight loss saga in graph form

    That’s quite a yo-yo trick! I guess I’ll have to get serious about losing that weight all over again…

    By the way, this is what I wrote fifteen years ago.


  • December/January Readings

    Bewilderment by Richard Powers: this is the most recent novel by the guy who wrote The Overstory. It concerns an astrobiologist — he studied extremophiles as a biologist, and now scans the spectra of newly-discovered planets for signs of anything that can be called life — and recent widower with a difficult child who may be somewhere on the spectrum. He and the boy struggle with the mom’s death, and the imminent death of the planet (the mom was a heroic environmental activist); he tells his son tales of other planets as bedtime stories; and — this where I am so far — he enrolls the son in an experimental brainwave/biofeedback program rather than let school put the kid on drugs. It’s interesting, but it’s also a bit of an anxiety attack; I don’t read much of it at any one time. Stay tuned…

    Excession by Iain M. Banks: Another Culture novel, and a Christmas present from my parents. Pure “bubblegum for the mind” as Anne calls her detective novels, and I happily put Bewilderment aside to scarf this book up in about three days.

    PostGIS in Action by Regina O. Obe and Leon S. Hsu: Another Christmas present, this one is nonfiction, bordering on reference, and something I’ve been meaning to pick up for a long time. I read the first few chapters in one sitting, and am now working through it a little more slowly, with my laptop open and QGIS running. Lots of good stuff, a bit dense but the learning curve is pretty forgiving.

    The Hydrogen Sonata by Iain M. Banks: another Christmas present and another fast-paced Culture novel, more bubblegum and I am about halfway through.


  • Foiled Again!

    I have a love-hate relationship with Paul A. W. Wallace’s Indian Paths of Pennsylvania. I love reading the individual chapters on each path — their descriptions, and the accounts of them in the letters and diary entries of early Colonial explorers, but any hard look at the specifics and the trails themselves become frustratingly vague. This is all the more frustrating because the information looks specific and authoritative enough, until you take that close look…

    Some of this is because the original information is vague — nobody was tracking their steps with a GPS back then — so the actual trail location is not perfectly known, and partly it’s because the trails themselves are long gone (though some are at least partly followed by modern roads), so it’s hard to search them out without trespassing, but there also just seems to be some missing ingredient needed to define a trail network.

    A few years ago I thought that this last part could be solved with a little bit of GIS detective work, so I started a QGIS project to define the trails and see about building a network, but I sort of ran out of steam — I basically foundered on the vagueness of the trail descriptions. I did one or two in the Lehigh Valley, and realized that the sleuthing needed was a lot more laborious than simple data entry, and the project languished after those first few paths.

    I was thinking about all this again recently, and realized that there is a critical first step I ignored: the book serves primarily as an automotive guide, with detailed instructions for driving in the vicinity of each path. I also thought that if I broke the task down to a set of database tables, I could link these auto routes to their various paths and book chapters . (Some trail chapters actually describe multiple trails and subtrails, while some motorway descriptions continue across multiple chapters, so many-to-many relationships abound but that’s what databases are for. Furthermore, most of the trail chapters have a start and an endpoint, yet more data I can use to cross reference.)

    This scheme fell apart within the first few trails. The very first trail, the “Allegheny Path,” has Philadelphia as the start point and “Pittsburg and Kittanning” as the endpoint — so which is the endpoint? Apparently neither, because the trail is only described as far as Harrisburg; the “Allegheny Path” chapter ends with references to several other trails (different chapters, in other words) heading West from Harrisburg as possible continuations. So OK, I can deal with this: my endpoints are really Philadelphia and Harrisburg, and I’ll stuff the rest of the info into my “description” column. (There is a second path listed in that first chapter, but it is little more than a historical aside and a reference to another path/chapter. This is going to get tricky.)

    Luckily the motorway for the Allegheny Path is easy to follow. I used an open routing plugin to follow along a bunch of control points, and voilá I had my linestring. This ain’t so bad!

    The very next chapter, I ran into motorway difficulties: the route description made no sense. Either the routes were not prepared with adequate ground-truthing (unlikely, though I was starting to feel uncharitable), or the roads (and their designations) had changed at some point in the 55 years since the book came out. This seems the more likely explanation, since I-80 goes right through the area in question, was only finished in 1970, and probably changed a lot of things in its wake. I actually found the Wikipedia article on the Bald Eagle Creek Path more useful.

    So I’m back to deciphering and making judgement calls rather than strictly converting the information from one format to another, even for these road descriptions. I didn’t expect this project to be done in an afternoon, or even a week or so, but “going to take forever because I’m not really working on it” is now closer to my expectation.

    (Note: I found that someone already took these paths and put them into a GIS, but it’s on PA-Share and that’s proved difficult to work with — and deliberately limited, unless you pay — so far. We’ll see…)


  • Some Christmas Photos

    Here are some photos from some recent events:

    These are the Luminaria in front of our house. Luminaria Night had been postponed twice because of crazy bad weather, and the second rain date wasn’t all that great either — it was so windy that the candles kept blowing out. Still, plenty of people put them out, and we went for a walk with John & Donna and Matt & Diet to check out the displays. We visited several neighborhoods, including the historic district, and eventually ran into Scott & Kellyn, and even sang some carols at Jeff & Kristen’s house. That was a fun night out!

    On Thursday we did the CAT Christmas Lights Ride through Bethlehem. These are some photos from one of the must-see stops just at the western edge of our neighborhood. Some guy basically has every square yard of his house and property lit up, well, like a Christmas tree. The owner came out — he remembered us from last year — and talked about his display and how he manages it, and then we moved on.There were many more displays, but non beat this house:

    Finally, some photos of our Christmas visit with my parents. Me and Anne, Mom and Dad, and Chris & Tara with Maureen and a surprise visit from Chris Jr, who flew in on an earlier flight.


  • Waiting For The Snow

    Merry Christmas, everybody!

    We had an awesome Christmas, spread out over several days: there was the CAT Christmas lights bike ride (followed by a get-together with neighbors a bit later) on Thursday evening, then we visited Anne’s mom on Christmas Eve and my parents on Christmas Day, and saw Anne’s brother Joe and family yesterday.

    Now I’m just sitting here, reading some of my Christmas loot and doing a bit of mapping, and waiting for the weather to do …something. Earlier forecasts called for a “wintry mix,” which is basically the seasonal version of the generic “chance of rain/whatever,” but then the forecast changed to a possibility of up to an inch of snow, along with sleet and some freezing rain. I’ve been looking out the window pretty regularly since I got up this morning — nothing: the streets are dry, and though it’s overcast right now, the sun broke through a few times already today. I’m not holding my breath…


  • The End Of An Icon

    Icon, or eyesore? The Glendon Hotel has been an abandoned and falling down building for as long as I can remember, but it was 285 years old and once an important part of the Lehigh Valley. I happened to be riding nearby the day they started demolition, so I took this photo from the towpath, just as the backhoe started doing its work:

    old building on hill
    The Glendon Hotel About To Be Demolished

  • Oh No Not That Again (Part 2 of 2)

    So I was playing with the commuter mapping program the other day after doing some simple maintenance, just finding routes from here to there, and it started bothering me again that I could not route onto the towpath from Sand Island — the network was incorrect, it had no intersection from Main Street onto the path.

    I get my road data from OpenStreetmap, and I know that, in OSM, the trail is properly connected at Sand Island — I fixed that myself years ago, but never went through the rigamarole of updating and rebuilding my network. It didn’t seem worth the work for such a small change. There is another way to make that change though: I could modify my existing network, but that always seemed like it would be even more complicated and difficult than rebuilding from scratch.

    But would it be? The task really boils down to two things: adding a node where I want the new intersection to be, and then splitting the newly intersecting roads in two at the intersection point. Adding a node is easy enough, but splitting a road has a lot of moving parts — each of the two new road segments has to be assigned about 30 attributes, some of which they can inherit directly from the original road, others basically pro-rated from the original road based on the new road segment lengths, and yet others related to connecting the new road segments to the new node. It’s straightforward, but there are a lot of small, tedious calculations to perform and keep track of. Sounds like a job for the computer…

    What I did was write a PostgreSQL function that takes the node and the road, and returns two new road segments. I also wrote a wrapper script to update the network by calling this function. (I decided to just add my new nodes “by hand.”) It mostly works, though in one test case it didn’t split the road exactly where I thought it should (no idea why), and the new network routes like a champ.

    This isn’t a substitute for rebuilding the network: this is a quick fix for a small problem, and the the pro-rated attributes especially are a hack, an approximation; I can easily see situations where pro-rating say, ascent/descent data would be inaccurate. But this is fine for now.


  • Oh No Not That Again (Part 1 of 2)

    I’ve been looking at my Lehigh Valley bike commuter routing project again.

    I decided to update the recommended routes with additions based on some of our recent CAT rides, and found that the line geometries representing the various routes were missing. It’s no biggie, some things didn’t survive those destructive “upgrades” I did a few years ago, and the actual recommendation info is stored in among the road network data anyway.

    But, I still had the old routes as GeoJSON files, and it’s easier to work with them as geometries in their own right than as attributes on the road network, so I added them back into the database. Then I added that new route (Cedar Street, which parallels Union Boulevard but is much quieter), and used it to update the network. Piece of cake!

    I also decided to tackle the problem of updating the network paths themselves, which is not so much a piece of cake. I get the roads from OpenStreetmap, and there are mostly automated tools to build a routing network from OSM road data, and that’s followed by a whole lot of additional data massage to put it in the form I use. But the underlying OSM data isn’t always accurate — roads don’t go where they are supposed to, intersections don’t actually connect, that sort of thing. I would find a lot of this out after building the network, but the task of editing the network, once it’s built, is so onerous that my preferred method has been to fix the issues in OpenStreetmap, then just download the roads and rebuild the whole network from scratch — also onerous, but slightly less so.

    Anyway, I planned to make this a part of the usual site maintenance if this ever went live: maybe once a month I would download the OSM roads, rebuild the network, and then install all my extra stuff, and in between these upgrades I would fix OpenStreetmap whenever I found a problem.

    The last time, and in fact the only time, I ever went through this updating process, was October 2018. I did some serious cleanup on OSM before that, so the map was in pretty good shape, but I got an embarrassing surprise when I demo’ed it to John R (an actual computer professional), who was thinking of commuting to Easton via the towpath. I’d just added offroad path options, and I was eager to show John my new toy, but the program refused to route onto the towpath at Sand Island — there was a missing intersection! A classic case of “broken demo.”

    The need for (and my interest in) the routing program faded not long after that, so, although I cleaned up the offending roads and paths on Sand Island within OpenStreetmap, I never did download any newer road versions. And that’s how it sat for three years, until this week…

    (to be continued)