From d6228e86122d807e6c68c323fd257c94f25ab55c Mon Sep 17 00:00:00 2001 From: Jianbo Qi Date: Thu, 25 Apr 2019 19:11:50 +0800 Subject: [PATCH] Fixed bug for LAI Calculation --- .../less/gui/helper/LAICaculatorThread.java | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/java/lessgui/src/less/gui/helper/LAICaculatorThread.java b/java/lessgui/src/less/gui/helper/LAICaculatorThread.java index 7355bb3e..886b520f 100644 --- a/java/lessgui/src/less/gui/helper/LAICaculatorThread.java +++ b/java/lessgui/src/less/gui/helper/LAICaculatorThread.java @@ -149,22 +149,39 @@ private void LAICalculate(){ this.bdConsole.log("INFO: LAI Resolution: "+laiRows+" \u00D7 "+laiCols+" \u00D7 "+laiHeight+" \n"); double width = Double.parseDouble(this.laiController.mwController.sceneXSizeField.getText().replaceAll(",", "")); double height = Double.parseDouble(this.laiController.mwController.sceneYSizeField.getText().replaceAll(",", "")); - //get Z bounding - LSBoundingbox sceneBounds = new LSBoundingbox(); + //get Z height + double Depth = 0; for(Map.Entry> entry: this.laiController.mwController.objectAndPositionMap.entrySet()){ String objName = entry.getKey(); ObservableList positionXYZs = entry.getValue(); LSBoundingbox objBoundingbox = this.laiController.mwController.objectAndBoundingboxMap.get(objName); for(int i=0;i Depth) + Depth = tmp; } } - double Depth = sceneBounds.getHeight(); + + +// LSBoundingbox sceneBounds = new LSBoundingbox(); +// for(Map.Entry> entry: this.laiController.mwController.objectAndPositionMap.entrySet()){ +// String objName = entry.getKey(); +// ObservableList positionXYZs = entry.getValue(); +// LSBoundingbox objBoundingbox = this.laiController.mwController.objectAndBoundingboxMap.get(objName); +// for(int i=0;i