Commit f179f805 authored by Eric Duminil's avatar Eric Duminil
Browse files

Adding units.

parent 44ae3e56
...@@ -43,7 +43,8 @@ public class TreeKatasterData ...@@ -43,7 +43,8 @@ public class TreeKatasterData
Point p = (Point) feature.getAttribute("the_geom"); Point p = (Point) feature.getAttribute("the_geom");
if (p == null) { if (p == null) {
throw new IllegalArgumentException("The shape file does not contain Point attribute with the name: \"the_geom\""); throw new IllegalArgumentException(
"The shape file does not contain Point attribute with the name: \"the_geom\"");
} }
tree.setPoint(p); tree.setPoint(p);
...@@ -54,7 +55,7 @@ public class TreeKatasterData ...@@ -54,7 +55,7 @@ public class TreeKatasterData
} }
tree.setType(type); tree.setType(type);
Object treeHeightObject = feature.getAttribute("Baumhöhe"); Object treeHeightObject = feature.getAttribute("Baumhöhe"); // [m]
if (treeHeightObject == null) { if (treeHeightObject == null) {
System.out.println("Ignoring tree of type " + type + ", no attribute with name \"Baumhöhe\" found"); System.out.println("Ignoring tree of type " + type + ", no attribute with name \"Baumhöhe\" found");
continue; continue;
...@@ -65,13 +66,13 @@ public class TreeKatasterData ...@@ -65,13 +66,13 @@ public class TreeKatasterData
tree.setCrownHeight(crownHeight); tree.setCrownHeight(crownHeight);
tree.setTrunkHeight(trunkHeight); tree.setTrunkHeight(trunkHeight);
Object crownWidth = feature.getAttribute("Kronenbrei"); Object crownWidth = feature.getAttribute("Kronenbrei"); // [m]
if (crownWidth == null) { if (crownWidth == null) {
System.out.println("Ignoring tree of type " + type + ", no attribute with name \"Kronenbrei\" found"); System.out.println("Ignoring tree of type " + type + ", no attribute with name \"Kronenbrei\" found");
continue; continue;
} }
tree.setCrownRadius(Float.parseFloat(crownWidth.toString()) / 2); tree.setCrownRadius(Float.parseFloat(crownWidth.toString()) / 2);
Object trunkCirc = feature.getAttribute("Stammumfan"); Object trunkCirc = feature.getAttribute("Stammumfan"); // [cm]
if (trunkCirc == null) { if (trunkCirc == null) {
System.out.println("Ignoring tree of type " + type + ", no attribute with name \"Stammumfan\" found"); System.out.println("Ignoring tree of type " + type + ", no attribute with name \"Stammumfan\" found");
continue; continue;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment