<feed xmlns="http://www.w3.org/2005/Atom" xmlns:foaf="http://xmlns.com/foaf/0.1/"><title>norman.walsh.name: Comments on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA"/><id>http://norman.walsh.name/2006/05/25/amherstMA/comments.atom</id><updated>2012-05-23T11:07:29.599586Z</updated><entry><title>Comment 1 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0001"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0001</id><published>2006-05-26T14:10:23Z</published><updated>2006-05-26T14:10:23Z</updated><author><name>Eliot</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>How do you get your GPS track onto the map?</p>
  </div></content></entry><entry><title>Comment 2 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0002"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0002</id><published>2006-05-26T19:33:42Z</published><updated>2006-05-26T19:33:42Z</updated><author><name>Brett</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>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!</p>
  </div></content></entry><entry><title>Comment 3 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0003"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0003</id><published>2006-05-26T19:50:18Z</published><updated>2006-05-26T19:50:18Z</updated><author><name>Norman Walsh</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>I get the data off my GPS with
<a rel="nofollow" href="http://www.wasab.dk/morten/2003/10/garmin-geko201-rdf.html">garmin2rdf</a>. 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.
</p>
    <p>
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.</p>
  </div></content></entry><entry><title>Comment 4 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0004"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0004</id><published>2006-05-27T11:42:57Z</published><updated>2006-05-27T11:42:57Z</updated><author><name>Dave Pawson</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>Two comments Norm.
</p>
    <p>
Have you tried <a rel="nofollow" href="http://www.gpsbabel.org/">gpsbabel</a> for conversions?
Works for me with my Garmin, xml output.
</p>
    <p>
And if you're collecting routes, why not get on the map?
<a rel="nofollow" href="http://wiki.openstreetmap.org/index.php/Main_Page">openstreetmaps</a> . I know
the states are pretty well supplied with maps, but what you're
doing is just right for a big patch on Openstreemaps?
</p>
    <p>
regards DaveP</p>
  </div></content></entry><entry><title>Comment 5 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0005"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0005</id><published>2006-06-11T22:02:07Z</published><updated>2006-06-11T22:02:07Z</updated><author><name>Sjoerd Visscher</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>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.</p>
  </div></content></entry><entry><title>Comment 6 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0006"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0006</id><published>2006-06-19T21:20:14Z</published><updated>2006-06-19T21:20:14Z</updated><author><name>Norman Walsh</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>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.</p>
  </div></content></entry><entry><title>Comment 7 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0007"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0007</id><published>2006-06-29T16:24:13Z</published><updated>2006-06-29T16:24:13Z</updated><author><name>Robert Lipe</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Dave mentioned <a rel="nofollow" href="http://www.gpsbabel.org">GPSBabel</a> 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 <a rel="nofollow" href="http://www.gpsbabel.org/htmldoc-development/filter_simplify.html"> simplify</a> filter does something much like your colinear/adjacent filter.
<p>
From the file of "stupid GPSBabel tricks" you could create a style file with the substantive component being
</p><pre>
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"
</pre>

...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.
<pre>
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
</pre><pre>

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...)</pre></div></content></entry><entry><title>Comment 8 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0008"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0008</id><published>2006-06-29T16:29:58Z</published><updated>2006-06-29T16:29:58Z</updated><author><name>Norman Walsh</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>Interesting. I am using gpsbabel now, but I haven't really investigated all its features.</p>
  </div></content></entry><entry><title>Comment 9 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0009"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0009</id><published>2006-07-31T02:27:12Z</published><updated>2006-07-31T02:27:12Z</updated><author><name>MJ</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>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.</p>
  </div></content></entry><entry><title>Comment 10 on /2006/05/25/amherstMA</title><link rel="alternate" type="text/html" href="http://norman.walsh.name/2006/05/25/amherstMA#comment0010"/><id>http://norman.walsh.name/2010/09/25/oauth#comment0010</id><published>2006-07-31T11:23:52Z</published><updated>2006-07-31T11:23:52Z</updated><author><name>Norman Walsh</name><foaf:mbox_sha1sum>da39a3ee5e6b4b0d3255bfef95601890afd80709</foaf:mbox_sha1sum></author><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
    <p>MJ, indeed you're right. Thanks! I wonder how I came to be misinformed?</p>
  </div></content></entry></feed>

