I took no photos (whoops!), but yesterday I rode the Rothrock/Tussey Mountain IMBA epic with Renee, as part of our training for Wilderness 101. I was totally whooped by the end, but it was an awesome day:
The only thing I would add to this is that, though we didn’t have too much trouble with it, we followed this course using a phone app, and speaking now from experience I cannot recommend doing that.
What a fun afternoon! I’d arranged to put in some volunteer time today with the D&L Canal people, so I took off down the towpath just after eleven, on my Iguana, to do some cleanup work inside the Lock Tender’s House at Hugh Moore Park. I’d forgotten how fast and fun the Iguana was on the towpath, but before long I was just flying along effortlessly, and was at the Canal Museum by 12:00. Meet up with archivist Martha, and then we go up to the Lock Tender’s house itself, a place I’d been many times but never inside.
Then came the “work” part, mostly vacuuming and dusting, getting the rooms ready for the season opening, but even that was interesting, since I was on the other side of the “do not enter” chain, handling stuff the public can only look at from afar. Actually, the house is not that old, having been rebuilt after a fire in 1928 (possibly an arson job from revenge-minded bootleggers, or so I learned today), and while some of the furniture was obviously ancient and worn, some items in the parlor, the room I mostly worked in, could have easily been mates of things in our living room right now — I’m looking at you, hurricane lantern…
Anyway, here are a bunch of photos I took inside the house.
Wet day here, and its also a bit of a rest day, waiting for the oven repair man to show up. So, I’m off the bike for the day, and just in time because I’ve been feeling tired. Tomorrow I’ll be riding the towpath (volunteer work day at the Canal Museum), Thursday I’m meeting Renee out in State College to do some of the W101 course, Friday we’re going to the Wharton Esherick Museum, and then this weekend we go off for a week in the Adirondacks! Whew…
This weekend was a blur. Anne’s mom stayed with us from Thursday, the night of Anne’s concert — by the way, Anne is in a new orchestra, better than the last one IMHO but with the same playful spirit — through Saturday (when we went to a memorial service, and Marie got a ride home from there with Anne’s sister Lorraine). There were many people we knew in the concert audience, including Lorraine and Ray with their grandkids Jonah and Quinn, Toby and Erika with Josiah, Donna and John, and many people from the neighborhood. Afterward, we sat on the porch and sampled our new beer (the Two Hearted Ale clone — verdict: delicious) with John and Donna.
(By the way, I got in a short Towpath ride while Anne was picking up her mom. I only went to the boat club and back, but I was trying to push my heart rate, and ended up with a 15 mph average, better than any towpath ride this year.)
Friday was a quiet day, just hanging out, but I did get in a Sals ride, one where I felt pretty good on the trail.
Saturday was the memorial service for Marilyn, the mother of Anne’s sister-in-law Laura. She’d passed away just recently, and she’d been ill for a long while before that, but before her illness she’d been an incredible woman: vibrant, warm and loving, and a real force of nature and positive force in every life she touched; those were the memories that we celebrated. Afterwards we had a lunch at Joe and Laura’s with much family about, and many friends.
We went out that evening to catch up for a bit with Doug and Lori.
Sunday was the Steel City Enduro at Sals, and I went up to volunteer. I ended up running the start, no clue what I was doing but I think everyone survived, then I walked the course and did a little race-course cleanup after the riders went through. I was out of there by noon or so, so I could clean up and stop by John and Donna’s place for a picnic with their family. (Anne was off dealing with other mom-errands.)
Yesterday I woke up really tired, and it took me a while to actually be awake. Went for a Sals ride anyway, felt pretty good, then came home and took an hour-long nap…
I’ve been thinking a lot about the economic impact of the towpath lately, and have been looking to the Great Allegheny Passage as a model, where many food and lodging places have popped up to cater to the cycle touring crowd. I know that the D&L Corridor people are also looking at various businesses and how the towpaths might impact them, but I believe that they are looking at it from a county-wide perspective, when they should probably really be looking at impact within a few blocks of the path, and or at least within about a mile of the river — would you decide to take a fully loaded touring bike miles out of your way, and probably up some hill to get away from the river, just for say, lunch, if you didn’t absolutely have to? So, that got me thinking about the question: what restaurants, hotels, bike shops, and other amenities are actually within a mile of the relevant sections of the Delaware and Lehigh Rivers?
(This was a good first approximation, but it’s surely a naive way of looking at the problem, since there are many places within a mile of the river as the crow flies, that are not actually within a mile, or maybe even many miles, of anyplace accessible from the towpath — and places that will see towpath business will need to be located within a matter of blocks, not miles, from towpath access points. But I realized all that later as I thought more about the overall situation, and my first analysis of towpath business prospects was what I worked on first.)
The way I looked at it, my original problem broke down into two parts. First, what is the region within one mile (or whatever distance) from the river, and second, what are the amenities within that region? The first part was fairly straightforward, but the second, which looked like it would involve some kind of Google Maps search — and eventually it did — turned out to be more complicated than I thought…
I used QGIS to deal with the first part. I took as my reference some Pennsylvania aerial photos, plus a property map of Lehigh County, and created a new line vector (in a projection that uses feet as a unit of measure), following what looked like the middle of the Lehigh River from about Laurys Station to just past Bethlehem, and then I used the “Create Buffer” geoprocessing tool to create a vector polygon buffer region around that section of river, whose distance from my line vector was 5280 feet, in other words, one mile. That part worked great, but what to do with my buffer region?
My first thought was to take the buffer vector and export it to a KML file, import that KML file into a custom Google Map (using Google’s “My Maps” personal map creation/editing feature), and then “do something” with it. That all worked great as well, up until the “do something” part — the KML file, and the personal map, were not much use when it came to customizing a map search.
I did find online, however, that there were some things you could do with polygonal regions, and testing locations (such as the ones returned from search results) to see if they fell within those regions, using the Google Maps API. This added two new steps: first I had to re-export my buffer region, this time as a GeoJSON file because that was what the API would accept, and I also had to sign up for an API key from Google Maps. Both of these were also straightforward and easy to do.
The final step was to put it all together: make a web page, and (with some javascript), load and draw the GeoJSON file, run a search (for restaurants, in my experimental code), and then find and display results that fell within my region. Code code code, give it a try… nothing. I was able to load the file and see my region, but no place results would be displayed.
Turns out, there is more than one Polygon type in the API, and the one created by loading a GeoJSON file is different than the one you can test locations against; I would have to convert my polygon from one form to another. (This seemed to me a bit much, especially since I thought I should have been able to load the original KML file and it would “just work.” After all, isn’t KML a Google thing, and kind of a standard?) No matter, the conversion process from one polygon to the other looked as straightforward as every other step so far, so I just added it to the end of the task chain. Code code code, give it a try… nothing, and here is where it started to get really frustrating.
I couldn’t for the life of me figure out what was going wrong, it looked like I did things exactly the way I was supposed to but my new, converted polygon could not be made, and it looked like the original polygon actually was empty, even though it was drawn on screen. I eventually used a callback routine from the GeoJSON loading function to get the polygon coordinates, and for some reason that worked.
That gave me my clue: the “some reason” was that the callback was not executed until after the file was done loading, so the conversion routine had something — a non-empty original polygon — to work with, while in my original code the rest of the script wouldn’t wait for the file to finish loading before continuing, so there really was nothing to work with yet when I tried to do the conversion. That took three paragraphs to write, but more than a day to work out…
I didn’t really like my solution: if you’re forced to use callbacks like that, you end up going down the rabbit hole, callback after callback after callback, just to get some semblance of sequential execution. (Meantime, I found that some methods did not suffer from these kinds of problems, they seemed to wait for the data to load before trying to work on it. Strangely enough, all the simple API examples I found at Google used these methods instead of the one I needed.) Eventually I set up a wrapper function to hide the messy details and just get me my goddamned polygon from the goddamned GeoJSON file.
Anyway, here is my demo map:
UPDATE (7/26/2018): This map will stop working after July 30th, because the “radar search” function (see script below) has been deprecated by Google Maps. I may take some time to update the script — which I’ll mark with another update — but then again I may not, because this is a low-usefulness, low-visibility, low-priority thing for me, and also because fuck Google.
And here’s my script. Most of this is based on Google Maps API examples, but the function getBuffer() loads the data, and createBufferPolygon() is the wrapper that creates the polygon object:
var myNewMap; // the google map
var myPlaceService; // object for google places api
var myBufferPoly; // the polygon that holds the buffer region
var myInfoWindow; // info window for the selected place
// the callback function from loading the API, where everything actually happens
function initMap() {
myNewMap = new google.maps.Map(document.getElementById('map'), {
center: {lat: 40.672628, lng: -75.422778 },
mapTypeId: google.maps.MapTypeId.TERRAIN,
zoom: 11
});
var bikeLayer = new google.maps.BicyclingLayer();
bikeLayer.setMap(myNewMap);
myBufferPoly = createBufferPolygon(
'lbuf2.geojson',
'lehigh',
myNewMap,
true,
'green'
);
myPlaceService = new google.maps.places.PlacesService(myNewMap);
myInfoWindow = new google.maps.InfoWindow();
getSearch();
}
// this is the wrapper function, which calls the function that loads the GeoJSON file
// after creating the polygon to hold the buffer region
function createBufferPolygon(url, featureName, map, isVisible, polyFillColor) {
var bufPoly = new google.maps.Polygon({
map: map,
clickable: false,
visible: isVisible,
fillColor: polyFillColor
});
getBuffer(url, featureName, bufPoly);
return bufPoly;
}
// this function loads a GeoJSON file containing a named polygon
// then adds it to the given polygon object
function getBuffer(url, featureName, poly) {
var bufGeom;
var bufferData = new google.maps.Data();
bufferData.loadGeoJson(
url,
{idPropertyName: 'name'},
function(featarr) {
bufGeom = bufferData.getFeatureById(featureName).getGeometry();
poly.setPaths(bufGeom.getAt(0).getArray());
});
}
// finds all restaurants within 15km of a certain location
function getSearch() {
var request = {
location: {lat: 40.703117, lng: -75.416561 },
radius: 15000,
keyword: 'restaurant'
};
myPlaceService.radarSearch(request, displayResults);
}
// displays search results that fall within the buffer region
function displayResults(searchResults, searchStatus) {
if (searchStatus !== google.maps.places.PlacesServiceStatus.OK) {
console.error("getSearch error: " + searchStatus);
return;
}
for (var i=0, result; result=searchResults[i]; ++i) {
if (google.maps.geometry.poly.containsLocation(
result.geometry.location, myBufferPoly)) {
addMarker(result);
}
}
}
// adds marker for selected places
function addMarker(place) {
var marker = new google.maps.Marker({
map: myNewMap,
position: place.geometry.location,
icon: {
url: 'http://maps.gstatic.com/mapfiles/circle.png',
anchor: new google.maps.Point(10, 10),
scaledSize: new google.maps.Size(10, 17)
}
});
google.maps.event.addListener(marker, 'click', function() {
myPlaceService.getDetails(place, function(result, status) {
if (status !== google.maps.places.PlacesServiceStatus.OK) {
console.error(status);
return;
}
myInfoWindow.setContent(result.name);
myInfoWindow.open(map, marker);
});
});
}
That’s a lot of work for something that solves the wrong problem! My next look at this will likely just involve finding the access points, and doing Google searches near each one — soooo much less elegant…
I use Linux Mint, which is based on Ubuntu, specifically a less-than-current version of Ubuntu for whatever the current version of Mint is. The Ubuntu distribution is in its turn made up of software packages that do not get major upgrades (except for, say, security fixes) within any specific version, so by the time I get the “latest” Mint, the actual programs and applications are actually months, if not years out of date. This drives me nuts sometimes, especially when I run across a bug, Google it and find that it had been fixed last year but it’s not available to me, at least through the official Mint channels.
In situations like that, you can do things the old-fashioned way (download the source and build it yourself) or you could find a pre-packaged installer file with the latest version, but these now knock you off any available “upgrade path” for that application. The better way is to find another channel from which to receive the software packages, one that is more up-to-date than the official ones.
(By the way, these channels are called “repositories,” and they are just online sources for the software packages. The packages themselves are compressed bundles of files that contain the software, along with information about what other software, specifically what versions of other software, the package needs, which are called its dependencies. The “package management system” reads these files, figures out what else needs upgrading — or if it can be upgraded — and takes care of upgrading the software and its dependencies from the lists kept in the repositories that it knows about.)
It’s somewhat frowned upon, since “unofficial” repositories may be malware, or even just poorly made, but I’ve added a few of them to my lists of software sources. I’ve done it to get the latest available Libre Office, and also the latest version of R, for example, and yesterday I decided to do the same with my GIS software, using what is supposed to be a very useful, up-to-the-minute repository.
Well, it was a little more complicated than that, since the version of GRASS in the repository is 7.0, and the version of QGIS was 2.8, and it turns out that the GRASS plug-in for QGIS 2.8 was broken by the newest versions of GRASS, which is bad because a good portion of QGIS’s advanced functionality comes from its ability to work with GRASS. I’d upgraded myself right out of a useful program… I did a bit of Googling, and found that later versions of QGIS had the problem resolved — wait, later versions?
It turns out that this cutting edge repository was also not the latest, and I had to get the latest directly from a repository maintained by the makers of QGIS. I feel like I built myself a house of cards, QGIS repository on top of unofficial repository on top of Mint, but at least I now have the software I want.
I’m not even sure why I turned it on, but for some reason, some time in the past, I did turn on the Compiz effect called Freely Transformable Windows. I probably clicked on it randomly to see if anything dramatic happened, didn’t notice any changes and moved on, but if you look at the description it sounds pretty cool: you can rotate (in 3d) or tilt or scale any window, including its contents. If you look closer at the description though, you’ll also see that once the window has been “freely transformed,” you can no longer “interact normally” with it, meaning you can’t use it at all, or even close it normally — it’s like it’s locked up, with the window crooked.
So like I said, I forgot about selecting it, and had no idea what it did in the first place. Unfortunately, it has a bunch of Control-Shift-Letter commands to initiate the effect, which override other uses of those same keyboard shortcuts, so I would be in Firefox say, press Control-Shift-A for the add-ons page, and instead of getting what I want the window would go crooked and lock up. As far as I could tell, it was some weird and serious bug.
Well tonight I just happened to do a little Googling, and found the info that reminded me of what I did. I turned off the effect, and all is right with the world.
I’ve been trying to work endurance lately, and the past three weeks I’ve been able to get in some decent rides, and I’m averaging over 100 miles a week now. The downside to that has been that my ability to ride intensely has suffered a bit, due to fatigue I guess. I took Monday off after Sunday’s ride, but yesterday’s Sals ride needed to be cut short — I just didn’t have it in me to ride there. Tonight was the towpath, a mid-level effort, and tomorrow is another rest day, since the forecast is for bad weather, and also because we’ll be spending the day in Philly visiting Ben. Friday I may do a century ride, Saturday is the Full Moon Towpath Ride, and Sunday is…? I’ll play it by ear from that point, maybe pushing for longer MTB rides (mid intensity, mid length) for the next week or so.
I did an awesome, and fairly long, MTB ride in Jim Thorpe this past Sunday. It was a beautiful summer day, and Anne and I went up to Mauch Chunk Lake; she did a long run on the Switchback and then visited her mom while I did my thing over Pisgah and Broad Mountains. I didn’t realize it until I was pretty far along — Mountain Bike Weekend is 11 years dead and gone — but this would have been the right weekend for my annual JT Epic.
Ride stats: 27.49 miles in 5:56 (3:53 actual moving time), 2996 feet of climbing, 2387 calories burned. This doesn’t quite meet my old criteria for “epic” status (40 miles / 8 hours), but I’ll definitely call it a “solo mini-epic,” and like I said, it was a beautiful day: warm and sunny and breezy, really a perfect day to spend in the woods.
We got up to the lake just about 11:00, and both started not long after, Anne taking off a few minutes before me — I had to stop and take a few pictures of the lake before I left, it was just amazingly beautiful. The pictures I took don’t really show it, but it was a pretty windy day, and the lake had whitecaps on it at times, but in the meantime the sky and lake were blue and the mountains were green…
My plan was to take the upper switchback over to the Wagon Road, pick up the Rhododendron Trail and take that down to the RR tracks, and get up Broad Mountain via Rt 93 and the old James’s Run Challenge. From there I’d do some backing and filling to find myself at the Uranium Road, then I’d take Pine Tar back to the Broad Mountain jeep roads and down the Bear Trail to the pipe crossing and back via the RR tracks into town, where Anne would pick me up. I was budgeting four hours riding solo I was avoiding the more difficult, riskier (and slower) trails, and figured my pace would be quick enough. I set out after Anne about 11:15, caught up with her at the intersection of the Upper Switchback, and we went our separate ways from there.
There were a number of times on this ride when I was surprised by how much I liked some trails that I normally don’t rate highly, or ride much; the Upper Switchback was the first of these. It was beautiful, with mountain laurel blooming along both sides, with the mountain rising like a cliff on the left (and dropping like one on the right), and the little ribbon of brown dirt disappearing into the greenery.
After a while I noticed something else too: there was a lot of noise in the air, and I finally realized I was hearing a brood of locusts. I had no idea that there even was a brood hatching now, but there they were, or at least I could hear them on the hillside, in among the mountain laurel.
I’ve always loved these guys, remembering them from many summer rides on this same mountain, and here is where I realized that I was essentially riding on what would have been Mountain Bike Weekend — it was always some time around Father’s Day, when the mountain laurel was in its glory and the locusts would be singing their song, which I liked to think was a familiar sound, and already ancient, when the dinosaurs heard it. In years when a brood hatched, you almost had to shout to be heard on the trail, but this wasn’t as crazy loud, and when I stopped I didn’t see any flitting about nearby. I took a few pictures of the blooms and continued on my ride.
I crossed the cliff, rode to the top of Pisgah Mountain and down the Wagon Road (where I had my first “real” crash on a bike, more than 25 years ago), and picked up the Rhododendron trail behind the playground. Rhododenrons and mountain laurel are pretty closely related, at least in my mind, but these guys were nowhere in bloom — it was just a dense, dank jungle trail, though it seemed to be in good shape and get quite a bit of use. Eventually it dropped me down to where I crossed Rt 209.
This next section didn’t look like it got any use at all; the last person on it might have been me, on my last ride through here, years earlier. I had to do a bit of bushwhacking to get to the RR tracks but from there it was pretty easy to follow, out to Rt 93 and up Broad Mountain.
About halfway up the Broad is where I picked up my next trail. I pulled into the Game Lands lot just next to the jail and decided to take a break and a photo opportunity. I took this picture in the general direction of where I just came from; the closer mountain in the background (on the right) is Pisgah, the further one is the one with the fire tower (you can barely see it but it’s there if you look) south of town, and you can see East Mauch Chunk, the upper part of Jim Thorpe, nestled between the two. Once again I was surrounded by locusts, but this time you could see them everywhere — they’re the dark blobs in the sky in this picture. I suspect that they’re attracted to the bright colors of bike jerseys, and soon they were landing all over me, singing for a second, and taking off. The first time it was pretty alarming, I’d forgotten how crazy and loud each individual song can sound. Then I got used to it, until I realized that they were all really horny, and singing to me… It took a little work, but here is a selfie with one of my many admirers.
The next part of the ride was up what remains of the James’s Run Challenge, a difficult uphill trail and probably the hardest part of my day, but beautiful, and shockingly lush considering the hardscrabble look of the ground. More mountain laurel, more locusts, and now a whole lot of ferns and pines too, and then I was at the top. I cut through James’s Swamp and picked up the Deer Path. The Game Lands people have made a real mess of this area, with heavy stone put on the jeep roads, and big sections bulldozed or burned out (actually I’m OK with this one), but the Deer Path was in relatively good shape, and also looking beautiful, more woods and pin oak, but also big regions carpeted, under the canopy, only with ferns — it seemed you could see for miles. It was a surprisingly park-like look. (I happen to like trails best when they get some use, but not a whole lot. This way they are easy enough to follow but the surface stays pretty pristine and the vegetation stays tight to your sides. Most of the singletrack I rode today, but especially the stuff on Broad Mountain, was in this condition.)
Eventually I came out at the power line right-of-way, and stopped to take a break. Here is where I looked at the time (maybe 3 hours in), noted that I was way behind schedule and decided to do a bit of reconfiguring. I decided to skip Shovel Head an the Uranium Road, and just use the Deer Path Extension to get to Pine Tar, and I texted Anne saying I would probably be more like 5 hours (after her run she was going to hang out by the lake for a while then visit her mom in town, and she would pick me up at the end of my ride). While I did all this I noticed how different the power line area looked compared to everything else I’d seen so far to I snapped this picture.
Deer Path Extension came up next, and this was the second big, pleasant trail surprise of the ride. There were a few branches blocking the trail — which I attributed at first to lack of trail use, but then noticed a lot of dead looking small trees everywhere, not sure what was going on — but on the whole the trail was in great shape, covered in mountain laurel blossoms, and way more fun than I remembered. I was actually left wondering why I always ride past this trail to do the Uranium Road instead.
This eventually brought me to the Pine Tar intersection, where I took my last photo of the mountain laurel. (By the way, up here on the flat top of Broad, you could hear the locusts in the distance, but they seemed to mostly be on the slopes rather than the flats.) Pine Tar turned out to be all that I remembered (and then some), but I managed to ride most, but not all of the difficult spots — I surprised myself making some, and I surprised myself not making some. I was getting a bit tired.
Much of the stuff after Pine Tar was uneventful, mostly just jeep roads (with that stupid ballast covering them), but I id get to bump into two separate groups of hikers, somewhat turned around and miles from where they should have been (Glen Onoko). I was glad to help them get back on track.
Eventually I came back to James’s Run Challenge, and I took the turn for the Bear Trail, which was actually much easier to follow than the last time I’d been there. Over the old ruined dam, drag the bike up the cliff-like bank and onto the trail, and I was on my semi-last leg. Down the hill, over the pipeline — one big regret is that I didn’t take a picture, it was perfectly framed by the creek and foliage — and then I was back on the RR track, texted Anne one last time, and (miracle of miracles) I had a tailwind all the way back to town. Anne was waiting at the station when I arrived.
We did another Bike Smart rodeo this morning, again only a few blocks from home. It was pretty low-key compared to some of the others, but still very fun, and I’m actually pretty proud that this is something I’m involved with. However…
When we got home, I saw on Facebook that today was also “Take A Kid Mountain Biking Day” at Trexler, and it was also the day of Curt Cyclery’s “Angel 34” century ride. Too many summer things in too few summer weekends, you’re going to have to make some hard choices.
Meantime, last night we had Indian food (the perfect food for this time of year), followed by a nice long walk, and tonight we’re having another Indian dinner, and then we’ll be heading out again.
My original plan for this week was to do two 75-mile rides, Tuesday and Thursday, and then take it from there. Tuesday turned out to be quite a bit shorter and, what with a lunch break and afternoon thunderstorms, so my training hopes were set on the Thursday ride. My plan was to get up early and do go over Blue Mountain at Little Gap, then take Mountain Road to Little Gap and head home from there.
I got up fairly early, but then procrastinated fairly heavily — in my defense, there was a pretty strong wind blowing, and I was hoping it would abate, but by 1:30 I was done with everything else I needed to do (we’re talking gardening chores here, the subject of its own procrastinations), and the wind was still whipping so out I went anyway.
Turned out, the wind was pretty bad, somewhere around 17 mph and it was a headwind, but I felt good and strong if not fast, and once over Little Gap it was a tailwind, albeit somewhat blocked by the mountain. I now felt like superman, cruising uphill with very little effort. My mileage was 25 at the top of Blue, and it was 40 at Wind Gap.
…And then it was 60 miles and I was home. To my surprise, and despite some backing and filling — frankly, I got myself a bit confused, OK lost — it was actually shorter to get home from the “far” gap than the “near” one. I’ll have to study on this more with a map…
Stats: 63 miles in 5:15, 4112 feet of climbing, 2078 calories burned.