10/22/09–Is World Places Locator really as limited as it seems? This question was posted to the ArcGIS Online forums by a user who is in the process of migrating from the old ArcWeb Services ESRI Place Finder Sample to the new World Places Locator available through ArcGIS Online.
We posed the user's questions to Vivek Gupta, a product engineer who specializes in testing many ArcGIS Online map and task services.
Why did ESRI replace the Place Finder service?
The database is more extensive for World Places Locator than the ArcWeb Services locator. The World Places Locator is based on the GeoNames data set and is regularly updated with the latest updates to that data set. Users can contribute to the content of the World Places Locator through updates to GeoNames.
Also, the World Places Locator is a standard ArcGIS Server geocoding service so it can be used through any ArcGIS Server client, including ArcGIS Desktop, ArcGIS Explorer, Web Mapping APIs, and Web ADFs.
Can you specify certain filter criteria as input?
Yes, you can use the value in the candidate fields. Since World Places only has one address input field, you may need to sort your search results for the best match. Do this by appending the input with any of these fields:
Loc_name (Type: esriFieldTypeString, Alias: Loc_name)
Shape (Type: esriFieldTypeGeometry, Alias: Shape)
Score (Type: esriFieldTypeSmallInteger, Alias: Score)
Name (Type: esriFieldTypeString, Alias: Name)
Rank (Type: esriFieldTypeString, Alias: Rank)
Match_addr (Type: esriFieldTypeString, Alias: Match_addr)
Descr (Type: esriFieldTypeString, Alias: Descr)
Latitude (Type: esriFieldTypeString, Alias: Latitude)
Longitude (Type: esriFieldTypeString, Alias: Longitude)
City (Type: esriFieldTypeString, Alias: City)
State (Type: esriFieldTypeString, Alias: State)
State_Abbr (Type: esriFieldTypeString, Alias: State_Abbr)
Country (Type: esriFieldTypeString, Alias: Country)
Cntry_Abbr (Type: esriFieldTypeString, Alias: Cntry_Abbr)
Type (Type: esriFieldTypeString, Alias: Type)
North_Lat (Type: esriFieldTypeString, Alias: North_Lat)
South_Lat (Type: esriFieldTypeString, Alias: South_Lat)
West_Lon (Type: esriFieldTypeString, Alias: West_Lon)
East_Lon (Type: esriFieldTypeString, Alias: East_Lon)
Some examples of filtering:
Let’s say you just want the city San Diego in the results. What you can do is ignore all other results and keep only the record that has the city value as San Diego with this request:
http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Places_World/
GeocodeServer/findAddressCandidates?PlaceName=San+Diego&outFields=City&f=html
View this sample request
This request has multiple results but only one with City as San Diego. Depending on how many records are in the data, you might get multiple results but many fewer than what it actually returns.
You can also filter using the value of the country/county separated by a comma, for example:
http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Places_World/
GeocodeServer/findAddressCandidates?PlaceName=redlands%2Cusa&outFields=city%2Cstate%2Ccountry&f=html
View this sample request
This feature only works for country now and will be supported for county in our next update. When you use this request, the output results will be limited by the search criteria. You will still have to eliminate necessary results by applying filter criteria in your code. In the above example, if I need only Redlands in California then I would filter it by using logic in my client application.
You can also filter the results by extent using client logic. The candidates field to look for in this case are North_Lat, South_Lat, East_Lon, and West_Lon.
Does the World Places Locator have a basic stemming algorithm so that a search for "York" will also find "Yorktown," "Yorkshire," etc?
No, the current algorithm does not work for using wildcards like York to also find Yorktown and Yorkshire.
The result is that I have to post-process the results to remove results outside the US and not of a type I'm interested in (Farms, Mines, etc). But this limits the number of results I can use, so I have to bump up the desired result count higher than I'd like. Just seems wasteful.
Yes, it is true that you may have to do some post-processing to refine your results.
Do you have questions about the ArcGIS Online task services? Start by looking at the topics in ArcGIS Online Help. If you can't find what you are looking for, ask us by posting to the forums.
Contributed by Vivek Gupta of the ArcGIS Content team