Reclassifying shapefile using ArcGIS Desktop?












1















So I have a shapefile consisting of 1000 polygon records. I would want to reclassify one field "Value" into a new blank field named "New Value". As an example:



record = 1; value = 25.6
record = 2; value = 35.4
record = 3; value = 14.1
record = 4; value = 44.6
record = 5; value = 8.7
record = 6; value = 2.1
record = 7; value = 10.4
record = 8; value = 18.3
record = 9; value = 30.9
record = 10; value = 28.5


I want all records with records from 0 to 10 as new field with label "rice". Then 11 to 15 as "wheat", 15 to 25 as "corn", and the remaining unclassified records as "others".



To do this with ArcGIS Desktop, do I use the Field Calculator?










share|improve this question





























    1















    So I have a shapefile consisting of 1000 polygon records. I would want to reclassify one field "Value" into a new blank field named "New Value". As an example:



    record = 1; value = 25.6
    record = 2; value = 35.4
    record = 3; value = 14.1
    record = 4; value = 44.6
    record = 5; value = 8.7
    record = 6; value = 2.1
    record = 7; value = 10.4
    record = 8; value = 18.3
    record = 9; value = 30.9
    record = 10; value = 28.5


    I want all records with records from 0 to 10 as new field with label "rice". Then 11 to 15 as "wheat", 15 to 25 as "corn", and the remaining unclassified records as "others".



    To do this with ArcGIS Desktop, do I use the Field Calculator?










    share|improve this question



























      1












      1








      1








      So I have a shapefile consisting of 1000 polygon records. I would want to reclassify one field "Value" into a new blank field named "New Value". As an example:



      record = 1; value = 25.6
      record = 2; value = 35.4
      record = 3; value = 14.1
      record = 4; value = 44.6
      record = 5; value = 8.7
      record = 6; value = 2.1
      record = 7; value = 10.4
      record = 8; value = 18.3
      record = 9; value = 30.9
      record = 10; value = 28.5


      I want all records with records from 0 to 10 as new field with label "rice". Then 11 to 15 as "wheat", 15 to 25 as "corn", and the remaining unclassified records as "others".



      To do this with ArcGIS Desktop, do I use the Field Calculator?










      share|improve this question
















      So I have a shapefile consisting of 1000 polygon records. I would want to reclassify one field "Value" into a new blank field named "New Value". As an example:



      record = 1; value = 25.6
      record = 2; value = 35.4
      record = 3; value = 14.1
      record = 4; value = 44.6
      record = 5; value = 8.7
      record = 6; value = 2.1
      record = 7; value = 10.4
      record = 8; value = 18.3
      record = 9; value = 30.9
      record = 10; value = 28.5


      I want all records with records from 0 to 10 as new field with label "rice". Then 11 to 15 as "wheat", 15 to 25 as "corn", and the remaining unclassified records as "others".



      To do this with ArcGIS Desktop, do I use the Field Calculator?







      arcgis-desktop shapefile vector






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 28 at 21:37









      PolyGeo

      53.5k1780240




      53.5k1780240










      asked Jan 28 at 16:07









      GISnewGISnew

      827




      827






















          1 Answer
          1






          active

          oldest

          votes


















          5














          You will need to build an expression like the one in Writing If-Then Statement in ArcGIS Field Calculator using Python Parser? You need an if, elif, elif, else statement.



          Set your language to Python in the Field Calculator.



          Put this in the code block:



          def rc(f):
          if 10 >= f >= 0:
          return "rice"
          elif 15 >= f >= 11:
          return "wheat"
          elif 25 >= f >= 16:
          return "corn"
          else:
          return "others"


          put this in the expression box:



          rc(ValueField)


          Value field will be the field that holds the values you want to reclassify.






          share|improve this answer

























            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%2f310178%2freclassifying-shapefile-using-arcgis-desktop%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            You will need to build an expression like the one in Writing If-Then Statement in ArcGIS Field Calculator using Python Parser? You need an if, elif, elif, else statement.



            Set your language to Python in the Field Calculator.



            Put this in the code block:



            def rc(f):
            if 10 >= f >= 0:
            return "rice"
            elif 15 >= f >= 11:
            return "wheat"
            elif 25 >= f >= 16:
            return "corn"
            else:
            return "others"


            put this in the expression box:



            rc(ValueField)


            Value field will be the field that holds the values you want to reclassify.






            share|improve this answer






























              5














              You will need to build an expression like the one in Writing If-Then Statement in ArcGIS Field Calculator using Python Parser? You need an if, elif, elif, else statement.



              Set your language to Python in the Field Calculator.



              Put this in the code block:



              def rc(f):
              if 10 >= f >= 0:
              return "rice"
              elif 15 >= f >= 11:
              return "wheat"
              elif 25 >= f >= 16:
              return "corn"
              else:
              return "others"


              put this in the expression box:



              rc(ValueField)


              Value field will be the field that holds the values you want to reclassify.






              share|improve this answer




























                5












                5








                5







                You will need to build an expression like the one in Writing If-Then Statement in ArcGIS Field Calculator using Python Parser? You need an if, elif, elif, else statement.



                Set your language to Python in the Field Calculator.



                Put this in the code block:



                def rc(f):
                if 10 >= f >= 0:
                return "rice"
                elif 15 >= f >= 11:
                return "wheat"
                elif 25 >= f >= 16:
                return "corn"
                else:
                return "others"


                put this in the expression box:



                rc(ValueField)


                Value field will be the field that holds the values you want to reclassify.






                share|improve this answer















                You will need to build an expression like the one in Writing If-Then Statement in ArcGIS Field Calculator using Python Parser? You need an if, elif, elif, else statement.



                Set your language to Python in the Field Calculator.



                Put this in the code block:



                def rc(f):
                if 10 >= f >= 0:
                return "rice"
                elif 15 >= f >= 11:
                return "wheat"
                elif 25 >= f >= 16:
                return "corn"
                else:
                return "others"


                put this in the expression box:



                rc(ValueField)


                Value field will be the field that holds the values you want to reclassify.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 28 at 21:40









                PolyGeo

                53.5k1780240




                53.5k1780240










                answered Jan 28 at 16:17









                jbalkjbalk

                4,269729




                4,269729






























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f310178%2freclassifying-shapefile-using-arcgis-desktop%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 do I know what Microsoft account the skydrive app is syncing to?

                    When does type information flow backwards in C++?

                    Grease: Live!