1

Is there a way in QGIS to import a shapefile that is a variable rate dry fertilizer prescription that has a large number of rates (can be in excess of 50) and reduce the number of rates to less than 10?

For example, rates of 50 to 65 lbs/A can be reduced to 57. Rates of 66 to 80 can be reduced to 74. Rates of 81 to 95 can be reduced to 87. These are just examples, but hopefully it further details what I am trying to do. I want to export the resulting shapefile with the reduced number of rates into the Mapstar software to create a PMH file that can be imported directly into the aircraft for application.

  • You can add a new field, select rate >= 50 and rate <65, calculate new field to 57. After all ranges are calculated, run Dissolve, selecting the new field as the Unique ID parameter. – klewis Jan 27 '17 at 21:56
1

This can be done by Field Calculator.

  1. Select your shapefile layer
  2. Open Attribute Table
  3. Open Field Calculator

Then check Create a new field and give a new field name. (Here I calculated "reduced" value from "fertilizer" value.)

In the Expression Field:

CASE 
WHEN  "fertilizer" < 50 THEN 25
WHEN  "fertilizer" <= 65 THEN 57
WHEN  "fertilizer" <= 80 THEN 74
WHEN  "fertilizer" <= 95 THEN 87
ELSE  "fertilizer"
END

will give you something like image below

enter image description here

Please modify the Expression to fit for your requirement.

enter image description here

NB. This does not affect your shapefile geometry.

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.