How to reclassify a shapefile using ArcGIS












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". How would I do this with ArcGIS? Do I use the Field Calculator for this? I appreciate any help.










share|improve this question























  • How familiar are you with Python? Are you comfortable with select by attributes? What have you tried already, and where are you getting stuck?

    – smiller
    2 hours ago













  • @smiller I have used select by attributes before. But I am wondering if it could be done in one step, or should it needs many steps to get what I want. Thanks.

    – GISnew
    2 hours ago
















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". How would I do this with ArcGIS? Do I use the Field Calculator for this? I appreciate any help.










share|improve this question























  • How familiar are you with Python? Are you comfortable with select by attributes? What have you tried already, and where are you getting stuck?

    – smiller
    2 hours ago













  • @smiller I have used select by attributes before. But I am wondering if it could be done in one step, or should it needs many steps to get what I want. Thanks.

    – GISnew
    2 hours ago














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". How would I do this with ArcGIS? Do I use the Field Calculator for this? I appreciate any help.










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". How would I do this with ArcGIS? Do I use the Field Calculator for this? I appreciate any help.







arcgis-desktop shapefile vector






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 hours ago









GISnewGISnew

826




826













  • How familiar are you with Python? Are you comfortable with select by attributes? What have you tried already, and where are you getting stuck?

    – smiller
    2 hours ago













  • @smiller I have used select by attributes before. But I am wondering if it could be done in one step, or should it needs many steps to get what I want. Thanks.

    – GISnew
    2 hours ago



















  • How familiar are you with Python? Are you comfortable with select by attributes? What have you tried already, and where are you getting stuck?

    – smiller
    2 hours ago













  • @smiller I have used select by attributes before. But I am wondering if it could be done in one step, or should it needs many steps to get what I want. Thanks.

    – GISnew
    2 hours ago

















How familiar are you with Python? Are you comfortable with select by attributes? What have you tried already, and where are you getting stuck?

– smiller
2 hours ago







How familiar are you with Python? Are you comfortable with select by attributes? What have you tried already, and where are you getting stuck?

– smiller
2 hours ago















@smiller I have used select by attributes before. But I am wondering if it could be done in one step, or should it needs many steps to get what I want. Thanks.

– GISnew
2 hours ago





@smiller I have used select by attributes before. But I am wondering if it could be done in one step, or should it needs many steps to get what I want. Thanks.

– GISnew
2 hours ago










1 Answer
1






active

oldest

votes


















3














You will need to build an expression like the one in this question/answer. 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


























  • I'm gonna try this. I'd let you know how it goes. Thank you.

    – GISnew
    2 hours ago











  • It worked. Thanks @jbalk. I appreciate the quick help.

    – GISnew
    2 hours ago











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%2fhow-to-reclassify-a-shapefile-using-arcgis%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









3














You will need to build an expression like the one in this question/answer. 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


























  • I'm gonna try this. I'd let you know how it goes. Thank you.

    – GISnew
    2 hours ago











  • It worked. Thanks @jbalk. I appreciate the quick help.

    – GISnew
    2 hours ago
















3














You will need to build an expression like the one in this question/answer. 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


























  • I'm gonna try this. I'd let you know how it goes. Thank you.

    – GISnew
    2 hours ago











  • It worked. Thanks @jbalk. I appreciate the quick help.

    – GISnew
    2 hours ago














3












3








3







You will need to build an expression like the one in this question/answer. 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 this question/answer. 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 2 hours ago

























answered 2 hours ago









jbalkjbalk

4,249728




4,249728













  • I'm gonna try this. I'd let you know how it goes. Thank you.

    – GISnew
    2 hours ago











  • It worked. Thanks @jbalk. I appreciate the quick help.

    – GISnew
    2 hours ago



















  • I'm gonna try this. I'd let you know how it goes. Thank you.

    – GISnew
    2 hours ago











  • It worked. Thanks @jbalk. I appreciate the quick help.

    – GISnew
    2 hours ago

















I'm gonna try this. I'd let you know how it goes. Thank you.

– GISnew
2 hours ago





I'm gonna try this. I'd let you know how it goes. Thank you.

– GISnew
2 hours ago













It worked. Thanks @jbalk. I appreciate the quick help.

– GISnew
2 hours ago





It worked. Thanks @jbalk. I appreciate the quick help.

– GISnew
2 hours ago


















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%2fhow-to-reclassify-a-shapefile-using-arcgis%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

Cáceres

Lexus RX

Plaza Victoria