Skip to content
Snippets Groups Projects
Commit cef322ed authored by Peter Alexander's avatar Peter Alexander
Browse files

Output yields achieved to LandUse.txt file

parent e1c27fa7
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,8 @@ public class LandUseOutputer extends AbstractLandUseOutputer {
for (CropType crop : CropType.getAllItems()) {
String cropString = crop.getGamsName();
sbHeader.append(" " + cropString + "_A " + cropString + "_FI " + cropString + "_FQ " + cropString + "_II " + cropString + "_IQ "+ cropString + "_OI");
sbHeader.append(" " + cropString + "_A " + cropString + "_FI " + cropString + "_FQ " +
cropString + "_II " + cropString + "_IQ " + cropString + "_OI " + cropString + "_Y");
}
fertWriter.write(sbHeader.toString());
fertWriter.newLine();
......@@ -54,12 +55,11 @@ public class LandUseOutputer extends AbstractLandUseOutputer {
StringBuffer sbData = new StringBuffer(String.format("%.2f %.2f", lat, lon));
sbData.append(String.format(" %.14f", item.getTotalLandCoverArea()));
sbData.append(String.format(" %.14f", item.getProtectedAreaIncMinNatural()));
sbData.append(String.format(" %.8f", item.getTotalLandCoverArea()));
sbData.append(String.format(" %.8f", item.getProtectedAreaIncMinNatural()));
for (LandCoverType cover : LandCoverType.values()) {
sbData.append(String.format(" %.14f", item.getLandCoverArea(cover)));
sbData.append(String.format(" %.8f", item.getLandCoverArea(cover)));
}
for (CropType crop : CropType.getAllItems()) {
......@@ -70,7 +70,8 @@ public class LandUseOutputer extends AbstractLandUseOutputer {
double irrigI = intensity==null ? 0.0 : intensity.getIrrigationIntensity();
double irrigQ = intensity==null ? 0.0 : intensity.getIrrigationRate();
double otherI = intensity==null ? 0.0 : intensity.getOtherIntensity();
sbData.append(String.format(" %.14f %.14f %.14f %.14f %.14f %.14f", cropFract, fertI, fertQ, irrigI, irrigQ, otherI));
double yield = intensity==null ? 0.0 : intensity.getYield();
sbData.append(String.format(" %.8f %.8f %.8f %.8f %.8f %.8f %.8f", cropFract, fertI, fertQ, irrigI, irrigQ, otherI, yield));
}
fertWriter.write(sbData.toString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment