0

Yahoo Placemaker: does inputting latitude, longitude focus results?

I often need to fetch a town for a given (raw) address. Sometimes I also have latitude / longitude fields, which could potentially focus the results outputted by Placemaker.

The reference suggests that latitude / longitude can be used in conjunction with the text inputted.
specifically:
http://developer.yahoo.com/geo/placemaker/...-reference.html states that the 'matchType' output-param indicates if:
type of match (0=text or text and coordinates, 1=coordinates only)

However, when supplying lat/ long as part of the text, I don't see a difference in processing results (I made sure to check on some ambiguous example) .

Question: is there a way to use lat/ long to focus the results that Placemaker outputs?

Thanks,
Britske

3 Replies
  • Britske,

    You can use a WOEID to statistically bias the geo/geo disambiguation process -- we call this a focus, but not in the way you intend:
    http://developer.yahoo.com/geo/placemaker/...e/api_docs.html

    Specifically in regards to your use case: you can pass the address to Placemaker which will return the WOEID of the smallest recognized entity therein (usually the postcode). You can then pass this WOEID to GeoPlanet to extract the town (or any other element) by filtering the hierarchy of that entity.

    Placemaker does not recognize raw coordinates in text, but it will recognize coordinates in structured contexts: microformats and meta tags.

    TB
    0
  • TB,

    could you point me to some documentation as what metatags to include that would recognize the coordinates?
    I could easily transform the plaintext to xml and inlude the coords in a particular tag, but I can't seem to find the xml-format needed.

    Thanks,
    Britske

    QUOTE (TyB @ Jul 1 2009, 02:11 PM) <{POST_SNAPBACK}>
    Britske,

    You can use a WOEID to statistically bias the geo/geo disambiguation process -- we call this a focus, but not in the way you intend:
    http://developer.yahoo.com/geo/placemaker/...e/api_docs.html

    Specifically in regards to your use case: you can pass the address to Placemaker which will return the WOEID of the smallest recognized entity therein (usually the postcode). You can then pass this WOEID to GeoPlanet to extract the town (or any other element) by filtering the hierarchy of that entity.

    Placemaker does not recognize raw coordinates in text, but it will recognize coordinates in structured contexts: microformats and meta tags.

    TB
    0
  • See http://www.w3.org/2003/01/geo/

    These should also work:

    Geo Microformats:
    CODE
         
    <p class="geo">Lat/Lon:
    <span class="latitude">50.827917</span>,
    <span class="longitude">-0.137764</span>
    </p>

    CODE
        
    <div class="geo">
    <abbr class="latitude" title="37.408183">N 37 24.491</abbr>
    <abbr class="longitude" title="-122.13855">W 122 08.313</abbr>
    </div>


    Address Microformats:
    CODE
    <p class="address">
    <span class="street">4 Pear Treet Court</span>
    <span class="city">London</span>
    <span class="country">United Kingdom</span>
    </p>


    HTML Header Meta Tags (ICBM and geo):

    CODE
    <meta name="ICBM" content="50.167958, -97.133185">


    CODE
    <icbm:latitude>60.4780</icbm:latitude>
    <icbm:longitude>-152.4355</icbm:longitude>


    CODE
    <META NAME="geo.position" CONTENT="49.2;-123.4">  //lat, long

    CODE
    <META NAME="geo.placename" CONTENT="London, Ontario">

    CODE
    <META NAME="geo.region" CONTENT="CA-ON"> //ISO 3166-2 country subdivs
    0
This forum is locked.

Recent Posts

in GeoPlanet General Discussion