Select to view content in your preferred language

Changing Locator Properties

1256
5
08-17-2011 08:34 AM
DavidBrown6
Emerging Contributor
Hi,

The default minimum candidate score is too high for the Geocode Server I am using. I want to lower this. This seems like it should be easy, how can I accomplish this?

Thanks
0 Kudos
5 Replies
JMcNeil
Deactivated User
rocksolid311,

311 I like there sound favorite song maybe 8:16 a.m. off the grassroots album.  I believe the minimum candidate score and the minimum match score (default minimum candidate score) are set when you create and build the Address Locator in Catalog.  All the properties are set and then served when you publish the resource.  You should be able to stop your geocode service, go into catalog right click your locator change the properties, clear your rest admin cache, then restart your service and it should be good.  Double check the rest endpoint to see if the change has taken affect.

J
0 Kudos
DavidBrown6
Emerging Contributor
Thanks for the reply.

Great song and great album, if only chose that name with the band in mind... haha. The problem, is, that this isn't my geocode server. Is one of the standard ESRI geocoders. So there is no way for me to change it on the server itself. I was wondering if there was a way to programatically override the default setting in silverlight.
0 Kudos
JMcNeil
Deactivated User
David,

I think you can just get the candidate.score and then write a simple if else or something.  If you hit the rest endpoint of that geocoding service and try to search for an address you see it comes back with a score.  Here's a link to the an esri geocodeserver end point...put in an address and search and you will see a score is returned.

http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Streets_US_10/GeocodeServer/findAddre...

Grab that score and compare it to the value you want it to be greater than.

I think you are after a snippet of code like this, which I took from the SDK interactive api here:

http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddressToLocation


   
private void LocatorTask_AddressToLocationsCompleted(object sender, ESRI.ArcGIS.Client.Tasks.AddressToLocationsEventArgs args)
        {
            _candidateGraphicsLayer.ClearGraphics();
            CandidateListBox.Items.Clear();

            List<AddressCandidate> returnedCandidates = args.Results;

            foreach (AddressCandidate candidate in returnedCandidates)
            {
                if (candidate.Score >= 80)
                {
                    CandidateListBox.Items.Add(candidate.Address);

                    Graphic graphic = new Graphic()
                    {
                        Symbol = LayoutRoot.Resources["DefaultMarkerSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol,
                        Geometry = candidate.Location
                    };



Jay
0 Kudos
DavidBrown6
Emerging Contributor
Jay,

The problem isn't me wanting to filter results that are returned from the server after the find. I am already doing that. The problem that I am having is that the server will only provide me with candidates that have a score higher than what the minimum allowable score is set to.

Here is my problem:
1) Go to the Geocode Server your link points to.
2) Type in Civic Sq, Carmel, IN.
3) You won't get any results.

I was thinking that if there was a way to lower the minimum score and thus return more results, I may have found a way to use that same server and be able to enter addresses in without numbers.

Maybe I just need to use Bing's Geocoding Service, but if there is another way to use only ESRI I would prefer that.
0 Kudos
JMcNeil
Deactivated User
David,
Sorry I think you are stuck with the Minimum match score and I don't think you can override it but I've been wrong in the past (many times a day; everyday).  As we discussed in the beginning of this thread I think this is set when the Address Locator is created and if you don't own the address locator/geocoding service then you are at the mercy of the ESRI or whoever owns it. 

If you don't want to use bing I would suggest the serving one or if you don't have those capabilities maybe you can find a different one to consume with a lower score.  By the looks of you address it looks like you are in the State of Indiana? 

I did a quick search for you and couldn't find a geocoding service but in two minutes I did find other public services so maybe with the help of Google and more time you could get your hands on something that is ESRI based

Local universities
http://gis.uits.iu.edu/ArcGIS/rest/services
http://igsmap1.indiana.edu/wmsconnector/com.esri.wms.Esrimap?ServiceName=MAP SERVICE

Or the state, your county or city, or the Department of Transportation, Department of Fish and Game, etc. 

Here's a good link of some of the Maps and GIS Resources in the United States, by State but I know there are more out there.
http://libweb.uoregon.edu/map/map_section/map_Statedatasets.html

Sorry I wasn't more helpful.
Jay
0 Kudos