Displaying differences for changeset
 
display as  

src/java/m/rhem/rhem02_getclimatestations/V1_0.java

@@ -23,6 +23,7 @@
 import org.codehaus.jettison.json.JSONException;
 import rhem.utils.DBQueries;
 import rhem.utils.DBResources;
+import rhem.utils.RHEMUtils;
 
 /**
  * @version 1.0
@@ -135,12 +136,12 @@
                 innerArray.put(JSONUtils.dataDesc("long", climateStation.getStationLongitude(), "Climate station longitude"));
                 innerArray.put(JSONUtils.dataDesc("year_recorded", climateStation.getYearRecorded(), "Number of years of recorded observations for climate station"));
                 innerArray.put(JSONUtils.dataDesc("elevation_ft", climateStation.getElevation(), "Climate station elevation"));
-                innerArray.put(JSONUtils.dataDesc("avg_yearly_precip_mm", climateStation.getAvgYearlyPrecip(), "300 year average annual precipitation (mm)"));
+                innerArray.put(JSONUtils.dataDesc("avg_yearly_precip_mm", RHEMUtils.roundValues(climateStation.getAvgYearlyPrecip(), 2), "300 year average annual precipitation (mm)"));
                 for (int i = 0; i < 12; i++) {
                     innerArray.put(JSONUtils.dataDesc(listOfMonths[i].substring(0, 3).toLowerCase() + "_precip_mm",
-                            climateStation.getMonthlyPrecip()[i], listOfMonths[i] + " estimated monthly average precipitation (mm)"));
+                            RHEMUtils.roundValues(climateStation.getMonthlyPrecip()[i], 2), listOfMonths[i] + " estimated monthly average precipitation (mm)"));
                 }
-                climateStationArray.put(JSONUtils.dataDesc("mapunit", innerArray, "Mapuint"));
+                climateStationArray.put(JSONUtils.dataDesc("climate_stations", innerArray, "Climate station attributes"));
             }
             putResult("climate_station_list", climateStationArray, "Climate Station List");
         } catch (JSONException ex) {