Reclassifying shapefile using ArcGIS Desktop?
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
add a comment |
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
add a comment |
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
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
arcgis-desktop shapefile vector
edited Jan 28 at 21:37
PolyGeo♦
53.5k1780240
53.5k1780240
asked Jan 28 at 16:07
GISnewGISnew
827
827
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
edited Jan 28 at 21:40
PolyGeo♦
53.5k1780240
53.5k1780240
answered Jan 28 at 16:17
jbalkjbalk
4,269729
4,269729
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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