3

I am trying to reclassify a landuse dataset using v.reclass in QGIS but my algoritm seems not to be working. It is a simple reclassification: 1 = 5, 2 = 0, 3 = 10, 4 = 3, 5 = 9, 6 = 4, 7 = 0 Does anyone has any experience using v.reclass or has another idea how to reclassify the data by maybe using another tool.

  • Which is the geometry type of your layer? A point, a line, a polygon? – mgri Apr 12 '17 at 14:26
  • It is a Polygon – LaTradision Apr 12 '17 at 14:34
  • Using Field calculator can be an option? (tedious, though...) – Kazuhito Apr 12 '17 at 14:50
  • Actually, @Kazuhito, a CASE WHEN expression would be very fast to apply and I think it could be a good solution for the issue :) – mgri Apr 12 '17 at 15:15
  • 1
    @mgri and @LaTradision Thank you. I will post expression using CASE WHEN as an example. – Kazuhito Apr 12 '17 at 15:22
5

This is an example (please modify as necessary). "landuse" should be your actual field name of original class.

CASE
WHEN "landuse"  = 1 THEN 5
WHEN "landuse"  = 2 THEN 0
WHEN "landuse"  = 3 THEN 10
WHEN "landuse"  = 4 THEN 3
WHEN "landuse"  = 5 THEN 9
WHEN "landuse"  = 6 THEN 4
WHEN "landuse"  = 7 THEN 0
ELSE NULL
END
| improve this answer | |
  • @Kazuhito, exactly! – mgri Apr 12 '17 at 15:28

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.