• 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 Hershey, 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.


  • Infrastructure WEEKEND? Oh Noes!

    Infrastructure Week continues today with some yardwork, only it’s yardwork at Anne’s office: there is a huge mulberry tree in the neighbor’s yard, whose branches were damaging her roof. The roof guy cut a bunch of them off but now those are lying in a heap behind her office, and if the weather holds I plan to go chop and bag them. I suspect I may have to get access via the downstairs tenant’s office, so I’ve been waiting for the weekend, like everybody else.

    On my other projects:

    Phone: The new battery works great, and it’s like the phone has a new lease on life. The charger port cover seems fine too.

    Garmin: This was a bit scary since I had to mess with real electronic parts, but the battery change went off without a hitch. The new battery only holds 1000 mWh, as opposed to 1100 mWh for the original when it was new, but I charged the unit up and then let it run in the backyard, with GPS and the display on, for 5 hours and it went down to 60% charge. That means I can probably go for more than 12 hours on a charge now, as opposed to about 4 hours with my tired old original battery, so I am way ahead of the game. I read online that the new battery tends to rattle in the case, but I shook it and heard nothing. A real ride might let me know more.

    The Clock: It’s ticking away in the kitchen right now. I got it at Akroyd’s Hardware, where the guy was apologetic that it was the only one he had, but I was cool — it was exactly what I was looking for.

    Light bulbs: What do I want, a cookie?

    Anyway, I madeĀ tuna & wilted greens in garlic sauce over spaghetti last night, and also got tonight’s round roast going in the crock pot. I brushed my teeth and hit the road with Donna and John, ending up at The Mint where we were joined by Doug & Lori. Much pleasantry and merriment ensued…


  • Infrastructure Week Continues

    I got the new Garmin battery today, the last of my purchase items from Amazon, and I will be installing it today if I can find the instructional video online; the battery came with tools and an instructional DVD, but my laptop’s DVD player has decided it no longer works, so it’s either YouTube today, or I have to email the battery company to get a link to where they keep the video online. There will be some delay I’m sure, but we’re always moving forward…

    Several light bulbs burned out this week. I don’t know why, but they do seem to die in clusters, even these newfangled fluorescent/LED ones (some of these actually were fluorescent bulbs, which probably means they’re years old by now). I got all but one replaced, an outdoor one for the back porch light. So, off to the hardware store I go. I’ll be skipping Lowe’s because I am still looking for a kitchen clock and they didn’t have them; if whatever hardware store I hit is similarly lacking I’ll just go to Amazon again.

    Also up: food shopping. I’ve been eating like a king the past week, steaks with roasted veggies, ham & beans, etc until yesterday, when it was time for dinner and I realized I had no food. Since I was totally absorbed in that routing program — I’m trying to add a feature, but it seems to be putting up a struggle — I just sat home dinnerless, pissing the hours away until I went out to get some late-night nachos at Brew Works. Oops! So, food shopping.

    What’s not on the list? Cycling. I keep hoping that my toe will feel better day by day, good enough soon that I can put anything other than sandals on (I actually wore sneakers last night), but the truth is I have a broken toe and it takes 6 weeks to heal, so I’d better man up and get used to light duty for a while. Maybe in a few more days…


  • Housebound and Alone

    Well not really, but Anne is now into the second week of her bike adventure, and my stubbed toe — can you believe it? — along with the weather, kind of keeps me from wanting to be very active. So, what have I been up to?

    Well, for one thing, I’ve been trying to stay ahead of domestic disaster, here on my own. The Trail Summit kept me busy for a few days, then I went on a round of house cleaning: I straightened, dusted and vacuumed upstairs one day, then did the same downstairs another day, and in between I did some food shopping and ran errands. I also had a bit of an “infrastructure incident:” the support at the wall for one of the clothes hanger rods broke in my closet — I hung up some suits from the drycleaner the day before — so one errand was to Lowes, where I got the support but no other thing I needed. (We need a new kitchen clock, among other things.) This came on the heels of a completely wasted trip to a new phone repair place, which claims in their advertising, and in the “grand opening” article in the local paper, that they can fix just about anything. I show up, looking for a new battery and a replacement dust cover for the charging port — “we can’t fix that.” Yeah I was doing a slow burn after those trips…

    Anyway, I’m continuing with some minor repairs here, changing light bulbs, keeping busy, trying to stay on top of things. I got the phone parts, as well as a new Garmin battery, from Amazon, so when they show up I can do a little DIY repair. There are also a few things at Anne’s office that need doing, which I’ll probably tackle in the next few days. Keeping busy.

    The big thing I’ve been doing has been putting some finishing touches on my Lehigh Valley Commuter Bike Routing Project. I need to update the big database of streets (a daunting task), but I developed a way to quickly get streets that are a part of preferred routes, routes to be avoided, etc identified and updated. This has been a stumbling block, because I’ve had unused logic on the code, to prefer or avoid roads based on which preferred routes layers were visible, and I had no realistic “preferred routes” developed. With this new trick (short scripts to do the updating, based on spatial joins), I drew up a bunch of easy routes, more advanced routes, legal but inappropriate roads, and dirt paths, and added them to the database. Son of a bitch, it all worked!

    I also did a little site cleanup, making things work and look nicer; its close enough to done that I may show it to someone soon — it still has to live on my laptop, since I still have not found a free host that can/will handle pgRouting.

     


  • Trail Summit

    So Sunday (last Sunday, not yesterday) was a recreational day for the Eastern PA Trail Summit, and I had an invite — a free pass really, courtesy of the D&L — to the whole event, so I rode to Easton to check out the Canal Boat ride and the industrial history tour. Both were awesome despite my stubbed toe…

    (Both events were informative, but while anyone can get a picture of canal boat life from what’s currently on display, and it’s common knowledge that there were once many factories along the canal, it was truly eye-opening to have someone point and say, “right there was a giant textile mill, and in that empty field there was once a blast furnace, in fact that boulder is what’s left of its foundation.”)

    Very cool, and here are some photos from Sunday:

    Scott S was also at the park that day, doing a kid’s bike ride with the Easton Police. That was pretty cool, and nice to see some cycling friends there with their kids.

    The Trail Summit proper was Monday and Tuesday. I had no real idea of what to expect — I actually had to look up what a “breakout session” was, and what the difference was between “keynote” and “plenary” speakers — but they were two awesome, informative and inspiring days.

    I learned a new term – “inland port,” sigh — from Northampton County Executive Lamont McClure, who spoke of it as one of several competing visions for the Lehigh Valley (as opposed to “nice place with trails,” I suppose), and the keynote speaker, a woman who thru-hiked the AT and spoke of it as a life-changing experience, made me realize that the Lehigh Towpath changed my life as well. There were morning sessions on redesigning roads to accommodate trail sections, and afternoon sessions on marketing your town to trail users, and a cyclist, the speaker for Tuesday’s lunch, said we need more amenities and signage. Amen brother!

    There was a dinner Monday night at the National Museum of Industrial History, so of course we all toured the museum. Here are a few photos:

    Not everyone was an awesome speaker, even if their ideas were good, and not every session was informative — there were a few I actually disagreed with — but all in all, it was an awesome conference.