changeset 3240:e3c70271d50f

issue487 (wrong area calculation). flys-artifacts/trunk@4872 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 04 Jul 2012 06:52:21 +0000
parents fb11bd37ddb8
children da3e58694cae
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jul 04 06:35:47 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jul 04 06:52:21 2012 +0000
@@ -1,3 +1,10 @@
+2012-07-04	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	issue487 (wrong area calculation).
+
+	* src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java:
+	  Fix area calculation.
+
 2012-07-04  Ingo Weinzierl <ingo@intevation.de>
 
 	* doc/conf/themes.xml: Moved theme groups to own XML files to improve the
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java	Wed Jul 04 06:35:47 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java	Wed Jul 04 06:52:21 2012 +0000
@@ -1608,7 +1608,7 @@
         Object[] l_xValues = x_xValues.toArray();
         Object[] l_yValues = x_yValues.toArray();
 
-        double area = calculateArea(l_xValues, l_yValues);
+        double area = calculateArea(l_xValues, l_yValues)/2d;
         if (x_positive) positiveArea += area;
         else            negativeArea += area;
         updateCentroid(l_xValues, l_yValues);

http://dive4elements.wald.intevation.org