0

I'm trying to reclass from the value of field using if then statement. the statement is like this..

enter image description here

In the figure above, what is making the result not work on my ArcGIS?

  • 2
    Welcome to GIS SE! As a new user be sure to take the Tour. For questions that involve code and error messages we ask that you show us them in full using text rather than a picture so that they can be searched and also read easily on all devices. There is an edit button beneath your question which will enable you to do that and a " button for quoting errors and a {} button button that enables you to format any highlighted text nicely. – PolyGeo Sep 12 '17 at 9:56
1

The syntax you have to use with if..then is like this

dim y
if [PR_TBS] <= 100 then
  y = "< 101 Ton" 
elseif [PR_TBS] <= 200 then
  y = "101-200 Ton"
elseif [PR_TBS] <= 300 then
  y = "201-300 Ton"
elseif [PR_TBS] <= 400 then
  y = "301-400 Ton"
else
  y = "> 400 Ton"
end if

You don't need to use "elseif [PR_TBS] > 100 and [PR_TBS] <= 200 then" since any value that doesn't meet the first "if" will be >100.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.