Loading ...
Sorry, an error occurred while loading the content.

Geocoding returns wrong country

Expand Messages
  • spire_ca
    When I geocode this freeform address using the Placefinder API: q=(address1) (address2) Jasper, ON (postal code) Canada I get a lat/long in Tennessee with a
    Message 1 of 5 , May 28, 2013
    • 0 Attachment
      When I geocode this freeform address using the Placefinder API:

      q=(address1) (address2) Jasper, ON (postal code) Canada

      I get a lat/long in Tennessee with a quality of 87, when the address is clearly in Canada.

      Querying geo.placefinder table via YQL gives me the correct city and province, with a quality of 59.

      Why is the API inaccurate?

      Even when I set the locale of the results to en_CA, the US result is still returned.

      Control Parameters

      flags=JC
      locale=en_CA
      gflags=LQ
      count=1

      Thanks.
    • spire_ca
      Just to add the US result returned is Jasper, TN USA instead of Jasper, Ontario Canada. Is there a way to disambiguate between cities of the same name in
      Message 2 of 5 , May 29, 2013
      • 0 Attachment
        Just to add the US result returned is Jasper, TN USA instead of Jasper, Ontario Canada. Is there a way to disambiguate between cities of the same name in different countries?

        Thanks
      • Rahul Hampole
        You can return country specific results by using the locale parameter E.g. /geo/placefinder?q=Jasper&gflags=LQ&locale=en_CA&count=10 will return Canada results
        Message 3 of 5 , May 29, 2013
        • 0 Attachment
          You can return country specific results by using the locale parameter 

          E.g. /geo/placefinder?q=Jasper&gflags=LQ&locale=en_CA&count=10 will return Canada results only  while /geo/placefinder?q=Jasper&gflags=LQ&locale=en_US&count=10 will return US results

          Hope that helps
          BOSS Team


          From: spire_ca <rgallimore@...>
          Reply-To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
          Date: Wednesday, May 29, 2013 6:35 AM
          To: "ysearchboss@yahoogroups.com" <ysearchboss@yahoogroups.com>
          Subject: [ysearchboss] Re: Geocoding returns wrong country

           



          Just to add the US result returned is Jasper, TN USA instead of Jasper, Ontario Canada. Is there a way to disambiguate between cities of the same name in different countries?

          Thanks

        • spire_ca
          As you can see from my post above, that is exactly what I did. gflags=LQ locale=en_CA count=1 returns the US result. Should it not return a Canadian result?
          Message 4 of 5 , May 29, 2013
          • 0 Attachment
            As you can see from my post above, that is exactly what I did.

            gflags=LQ
            locale=en_CA

            count=1 returns the US result. Should it not return a Canadian result?

            count=10 returns the correct CA results, but now other addresses such as (address) Toronto, ON, (postal code), CA return low quality addresses (39).

            --- In ysearchboss@yahoogroups.com, Rahul Hampole <rhampole@...> wrote:
            >
            > You can return country specific results by using the locale parameter
            >
            > E.g. /geo/placefinder?q=Jasper&gflags=LQ&locale=en_CA&count=10 will return Canada results only while /geo/placefinder?q=Jasper&gflags=LQ&locale=en_US&count=10 will return US results
            >
            > Hope that helps
            > BOSS Team
            >
            >
            > From: spire_ca <rgallimore@...<mailto:rgallimore@...>>
            > Reply-To: "ysearchboss@yahoogroups.com<mailto:ysearchboss@yahoogroups.com>" <ysearchboss@yahoogroups.com<mailto:ysearchboss@yahoogroups.com>>
            > Date: Wednesday, May 29, 2013 6:35 AM
            > To: "ysearchboss@yahoogroups.com<mailto:ysearchboss@yahoogroups.com>" <ysearchboss@yahoogroups.com<mailto:ysearchboss@yahoogroups.com>>
            > Subject: [ysearchboss] Re: Geocoding returns wrong country
            >
            >
            >
            >
            > Just to add the US result returned is Jasper, TN USA instead of Jasper, Ontario Canada. Is there a way to disambiguate between cities of the same name in different countries?
            >
            > Thanks
            >
          • spire_ca
            I found the only way to resolve these issues was to forgo the locale parameter altogether. Even with a locale of en_CA, a Toronto address was mislocated. It
            Message 5 of 5 , May 29, 2013
            • 0 Attachment
              I found the only way to resolve these issues was to forgo the locale parameter altogether.

              Even with a locale of en_CA, a Toronto address was mislocated. It worked using en_US and adding "Canada" to the query.

              Using a count of 1 and locale of en_CA returned a US location for a Canadian address (Jasper, TN instead of Jasper, ON).

              The following params resolved all these issues:

              Include "Canada" in q param.
              flags=JC
              gflags=Q
              count=10

              It appears that some regions have been assigned the wrong locale (ie. Toronto in en_US). By not including the locale, I seem to be getting more accurate results by simply including the country in the location query.


              --- In ysearchboss@yahoogroups.com, "spire_ca" <rgallimore@...> wrote:
              >
              > As you can see from my post above, that is exactly what I did.
              >
              > gflags=LQ
              > locale=en_CA
              >
              > count=1 returns the US result. Should it not return a Canadian result?
              >
              > count=10 returns the correct CA results, but now other addresses such as (address) Toronto, ON, (postal code), CA return low quality addresses (39).
              >
              > --- In ysearchboss@yahoogroups.com, Rahul Hampole <rhampole@> wrote:
              > >
              > > You can return country specific results by using the locale parameter
              > >
              > > E.g. /geo/placefinder?q=Jasper&gflags=LQ&locale=en_CA&count=10 will return Canada results only while /geo/placefinder?q=Jasper&gflags=LQ&locale=en_US&count=10 will return US results
              > >
              > > Hope that helps
              > > BOSS Team
              > >
              > >
              > > From: spire_ca <rgallimore@<mailto:rgallimore@>>
              > > Reply-To: "ysearchboss@yahoogroups.com<mailto:ysearchboss@yahoogroups.com>" <ysearchboss@yahoogroups.com<mailto:ysearchboss@yahoogroups.com>>
              > > Date: Wednesday, May 29, 2013 6:35 AM
              > > To: "ysearchboss@yahoogroups.com<mailto:ysearchboss@yahoogroups.com>" <ysearchboss@yahoogroups.com<mailto:ysearchboss@yahoogroups.com>>
              > > Subject: [ysearchboss] Re: Geocoding returns wrong country
              > >
              > >
              > >
              > >
              > > Just to add the US result returned is Jasper, TN USA instead of Jasper, Ontario Canada. Is there a way to disambiguate between cities of the same name in different countries?
              > >
              > > Thanks
              > >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.