If you can't read please download the document
Upload
mikelmaron
View
6.298
Download
4
Embed Size (px)
DESCRIPTION
Some of my favorite hacks for the pleasure of your hacking sensibility with the hopeful outcome of illuminating best practices of putting your website on the geoweb and hinting at the means to get exactly what you need. cause I likes the hacks. hacks are rad.
Citation preview
2. Some of my favorite hacks for the pleasure of your hacking
sensibility with the hopeful outcome of illuminating best practices
of putting your website on the geoweb and hinting at the meansto
get exactly what you need. cause I likes the hacks. hacks are rad.
3. Upcoming StreetView 4. Bangladesh Boat Journey 5. geocodr 6.
UNDP Environment Projects 7. Upcoming StreetView 8.
http://googlesightseeing.com/2008/05/07/street-view-sabotage/ 9.
http://gregsadetsky.com/?p=81 10.
http://cbk0.google.com/cbk?output=xml&ll=37.784692,-122.39303
2008 GoogleI-80I-80I-80 11.
http://code.google.com/apis/maps/documentation/reference.html#GStreetviewOverlay
Official StreetView API panoClient = new GStreetviewClient();latlng
= new
GLatLng(37.784692,-122.39303);panoClient.getNearestPanorama(latlng,
showPanoData); function showPanoData(panoData) { if (panoData.code
!= 200) { GLog.write('showPanoData: Server rejected with code: ' +
panoData.code); return; } console.log( panoData.location.latlng );
} 12.
http://cbk0.google.com/cbk?output=tile&zoom=2&y=0&x={0,3}&panoid=j-LK2ptQjG2w0EfQ1-6zMQ
13. Official StreetView API 14.
http://upcoming.yahoo.com/event/461321/ 15.
http://flickr.com/photos/tags/upcoming:event=461321 16.
http://flickr.com/photos/10111/2467558023/ 17. Machine Tags
namespace:predicate=value geobloggers user controlled, just normal
tags structured data geo:lat=37.784692 geo:long=-122.39303
geotagged camel:humpcount=1 loosely coupled lastfm:event=97947
iso:isbn=0713998393
http://www.flickr.com/groups/api/discuss/72157594497877875/
http://adactio.com/journal/1274/ 18. machine_tags (Optional) Aside
from passing in a fully formed machine tag, there is a special
syntax for searching on specific properties : * Find photos using
the 'dc' namespace : "machine_tags" => "dc:" * Find photos with
a title in the 'dc' namespace : "machine_tags" => "dc:title=" *
Find photos titled "mr. camera" in the 'dc' namespace :
"machine_tags" => "dc:title="mr. camera" * Find photos whose
value is "mr. camera" : "machine_tags" => "*:*="mr. camera"" *
Find photos that have a title, in any namespace : "machine_tags"
=> "*:title=" * Find photos that have a title, in any namespace,
whose value is "mr. camera" : "machine_tags" => "*:title="mr.
camera"" * Find photos, in the 'dc' namespace whose value is "mr.
camera" : "machine_tags" => "dc:*="mr. camera"" Multiple machine
tags may be queried by passing a comma-separated list. The number
of machine tags you can pass in a single query depends on the tag
mode (AND or OR) that you are querying with. "AND" queries are
limited to (16) machine tags. "OR" queries are limited to (8).
http://www.flickr.com/services/api/flickr.photos.search.html a hack
all grown up 19. http://upcoming.yahoo.com/place/hCca8XSYA5nn0X1Sfw
20. GeoRSS
http://upcoming.yahoo.com/syndicate/v2/place/hCca8XSYA5nn0X1Sfw
May7, Manifesto SF at The StudMANIFESTO - Leave the boys at home,
this is music for men! Deep house, classic disco. Dance the night
away! David Harness & Cez Every Wed - 9pm to 2am players.
http://upcoming.yahoo.com/event/ 600466
/http://upcoming.yahoo.com/event/600466/
http://upcoming.yahoo.com/event/60046/#comments37.7697-122.42Thu,
07 May 2008 15:50:49 -07002008-05-08T15:50:49-07:00Manifesto
SF2008-05-07T21:00:00Zhttp://upcoming.yahoo.com/venue/16322/http://upcoming.yahoo.com/venue/16322/
The Stud Harrison @ 9 thStreetSan FranciscoCalifornia94103United
Stateshttp://upcoming.yahoo.com/venue/16322/ 21. Proposals
Reference External Geometries Simple Features (for SQL) Multiple
Locations elev floor radius featuretypetag relationshiptag
featurename georss.org Geometries Attributes SimpleGMLRSS 1.0RSS
2.0Atom Flavors RSS formats 22. Reguest Upcoming GeoRSS Feed For
each item, parse out lat, lng, event-id, venue-name With lat/lng,
get panoid from StreetView XML api Request StreetView tiles Post
images to flickr with upcoming:event maching tag Wait for upcoming
squirrels to run Do a little dance 23. #!/usr/bin/ruby require
'rexml/document' include REXML require 'net/http' require 'cgi'
require 'uri' upcomingrss =
"http://upcoming.yahoo.com/syndicate/v2/place/hCca8XSYA5nn0X1Sfw--"
panoxml = "http://cbk0.google.com/cbk?output=xml&ll=" panoimg =
"http://cbk0.google.com/cbk?output=tileamp;zoom=2amp;y=0amp;panoid="
url = URI.parse(upcomingrss) req = Net::HTTP::Get.new(url.path) res
= Net::HTTP.start(url.host, url.port) {|http| http.request(req) }
doc = Document.new( res.body ) XPath.each( doc, "//item/") {
|element| begin lat = XPath.first( element, "geo:lat" ).text lng =
XPath.first( element, "geo:long" ).text venue = XPath.first(
element, ".//xCal:x-calconnect-venue-name" ).text guid =
XPath.first( element, "guid" ).text upid =
/http://upcoming.yahoo.com/event/(.*)//.match(guid)[1] panourl =
URI.parse(panoxml + lat + "," + lng) panoreq =
Net::HTTP::Get.new(panourl.path + "?" + panourl.query) panores =
Net::HTTP.start(panourl.host, panourl.port) {|http|
http.request(panoreq) } panodoc = Document.new( panores.body )
panoid = XPath.first(panodoc,
"//data_properties").attributes["pano_id"] for i in 0..3
system("wget " + panoimg + panoid + "amp;x=" + i.to_s + " -O img/"
+ panoid + ".jpg") tags = "geo:lat=" + lat + " geo:long=" + lng + "
upcoming:event=" + upid system("./flickr.pl img/" + panoid + ".jpg
'" + venue + "' '" + tags + "'") end rescue end } 24.
#!/usr/bin/perl use Flickr::Upload; use Flickr::API; my
$api_key='b78f44c2721ef1f146a6d83eb9559f33';my $api_secret =
'd05b91178ddb026c'; my $api = new Flickr::API( {'key' =>
$api_key,'secret' => $api_secret }, 'perms' => 'write' ); my
$auth_token = '72157600303046027-ce35689cc50c1afc'; my $ua =
Flickr::Upload->new( { 'key' =>$api_key, 'secret' =>
$api_secret } ); $photo_id = $ua->upload( auth_token
=>$auth_token,
photo=>"@ARGV[0]",email=>'[email protected]',
title=>"@ARGV[1]", description=>'', tags =>"@ARGV[2]",
is_public => 1, is_friend => 1, is_family => 1 ) ; 25.
http://upcoming.yahoo.com/event/600466 Studly! 26.
http://www.flickr.com/photos/8721477@N08/ 27. Improvements?
Directionality Undistorted 28. 29. Bangladesh Boat Journey project
led by Dharmafly http://www.bbc.co.uk/worldservice/bangladeshboat/
http://dharmafly.com/ 30.
http://www.flickr.com/photos/mikel_maron/2304719567/ Dharmafly.
Prem melted my brain 31. Hack 1 Easily geotag posts and pics 32.
http://twittervision.com/ 33. http://twitter.com/bangladeshboat 34.
http://microformats.org/wiki/microblogging-nanoformats Nanoformats!
L: o Used to define a location o Example: Good place to visitL:
Place Georges Pompidou, Paris, France o Example2: Good place to
visitL: Place Georges Pompidou, Paris, 75004 o Example3: Good place
to visitL:48.860500,2.352260 o Text Syntax:L: or L:at the end ofa
tweet o Geo Syntax: L: + info: (Section 3.4.2 of RFC2426) 35.
nanoformat parsing engine suite 36. A Model for GeoWeb friendliness
http://dev.opera.com/articles/view/location-based-publishing-and-services/
http://dharmafly.com/blog/bangladeshboat 37. TwitterVision
http://twittervision.com/bangladeshboat 38. Geo Microformats
https://addons.mozilla.org/en-US/firefox/addon/4106 39. hAtom
microformat
The month long BBC Bangladesh boat trip has come to an end, and what a momentous four weeks it's been!