Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mayer
CircularGreenSimCity
Commits
f179f805
Commit
f179f805
authored
8 months ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Adding units.
parent
44ae3e56
master
gPMayer2-master-patch-26512
gPMayer2-master-patch-49202
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
enrich-citygml-with-greenarea/src/main/java/de/hft/stuttgart/citygml/green/osm/TreeKatasterData.java
+5
-4
.../de/hft/stuttgart/citygml/green/osm/TreeKatasterData.java
with
5 additions
and
4 deletions
+5
-4
enrich-citygml-with-greenarea/src/main/java/de/hft/stuttgart/citygml/green/osm/TreeKatasterData.java
+
5
-
4
View file @
f179f805
...
...
@@ -43,7 +43,8 @@ public class TreeKatasterData
Point
p
=
(
Point
)
feature
.
getAttribute
(
"the_geom"
);
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
);
...
...
@@ -54,7 +55,7 @@ public class TreeKatasterData
}
tree
.
setType
(
type
);
Object
treeHeightObject
=
feature
.
getAttribute
(
"Baumhöhe"
);
Object
treeHeightObject
=
feature
.
getAttribute
(
"Baumhöhe"
);
// [m]
if
(
treeHeightObject
==
null
)
{
System
.
out
.
println
(
"Ignoring tree of type "
+
type
+
", no attribute with name \"Baumhöhe\" found"
);
continue
;
...
...
@@ -65,13 +66,13 @@ public class TreeKatasterData
tree
.
setCrownHeight
(
crownHeight
);
tree
.
setTrunkHeight
(
trunkHeight
);
Object
crownWidth
=
feature
.
getAttribute
(
"Kronenbrei"
);
Object
crownWidth
=
feature
.
getAttribute
(
"Kronenbrei"
);
// [m]
if
(
crownWidth
==
null
)
{
System
.
out
.
println
(
"Ignoring tree of type "
+
type
+
", no attribute with name \"Kronenbrei\" found"
);
continue
;
}
tree
.
setCrownRadius
(
Float
.
parseFloat
(
crownWidth
.
toString
())
/
2
);
Object
trunkCirc
=
feature
.
getAttribute
(
"Stammumfan"
);
Object
trunkCirc
=
feature
.
getAttribute
(
"Stammumfan"
);
// [cm]
if
(
trunkCirc
==
null
)
{
System
.
out
.
println
(
"Ignoring tree of type "
+
type
+
", no attribute with name \"Stammumfan\" found"
);
continue
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets