Collect the whole set.

I have a penchant for collecting…uncommon things: names of restaurants I've eaten in, geographic data about places I've visited, empty boxes, boarding passes, and geocaches, to name a few. And now…streets in Amherst. Specifically, these streets:

I like to eat. I like to drink. And I like to fit into my pants. These things are not mutually compatible. I've been trying to setup a routine of cycling a few times a week to trim an inch or two off my waistline.

Today, my second real ride of the season, I decided to explore a little side rode off of route 9 and found a fairly significant community that I had no idea existed. What's more, I meandered through it and eventually connected with Station Road which was also entirely unexpected.

Back in high school, my father and I cycled most evenings and figured we knew every street in Danbury, CT. Armed with my GPS, as I was, I realized that I could actually tell if I knew every street in Amherst.

And so a challenge was born. This summer, I will cycle every street in Amherst. I'll update the map above with each track. Not just to prove it, but because the map is a fun way of motivating myself.

After two rides, I can only hope I don't fail miserably. Oh, and I also think it's amusing that I've already cycled a couple of roads so new they don't appear on maps or satellite images. I didn't actually do any offroading, I swear. I did ride along the bike trail, built on the (disused) rail bed that appears in the maps, which isn't really a road, but I don't think that should count against me. Even if it doesn't count for me.

I can't possibly imagine that this is of sufficient interest to the world at large that it's worth republishing it in the atom feed every time it's updated, but I will slip it in occasionally. Unless I fail miserably, of course.

But you live in Belchertown, don't you? 

Well, yes, as it happens I do. And I could ride every road in Belchertown, I suppose. But Belchertown is, by land area, the largest township in Massachusetts. just about twice the size of Amherst. I don't feel like setting the bar too high right out of the gates. Amherst will keep me busy. And we live on the Amherst side of B'town anyway.

Rides 0 and 1 (19 and 25 May) 

Just a couple of short loops from home.

Rides 2a and 2b (26 May) 

Just another couple of loops from home. Two because I realized a short distance from home that I was riding sans helmet. Had to go back and get that. I consider the stuff between my ears worth protecting.

Ride 3 (28 May) 

A ride through the center of Amherst. And I've almost got my mapping code into shape suitable to publish. It's using GPX files now and highlights the most recent track in red.

Ride 4 (31 May) 

A trip to the Computer Science center at UMass to pick up parking passes for the TAG meeting in a couple of weeks. (There are some odd “dropouts” on this track and I'm not sure why; I checked the GPS pretty frequently and never saw it in a confused state.)

Ride 5: loop around (11 June) 

Sunshine at last. After interminable rain, a chance to ride in the sun. I made a big loop, ending with a grinding climb up Pelham Road and a flying coast down Gulf Road.

Ride 6: short vacation ride (7 July) 

After nearly a month off, it was good to ride again. A short ride, though, after a month off. Just exploring a few streets in Amherst Woods and Logtown Road.

Ride 7: another short loop (8 July) 

Trying to get back in the groove. Most interesting, map-wise, is the little spur down what Google Maps identifies as “4WD Road”. That's now called “Two Ponds Lane” and has an actual layout that much more closely resembles my track than the map. A little further along there's another “4WD Road”, but that's just a driveway into a self-storage place.

Ride 8: downtown streets (15 July) 

I gotta say, I didn't really realize just how many downtown streets there are, or how nice some of the little neighborhoods are, until I started trying to ride through all of them.

Today's discovery: on the map Lessey St looks like it connects to Main Street, and that's the way I remember it. But the reality is that during a recent downtown renovation, they've removed that connector and extended the green across where it used to go.

Ride 9: Blueberries (23 July) 

Down in the lower-left hand corner of this track is Atkins Farms, a fine source of local produce. In particular, blueberries. For crumble. Worth the ride!

Ride 10: Down Route 9 (26 July) 

There's a really big gap in this track. The battery on my GPS was just about out, and I didn't want to miss the section along route 9, so I turned it off for most of the ride out. The ride out was along the bike trail mostly, I'll have a chance to cover that again. If I never have to ride along Route 9 again, that's fine by me.

Ride 11: Residential Amherst (20 August) 

It feels like summer is slipping away and there are still a lot of residential roads to cover.

Comments:

How do you get your GPS track onto the map?

Posted by Eliot on 26 May 2006 @ 02:10pm UTC #

Very cool. But (to echo the one post above) how did you make the GPS overlay on the map? To put it another way, how did you get from GPS data on a GPS unit, to coordinates (and lines) on a Google Map? I would find it hard to believe you copied that data by hand!

Posted by Brett on 26 May 2006 @ 07:33pm UTC #

I get the data off my GPS with garmin2rdf. Then I create the mapping code with a Perl script I hacked together. You can see the HTML and JavaScript it generates by doing a "view source" on this essay.

I'm not very happy with the code that's generated right now, but I'll clean it up (and probably convert the data to GPX) and post the script as soon as I get a chance.

Posted by Norman Walsh on 26 May 2006 @ 07:50pm UTC #

Two comments Norm.

Have you tried gpsbabel for conversions? Works for me with my Garmin, xml output.

And if you're collecting routes, why not get on the map? openstreetmaps . I know the states are pretty well supplied with maps, but what you're doing is just right for a big patch on Openstreemaps?

regards DaveP

Posted by Dave Pawson on 27 May 2006 @ 11:42am UTC #

The script is now running too long, and causes Firefox to show several warnings. If I may suggest a speed improvement: String concatenation in Javascript is very slow. I would build the html inside the listener in createPoint, so it will only run when someone clicks on a point.

Posted by Sjoerd Visscher on 11 Jun 2006 @ 10:02pm UTC #

Thanks for the tip. I moved the string concatenation, as you suggested. I also adjusted the script that builds the map so that it removes duplicate and apparently colinear points. That seems to have helped, but I'm not sure it's going to be enough in the long run.

Posted by Norman Walsh on 19 Jun 2006 @ 09:20pm UTC #
Dave mentioned GPSBabel as a way to get the data from the GPS and into a variety of formats (GPX probably being the most appealing for this task as it includes bounding box which you could use in the GBounds constructor) but there's another feature in it that may simplify your Perl code. The simplify filter does something much like your colinear/adjacent filter.

From the file of "stupid GPSBabel tricks" you could create a style file with the substantive component being

IFIELD  LAT_DECIMAL, "", "%08.5f"
IFIELD  LON_DECIMAL, "", "%08.5f"
IFIELD  ALT_METERS, "", "%f"
IFIELD ISO_TIME, "", ""%s""
IFIELD PATH_DISTANCE_MILES, "", "%f"
IFIELD INDEX, "", "%d"
...which would hock up entries in a format very much like your trkPt constructor, but would lose the track boundaries so bouncing it through a "real" track format like XML is probably still a good idea.
51.31295, 12.41317, 161.000000, "2005-05-01T13:02:47Z", 0.000000, 0
51.31288, 12.41323, 154.000000, "2005-05-01T13:03:25Z", 0.005438, 1
51.31287, 12.41323, 148.000000, "2005-05-01T13:03:39Z", 0.006591, 2
51.31282, 12.41330, 139.000000, "2005-05-01T13:04:16Z", 0.011093, 3

There's probably no payoff in replacing one with the other, but I thought I'd mention it for others building similar tools.

(Thinking about it, one could just add a "format" to GPSBabel that writes GMap code...)
Posted by Robert Lipe on 29 Jun 2006 @ 04:24pm UTC #

Interesting. I am using gpsbabel now, but I haven't really investigated all its features.

Posted by Norman Walsh on 29 Jun 2006 @ 04:29pm UTC #

I think you'll find that Plymouth is the largest town in area, at 106 square miles, more or less, and Belchertown, around 60. Nantucket is one town, land area is less than 50, but total area, above 75, I think.

Posted by MJ on 31 Jul 2006 @ 02:27am UTC #

MJ, indeed you're right. Thanks! I wonder how I came to be misinformed?

Posted by Norman Walsh on 31 Jul 2006 @ 11:23am UTC #
Comments on this essay are closed. Thank you, spammers.