Sponsored Links

Technical Overview: Yahoo's Placemaker Service PDF Print E-mail
Written by Richard Marsden   
Monday, 16 November 2009 08:36

Yahoo's Placemaker™ service is a geo-parsing web service that attempts to identify locations in unstructured and atomic content (eg. news articles and feeds). As such it promises to be a powerful and useful method to geo-locate information that does not have structured geolocation information.

Placemaker is currently a free beta service.

 

The web is full of unstructured information that is geographically relevant but does not have explicit geo-location information. For example, a news story will be relevant to one or more places but rarely has any structured geographic information attached. Placemaker aims to identify places in the supplied unstructured text, and to return this as metadata.

The Placemaker API is RESTful and is accessed using HTTP POST. The text to analyse can be passed as the POST request's document content or using a URL. Other parameters are also supported including the output type (XML, RSS), input language, a search focus (to find locations near a specific place), and the ability to auto-disambiguate (only return the most likely places). Each request also requires an application identifier. These can be requested from Yahoo for free, here.

Placemaker location responses are found using Yahoo's GeoPlanet data.

Although locations have longitude, latitude point coordinates, they can have other information such as location type (eg. "a city"). Rectangular extent information is also provided because most places cover an area and are poorly represented by a single point coordinate. There is also a standardized name, but a place can often be represented by multiple names in both the local language and other languages. These multiple representations are handled in the responses using a "Where-on-Earth ID" (WOEID). WOEIDs are 32 bit numeric identifiers that refer to specific places. For example WOEID 2459115 refers to the city that is known as "New York", "New York City", "NYC" or "the Big Apple".

It should be noted that Placemaker is not a geocoder. WOEIDs are not assigned to individual house numbers or street names. Therefore a street address will only be resolved to the smallest surrounding place - typically a city or post code.

The Yahoo Placemaker documentation includes a number of code examples, but Chris Heilmann has produced a couple of interesting worked examples. The first example is Chris's Yahoo Placemaker Test
at http://isithackday.com/hacks/placemaker/index.php. This simply takes a user-entered URL and feeds it through Placemaker and displays the response. Here is this example's Placemarker PHP implementation:

ERROR [include_code_listing plugin]: File Not Found (/usr/www/users/winwaed/geowebguru/img/2009/placemaker_sample.php)

 

A more complete working application is Chris Heilmann's GeoMaker. Simply enter a URL of a web page or RSS feed to analyse, or the actual text, and click "Get Locations". The result is a Yahoo map that displays the locations that have been found. The page also returns the JavaScript that displays the map, and a microformatted version of the original text. Micro-formatting is an increasingly popular method of adding metadata to conventional HTML using span tags. This is standard XHTML, and the meta data can be easily hidden using CSS. Here are the results for the text "I travelled from Manchester,UK to Dallas Fort Worth via Philadelphia":

Screenshot of GeoMaker

Although not apparent on this screenshot, Placemaker has correctly identified "Dallas Fort Worth" as the airport, whilst "Manchester" and "Philadelphia" are matched with their respective cities.

You do not have to experiment with these demonstrations for very long before you realise that Yahoo's Placemaker could become a very useful part of the geo-web developer's toolkit. The web contains a huge amount of data and most of it has a geographical context but lacks structured geo-location data. Placemaker makes it considerably easier to actually geo-locate this data.

 

Acknowledgments

Thank you Chris Heilmann for permission to re-publish the PHP code behind his Placemaker Test, and for pointing me to the completed GeoMaker application.


Last Updated on Monday, 16 November 2009 08:39