place not space; geo without maps
Post on 12-Sep-2014
5.458 views
DESCRIPTION
"Place not Space; Geo without Maps"; presented on October 1st. 2009 at FOWA (Future of Web Applications) London.TRANSCRIPT
![Page 1: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/1.jpg)
Place not Space; Geo without MapsFOWA London, October 2009
Gary Gale, Yahoo! Geo Technologies
![Page 2: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/2.jpg)
PLACES, PEOPLE and THINGS
atibens on Flickr : http://www.flickr.com/photos/atibens/2616899638/
![Page 3: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/3.jpg)
Knowing geographic locations,
and the names of places
Knowing where our users are, and the
places that are important to them
Knowing the geographic context of everything we
index, manage and publish
We ConnectPlaces, People and Things
![Page 4: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/4.jpg)
SOME NUMBERS
Koen Vereeken on Flickr : http://www.flickr.com/photos/koenvereeken/2088902012/
![Page 5: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/5.jpg)
80% of all data contains a geo reference
85% of all data stored is unstructured
This doubles every 3 months
Mr Faber on Flickr : http://www.flickr.com/photos/mrfaber/247946146/
Source: Gartner Group
![Page 6: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/6.jpg)
MINE THAT CONTENT
tj blackwell on Flickr : http://www.flickr.com/photos/tjblackwell/3652375290/
![Page 7: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/7.jpg)
Content / URL
+
=
Places & References
![Page 8: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/8.jpg)
http://www.vicchi.org/speaking
![Page 9: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/9.jpg)
UNLOCK PLACEMAKER
bohman on Flickr : http://www.flickr.com/photos/bohman/210977249/
https://developer.apps.yahoo.com/wsregapp/
![Page 10: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/10.jpg)
http://wherein.yahooapis.com/v1/document
![Page 11: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/11.jpg)
Placemaker Parameters
» appid› 100% mandatory
» inputLanguage› en-US, fr-CA, …
» outputType› XML or RSS
» documentContent› text to geoparse
» documentTitle› optional title
» documentURL› URL to geoparse
» documentType› MIME type of doc
» autoDisambiguate› remove duplicates
» focusWoeid› filter around a WOEID
![Page 12: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/12.jpg)
WOEIDs
stevefaeembra on Flickr : http://www.flickr.com/photos/stevefaeembra/3567750853/
![Page 13: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/13.jpg)
» Unique
» Permanent
» Global
» Language Neutral› London = Londra = Londres = ロンドン› United States = États-Unis = Stati Uniti
= 미국» Ensures that geography can be
employed consistently and globally
straup on Flickr : http://www.flickr.com/photos/straup/3504862388/
![Page 14: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/14.jpg)
GeoPlanetA Global Location Repository
Names + Geometry +TopologyWOEIDs for
• cities and towns• postal codes, airports
• admin regions, time zones• telephone code areas
• marketing areas• points of interest• colloquial areas• neighbourhoods
woodleywonderworks on Flickr : http://www.flickr.com/photos/wwworks/2222523978/
![Page 15: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/15.jpg)
// POST to Placemaker
$ch = curl_init();
define('POSTURL', 'http://wherein.yahooapis.com/v1/document');define('POSTVARS', 'appid='.$key.'&documentContent='.urlencode($content).
'&documentType=text/plain&outputType=xml'.$lang); $ch = curl_init(POSTURL);curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, POSTVARS);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $placemaker = curl_exec($ch);curl_close($ch);
![Page 16: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/16.jpg)
PLACES
that_james on Flickr : http://www.flickr.com/photos/that_james/496797309/
![Page 17: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/17.jpg)
<placeDetails><place><woeId>44418</woeId><type>Town</type><name><![CDATA[London, England, GB]]></name><centroid><latitude>51.5063</latitude><longitude>-0.12714</longitude></centroid></place><matchType>0</matchType><weight>1</weight><confidence>10</confidence></placeDetails>
One place for WOEID 44418
![Page 18: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/18.jpg)
REFERENCES
misterbisson on Flickr : http://www.flickr.com/photos/maisonbisson/117720946/
![Page 19: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/19.jpg)
<reference><woeIds>44418</woeIds><start>1079</start><end>1089</end><isPlaintextMarker>1</isPlaintextMarker><text><![CDATA[London, UK]]></text><type>plaintext</type><xpath><![CDATA[]]></xpath></reference><reference><woeIds>44418</woeIds><start>1116</start><end>1126</end><isPlaintextMarker>1</isPlaintextMarker><text><![CDATA[London, UK]]></text><type>plaintext</type><xpath><![CDATA[]]></xpath></reference>
Two references for WOEID 44418
Two references for WOEID 44418
![Page 20: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/20.jpg)
// turn into an PHP object and loop over the results
$places = simplexml_load_string($placemaker, 'SimpleXMLElement',
LIBXML_NOCDATA); if($places->document->placeDetails){
$foundplaces = array();
// create a hashmap of the places found to mix with// the references found
foreach($places->document->placeDetails as $p){$wkey = 'woeid'.$p->place->woeId;$foundplaces[$wkey]=array(
'name'=>str_replace(', ZZ','',$p->place->name).'', 'type'=>$p->place->type.'', 'woeId'=>$p->place->woeId.'', 'lat'=>$p->place->centroid->latitude.'', 'lon'=>$p->place->centroid->longitude.'’
);}
}
![Page 21: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/21.jpg)
// loop over references and filter out duplicates
$refs = $places->document->referenceList->reference;$usedwoeids = array();foreach($refs as $r){
foreach($r->woeIds as $wi){if(in_array($wi,$usedwoeids)){
continue;} else {
$usedwoeids[] = $wi.'';}$currentloc = $foundplaces["woeid".$wi];if($r->text!='' && $currentloc['name']!='' &&
$currentloc['lat']!='' && $currentloc['lon']!=''){
$text = preg_replace('/\s+/',' ',$r->text);$name = addslashes(str_replace(', ZZ’,
$currentloc['name']));$desc = addslashes($text);$lat = $currentloc['lat'];$lon = $currentloc['lon'];$class = stripslashes($desc)."|$name|$lat|$lon";$placelist.= "<li>".
}}
![Page 22: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/22.jpg)
select * from flickr.photos.info where photo_id in(select id from flickr.photos.search where woe_id=44418)and license=4;
![Page 23: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/23.jpg)
<placeDetails><place><woeId>44418</woeId><type>Town</type><name><![CDATA[London, England, GB]]></name><centroid><latitude>51.5063</latitude><longitude>-0.12714</longitude></centroid></place><matchType>0</matchType><weight>1</weight><confidence>10</confidence></placeDetails>
ragewear on Flickr : http://www.flickr.com/photos/ragewear/3367122893/
![Page 24: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/24.jpg)
http://developer.yahoo.com/yui/
![Page 25: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/25.jpg)
http://developer.yahoo.com/yql/
![Page 26: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/26.jpg)
![Page 27: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/27.jpg)
THE INTERNET IS BROKEN
Nesster on Flickr : http://www.flickr.com/photos/nesster/3168425434/
![Page 28: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/28.jpg)
// load the URL, using YQL to filter the HTML// and fix UTF-8 nasties
$url = 'http://www.vicchi.org/speaking';
$realurl = 'http://query.yahooapis.com/v1/public/yql’.'?q=select%20*%20'.'from%20html%20where%20url%20%3D
%20%22'.urlencode($url).'%22&format=xml';
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $realurl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $c = curl_exec($ch); curl_close($ch);if(strstr($c,'<')){
$c = preg_replace("/.*<results>|<\/results>.*/",'',$c);$c = preg_replace("/<\?xml version=\"1\.0\"".
" encoding=\"UTF-8\"\?>/",'',$c);$c = strip_tags($c);$c = preg_replace("/[\r?\n]+/"," ",$c);
}
![Page 29: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/29.jpg)
MINOR ANNOYANCES
swooshthesnail on Flickr : http://www.flickr.com/photos/swooshthesnail/3281681399/
![Page 30: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/30.jpg)
50,000 BYTES
ASurroca on Flickr : http://www.flickr.com/photos/asurroca/147049402/
![Page 31: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/31.jpg)
NO JSON
X
![Page 32: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/32.jpg)
POST NOT GET
sludgegulper on Flickr : http://www.flickr.com/photos/sludgeulper/2645478209/
![Page 33: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/33.jpg)
WANT TO KNOW MORE?
selva on Flickr : http://www.flickr.com/photos/selva/24604141/
![Page 34: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/34.jpg)
http://github.com/codepo8/PlaceEarth
Earth
http://isithackday.com/hacks/placeearth/
![Page 35: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/35.jpg)
http://developer.yahoo.com/geo/placemaker
![Page 36: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/36.jpg)
http://developer.yahoo.com/geo/geoplanet
![Page 37: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/37.jpg)
http://slideshare.net/vicchi
![Page 38: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/38.jpg)
THANK YOU FOR LISTENING
quinn.anya on Flickr : http://www.flickr.com/photos/quinnanya/3118626057/
![Page 39: Place not Space; Geo without Maps](https://reader033.vdocuments.mx/reader033/viewer/2022061106/5412efd78d7f72314e8b476a/html5/thumbnails/39.jpg)
www.ygeoblog.com
twitter.com/yahoogeo
twitter.com/vicchi