TheLeagueOfGentlemen / hackathon-skeleton

2 stars 0 forks source link

Find a location of data for trails in VT #3

Open benglass opened 10 years ago

benglass commented 10 years ago

@eborden @evanrbriggs @briancappello @meddy

Need the find a data source of hiking trails in vermont

Although this is broken: http://vermonttrailsandgreenways.org/trailfinder It is doing an ajax request to http://trailfinder.info/xmlfeed.php?l=2 which seems to contain some pretty good data in an easily parsed format Same feed from the site with a different query string param found by searching for hiking trails http://trailfinder.info/xmlfeed.php?u=7

The trailfinder site is linked from http://www.vermontvacation.com/outdoortrails.aspx which is one of the "data sources" listed so I'm assuming that would count?

Vermont State Parks site provides a kml file for viewing on google earth which ought to have lat/lon and some other info http://www.vtstateparks.com/htm/map.htm

This site has recommendations in text format which might be a nice source for determining what we should consider using as the demo data http://www.greenmountainclub.org/page.php?id=114

eborden commented 10 years ago

Seems like you can get a complete trail dump without any params:

http://trailfinder.info/xmlfeed.php

This is a good find!

eborden commented 10 years ago

Pretty cool, that data also includes trail geo coding meaning we could draw polylines of the trails on the map. In fact I did just that:

<div id="map" style="height: 500px;width:500px">
</div>

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>
<script>

    trail = kmlLatLngToGmap('44.3224631108791,-72.8830204960098 44.3218103063609,-72.881364692217 44.3215042381375,-72.8809957103871 44.3201887075944,-72.8806202059878 44.31922328781,-72.8805527472771 44.  3172504431195,-72.87986716235402 44.317074413935,-72.87980295085902 44.3169015970355,-72.8797470337117 44.3167020854039,-72.8797069721501 44.3163686062144,-72.8797027533459 44.3161163230626,-72.            8799133017727 44.3158555236734,-72.8802214057713 44.3154154183746,-72.8806112705719 44.3152163973738,-72.8807477108877 44.315056747167,-72.8806850522906 44.3148579073155,-72.8804155538114 44.3146590568219,-72.8800953932395 44.3145049041652,-72.8801655346191 44.3143422653869,-72.8805400214203 44.3141823938439,-72.8808403895089 44.3140506964151,-72.8807894933367 44.313865738092,-72.8807308086683 44.            3138266265045,-72.8805824932388 44.3137734907212,-72.8803209728778 44.3137343431583,-72.8801296446558 44.3135327088277,-72.8799968248231 44.3131432311431,-72.8799144908276 44.3129218570885,-72.             8798439943514 44.3126725835497,-72.8795823523044 44.3123281070089,-72.8791760710117 44.3120986043069,-72.8785709876472 44.311835403909,-72.8782468138611 44.3115580948272,-72.87799679139931 44.              31094727931311,-72.8777777139142 44.3105830945896,-72.8775588786664 44.3102526660365,-72.8770669021733 44.3100259550263,-72.8764032435358 44.3098133194789,-72.8757552901533 44.3095080856498,-72.            8751540035241 44.3093798428345,-72.8746803932022 44.30928009470699,-72.8744306318953 44.30915116830084,-72.87411325901543 44.30888600747478,-72.87344780026423 44.30867759356302,-72.87293399955747 44.       30824666830496,-72.87173424940431 44.30794488571161,-72.87089308012885 44.30729452431915,-72.86946272861945 44.30651387521946,-72.86647718778798 44.30597564792083,-72.86443743838255 44.3057270160481,-72.   86228954683412 44.30617884489389,-72.85981348838385 44.30690845883868,-72.85807753565369 44.30757094688529,-72.85688293083979 44.30838164766864,-72.85599953818397 44.31006290270468,-72.85465468499008 44.   3108604571684,-72.85414191948685 44.31195213470092,-72.85313827250378 44.3128294244207,-72.8523271297384 44.31295170458998,-72.85172766796276 44.31315568623925,-72.85020199879406');

    map = new google.maps.Map(document.getElementById('map'), {
          center: trail[trail.length - 1],
          zoom: 13,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        });
    new google.maps.Polyline({
        map: map,
        path: trail
    });

    function kmlLatLngToGmap (data) {
        return data.split(' ').map(function (r) {
            return r.split(',');
        }).map(function (r) {
            return new google.maps.LatLng(r[0], r[1]);
        });
    }
</script>
benglass commented 10 years ago

Does it matter that since this is github all of our conversations are visible? Seems unlikely people are going to look at them but just figured id mentioned it.

This definitely looks like the way to go in terms of our trail data.

eborden commented 10 years ago

I have git-hub pro so I can send things private, but then you guys would only have access if I let you. But I don't think it really matters. I don't expect people to be spying.