Converting full road names to abbreviation using ArcGIS field calculator?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












4














I have a data table with a column 'names' that have street names with street type (Road, Lane, Street etc.). I need to get the names in a format like in column 'new_names'using field calculator in ArcGIS.



How can I do this?



enter image description here










share|improve this question




























    4














    I have a data table with a column 'names' that have street names with street type (Road, Lane, Street etc.). I need to get the names in a format like in column 'new_names'using field calculator in ArcGIS.



    How can I do this?



    enter image description here










    share|improve this question


























      4












      4








      4


      0





      I have a data table with a column 'names' that have street names with street type (Road, Lane, Street etc.). I need to get the names in a format like in column 'new_names'using field calculator in ArcGIS.



      How can I do this?



      enter image description here










      share|improve this question















      I have a data table with a column 'names' that have street names with street type (Road, Lane, Street etc.). I need to get the names in a format like in column 'new_names'using field calculator in ArcGIS.



      How can I do this?



      enter image description here







      arcgis-desktop field-calculator python-parser address dictionary






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 17 at 13:14









      Vince

      14.4k32647




      14.4k32647










      asked Dec 17 at 7:46









      Roman Perkhaliuk

      807




      807




















          3 Answers
          3






          active

          oldest

          votes


















          10














          Use a dictionary and if/else with list comprehension to replace the words:



          Pre-logic:



          def replacename( names, new_names):
          d = 'Lane':'Ln', 'Road':'Rd', 'Street':'St'
          return ' '.join([d[word] if word in d else word for word in names.split()])


          Call with:



          replacename( !names!, !new_names!)


          enter image description here






          share|improve this answer






























            2














            If you only want to use the abbreviations for labelling then you could investigate Using an abbreviation dictionary and the About abbreviating and truncating words page:




            Abbreviation dictionaries allow the Maplex Label Engine to shorten
            long labels to fit within small spaces. When you use an abbreviation
            dictionary, the Maplex Label Engine first attempts to place the full
            text of the label, then abbreviates any words found in the dictionary
            for labels that could not be placed.



            Abbreviation dictionaries are applied to individual label classes. The
            abbreviation is applied to a freestanding word or groups of words, not
            parts of words, with the exception of certain non-English words.
            Individual words, such as Road and Street, can be abbreviated as Rd or
            St, or longer strings, such as Post Office, can be abbreviated as PO.
            Portions of words are not abbreviated. For example, if you have a
            dictionary entry mapping Road as Rd, the label Roadrunner Road is
            abbreviated as Roadrunner Rd, not Rdrunner Rd. Labels containing text
            formatting tags are not abbreviated by the Maplex Label Engine.







            share|improve this answer




















            • Thank you for an answer. Maplex Label Engine - works badly when exporting in Illustrator (that's my stage two).
              – Roman Perkhaliuk
              Dec 17 at 8:23


















            1














            Don't know a way to this through ArcMap whithout using python. But you can do it through excel. Use Table to Excel tool, then in excel use Find and Replace. And in arcmap join the excel back to the original table. If you don't have excel you can export the table to csv using Export Feature Attribute to ASCII tool, and then use OpenOffice.






            share|improve this answer




















            • There's already a python solution and the asker didin't preferred python solution (but the comment is deleted by now).
              – RistoYlem
              Dec 17 at 9:38










            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "79"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f306219%2fconverting-full-road-names-to-abbreviation-using-arcgis-field-calculator%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            10














            Use a dictionary and if/else with list comprehension to replace the words:



            Pre-logic:



            def replacename( names, new_names):
            d = 'Lane':'Ln', 'Road':'Rd', 'Street':'St'
            return ' '.join([d[word] if word in d else word for word in names.split()])


            Call with:



            replacename( !names!, !new_names!)


            enter image description here






            share|improve this answer



























              10














              Use a dictionary and if/else with list comprehension to replace the words:



              Pre-logic:



              def replacename( names, new_names):
              d = 'Lane':'Ln', 'Road':'Rd', 'Street':'St'
              return ' '.join([d[word] if word in d else word for word in names.split()])


              Call with:



              replacename( !names!, !new_names!)


              enter image description here






              share|improve this answer

























                10












                10








                10






                Use a dictionary and if/else with list comprehension to replace the words:



                Pre-logic:



                def replacename( names, new_names):
                d = 'Lane':'Ln', 'Road':'Rd', 'Street':'St'
                return ' '.join([d[word] if word in d else word for word in names.split()])


                Call with:



                replacename( !names!, !new_names!)


                enter image description here






                share|improve this answer














                Use a dictionary and if/else with list comprehension to replace the words:



                Pre-logic:



                def replacename( names, new_names):
                d = 'Lane':'Ln', 'Road':'Rd', 'Street':'St'
                return ' '.join([d[word] if word in d else word for word in names.split()])


                Call with:



                replacename( !names!, !new_names!)


                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 18 at 17:44

























                answered Dec 17 at 7:59









                BERA

                14.5k51940




                14.5k51940























                    2














                    If you only want to use the abbreviations for labelling then you could investigate Using an abbreviation dictionary and the About abbreviating and truncating words page:




                    Abbreviation dictionaries allow the Maplex Label Engine to shorten
                    long labels to fit within small spaces. When you use an abbreviation
                    dictionary, the Maplex Label Engine first attempts to place the full
                    text of the label, then abbreviates any words found in the dictionary
                    for labels that could not be placed.



                    Abbreviation dictionaries are applied to individual label classes. The
                    abbreviation is applied to a freestanding word or groups of words, not
                    parts of words, with the exception of certain non-English words.
                    Individual words, such as Road and Street, can be abbreviated as Rd or
                    St, or longer strings, such as Post Office, can be abbreviated as PO.
                    Portions of words are not abbreviated. For example, if you have a
                    dictionary entry mapping Road as Rd, the label Roadrunner Road is
                    abbreviated as Roadrunner Rd, not Rdrunner Rd. Labels containing text
                    formatting tags are not abbreviated by the Maplex Label Engine.







                    share|improve this answer




















                    • Thank you for an answer. Maplex Label Engine - works badly when exporting in Illustrator (that's my stage two).
                      – Roman Perkhaliuk
                      Dec 17 at 8:23















                    2














                    If you only want to use the abbreviations for labelling then you could investigate Using an abbreviation dictionary and the About abbreviating and truncating words page:




                    Abbreviation dictionaries allow the Maplex Label Engine to shorten
                    long labels to fit within small spaces. When you use an abbreviation
                    dictionary, the Maplex Label Engine first attempts to place the full
                    text of the label, then abbreviates any words found in the dictionary
                    for labels that could not be placed.



                    Abbreviation dictionaries are applied to individual label classes. The
                    abbreviation is applied to a freestanding word or groups of words, not
                    parts of words, with the exception of certain non-English words.
                    Individual words, such as Road and Street, can be abbreviated as Rd or
                    St, or longer strings, such as Post Office, can be abbreviated as PO.
                    Portions of words are not abbreviated. For example, if you have a
                    dictionary entry mapping Road as Rd, the label Roadrunner Road is
                    abbreviated as Roadrunner Rd, not Rdrunner Rd. Labels containing text
                    formatting tags are not abbreviated by the Maplex Label Engine.







                    share|improve this answer




















                    • Thank you for an answer. Maplex Label Engine - works badly when exporting in Illustrator (that's my stage two).
                      – Roman Perkhaliuk
                      Dec 17 at 8:23













                    2












                    2








                    2






                    If you only want to use the abbreviations for labelling then you could investigate Using an abbreviation dictionary and the About abbreviating and truncating words page:




                    Abbreviation dictionaries allow the Maplex Label Engine to shorten
                    long labels to fit within small spaces. When you use an abbreviation
                    dictionary, the Maplex Label Engine first attempts to place the full
                    text of the label, then abbreviates any words found in the dictionary
                    for labels that could not be placed.



                    Abbreviation dictionaries are applied to individual label classes. The
                    abbreviation is applied to a freestanding word or groups of words, not
                    parts of words, with the exception of certain non-English words.
                    Individual words, such as Road and Street, can be abbreviated as Rd or
                    St, or longer strings, such as Post Office, can be abbreviated as PO.
                    Portions of words are not abbreviated. For example, if you have a
                    dictionary entry mapping Road as Rd, the label Roadrunner Road is
                    abbreviated as Roadrunner Rd, not Rdrunner Rd. Labels containing text
                    formatting tags are not abbreviated by the Maplex Label Engine.







                    share|improve this answer












                    If you only want to use the abbreviations for labelling then you could investigate Using an abbreviation dictionary and the About abbreviating and truncating words page:




                    Abbreviation dictionaries allow the Maplex Label Engine to shorten
                    long labels to fit within small spaces. When you use an abbreviation
                    dictionary, the Maplex Label Engine first attempts to place the full
                    text of the label, then abbreviates any words found in the dictionary
                    for labels that could not be placed.



                    Abbreviation dictionaries are applied to individual label classes. The
                    abbreviation is applied to a freestanding word or groups of words, not
                    parts of words, with the exception of certain non-English words.
                    Individual words, such as Road and Street, can be abbreviated as Rd or
                    St, or longer strings, such as Post Office, can be abbreviated as PO.
                    Portions of words are not abbreviated. For example, if you have a
                    dictionary entry mapping Road as Rd, the label Roadrunner Road is
                    abbreviated as Roadrunner Rd, not Rdrunner Rd. Labels containing text
                    formatting tags are not abbreviated by the Maplex Label Engine.








                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 17 at 8:06









                    PolyGeo

                    53.2k1779238




                    53.2k1779238











                    • Thank you for an answer. Maplex Label Engine - works badly when exporting in Illustrator (that's my stage two).
                      – Roman Perkhaliuk
                      Dec 17 at 8:23
















                    • Thank you for an answer. Maplex Label Engine - works badly when exporting in Illustrator (that's my stage two).
                      – Roman Perkhaliuk
                      Dec 17 at 8:23















                    Thank you for an answer. Maplex Label Engine - works badly when exporting in Illustrator (that's my stage two).
                    – Roman Perkhaliuk
                    Dec 17 at 8:23




                    Thank you for an answer. Maplex Label Engine - works badly when exporting in Illustrator (that's my stage two).
                    – Roman Perkhaliuk
                    Dec 17 at 8:23











                    1














                    Don't know a way to this through ArcMap whithout using python. But you can do it through excel. Use Table to Excel tool, then in excel use Find and Replace. And in arcmap join the excel back to the original table. If you don't have excel you can export the table to csv using Export Feature Attribute to ASCII tool, and then use OpenOffice.






                    share|improve this answer




















                    • There's already a python solution and the asker didin't preferred python solution (but the comment is deleted by now).
                      – RistoYlem
                      Dec 17 at 9:38















                    1














                    Don't know a way to this through ArcMap whithout using python. But you can do it through excel. Use Table to Excel tool, then in excel use Find and Replace. And in arcmap join the excel back to the original table. If you don't have excel you can export the table to csv using Export Feature Attribute to ASCII tool, and then use OpenOffice.






                    share|improve this answer




















                    • There's already a python solution and the asker didin't preferred python solution (but the comment is deleted by now).
                      – RistoYlem
                      Dec 17 at 9:38













                    1












                    1








                    1






                    Don't know a way to this through ArcMap whithout using python. But you can do it through excel. Use Table to Excel tool, then in excel use Find and Replace. And in arcmap join the excel back to the original table. If you don't have excel you can export the table to csv using Export Feature Attribute to ASCII tool, and then use OpenOffice.






                    share|improve this answer












                    Don't know a way to this through ArcMap whithout using python. But you can do it through excel. Use Table to Excel tool, then in excel use Find and Replace. And in arcmap join the excel back to the original table. If you don't have excel you can export the table to csv using Export Feature Attribute to ASCII tool, and then use OpenOffice.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 17 at 8:10









                    RistoYlem

                    924




                    924











                    • There's already a python solution and the asker didin't preferred python solution (but the comment is deleted by now).
                      – RistoYlem
                      Dec 17 at 9:38
















                    • There's already a python solution and the asker didin't preferred python solution (but the comment is deleted by now).
                      – RistoYlem
                      Dec 17 at 9:38















                    There's already a python solution and the asker didin't preferred python solution (but the comment is deleted by now).
                    – RistoYlem
                    Dec 17 at 9:38




                    There's already a python solution and the asker didin't preferred python solution (but the comment is deleted by now).
                    – RistoYlem
                    Dec 17 at 9:38

















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f306219%2fconverting-full-road-names-to-abbreviation-using-arcgis-field-calculator%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?