"findAddressCandidates" returning different country results

446
4
07-28-2018 11:19 PM
AbdullahAman
New Contributor

Hi,

I am new to ArcGIS and trying to figure how the "findAddressCandidates" works.

I have this end point which lists out results based on category "food" from Canada:

http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?category=fo...

If I change the category to "dentist" then my results are from Mexico?

http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?category=de... 

Just wanted to know how I can get results from Canada, is there something that I am missing?

Also is it possible to confine my results based on a radius?

0 Kudos
4 Replies
JackFairfield
Occasional Contributor II

Look through the documentation:

findAddressCandidates—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers 

There are a few parameters that you could pass to help prevent this issue.

For Example, you could try adding a "countryCode" parameter or you can customize the search extent using the "searchExtent" parameter.

AbdullahAman
New Contributor

Hi Jack,

Thanks for the response and link and sorry for the late reply.  I am working on this part time.  

I have tried various combination, with countryCode, after looking over the API documentation but I am still not able to produce results for dental offices.  For example the following outputs of coffee shops for Markham, Ontario, Canada but if I change the key word "coffee" to "dentist" then results are invalid?

http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?SingleLine=...

The parameter "searchExtent" is an area based on a rectangle or a square.  Is there a way to get results based on a specific radius?  Based on the documentation, proximity searches has a radius 50, 000 meters.  Is there a way to reduce this result to 6000 meters?

My end goal is to be able to get all dental offices on a specific radius (6000 meters) based on a specif point (latitude and longitude).  If there is not possible using the "findAddressCandidates" then can you point me to a direct that I should be looking into?

0 Kudos
JackFairfield
Occasional Contributor II

There is no way to reduce the Location property's radius.  Use searchExtent instead.  I'm not sure what's going on with the results when you include countryCode.

0 Kudos
JohnGrayson
Esri Regular Contributor

Category filtering—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers 

"food" is a Category Level 2 search term which means results of all sub-categories types will be returned.  On the other hand "dentist" is a Category Level 3 term; when using the Level 3 terms I normally also include the Level 2 term. Try specifying "Professional and Other Places" in addition to "dentist":

http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?category=Pr...