Customize the aliases list in Locator Style Template

943
7
Jump to solution
01-19-2018 03:59 AM
CarlosSousa_Ferreira
New Contributor III

I'm having problems in getting one of my aliases to work in my customized Locator:

I've adapted one of ESRI's Locator Style Templates to my needs. In doing so, I set a bunch of new aliases in the Aliases section inside grammar. Overall, it is working properly, but I'm having trouble in getting any alias with the sequence of characters to work, which is a common in portuguese abbreviations.

I transcribe bellow a part of my Locator Style Template defining aliases for the word "primeiro":

<grammar>
<!-- (...) -->
     <section desc="Aliases">
          <alias_list name="StreetNameAliases">
               <!-- (...) -->
               <alias_def>
                    <alt>primeiro</alt>
                    <alt></alt>
                    <alt>1.º</alt>
               </alias_def>
<!-- (...) -->‍‍‍‍‍‍‍‍‍‍‍

With this definition, the locator successfuly matches the input string "rua 1º de maio" to the address "Rua Primeiro de Maio" (100 matching score), but it gives no matching candidates for the input string "rua 1.º de maio"!!!

I already tried to substitute the . with the &#46; HTML code and several other workarounds and nothing worked.

Any thoughts on what's happening and how to correct it? HELP, these Locator Style Templates are a complete madness...

geocoding‌ geocoding locator‌

0 Kudos
1 Solution

Accepted Solutions
ShanaBritt
Esri Regular Contributor

Carlos:

It's possible that the period is getting stripped off of the input and replaced with a space. Try adding a new alias similar to the one below and see if it works. You may not need the last alias in the example.

          <alias_def>

            <alt>Primeiro Maio</alt>

            <alt>1º Maio</alt>

            <alt>1 º Maio</alt>

            <alt>1 Maio</alt>

            <alt>1. Maio</alt>

          </alias_def>

-Shana

View solution in original post

7 Replies
CarlosSousa_Ferreira
New Contributor III

jborgion‌, I've realized by your posts here in Geonet that you already worked with custom Locator Styles. Have you stumbled upon any issue like this one?

Please help . Thanks

0 Kudos
JoeBorgione
MVP Emeritus

Carlos-  the custom locator styles I have worked with in the past were provided to me by a third party, so I haven't really created my own.  Sorry.

But I'll get a shout out to sbritt-esristaff‌  ; she may be able to provide better insight.

carlosmsf

That should just about do it....
0 Kudos
CarlosSousa_Ferreira
New Contributor III

Thank you.

0 Kudos
ShanaBritt
Esri Regular Contributor

Carlos:

It's possible that the period is getting stripped off of the input and replaced with a space. Try adding a new alias similar to the one below and see if it works. You may not need the last alias in the example.

          <alias_def>

            <alt>Primeiro Maio</alt>

            <alt>1º Maio</alt>

            <alt>1 º Maio</alt>

            <alt>1 Maio</alt>

            <alt>1. Maio</alt>

          </alias_def>

-Shana

CarlosSousa_Ferreira
New Contributor III

Yes! Great, Shana! 100% correct!

I've replaced the dots with spaces in the aliases definition and now it gives 100% match!

Thanks!

JoeBorgione
MVP Emeritus

Half the fun of this forum is being able to provide connections to those who can help out!

That should just about do it....
0 Kudos
ShanaBritt
Esri Regular Contributor

Carlos glad I was able to help.

0 Kudos