Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mayer
CircularGreenSimCity
Commits
1ad28056
Commit
1ad28056
authored
Sep 02, 2024
by
Matthias Betz
Browse files
add more logging information
parent
c66b56c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
enrich-citygml-with-greenarea/src/main/java/de/hft/stuttgart/citygml/green/osm/GreenEnricher.java
View file @
1ad28056
...
...
@@ -218,7 +218,7 @@ public class GreenEnricher
WaterBody
wb
=
new
WaterBody
();
org
.
xmlobjects
.
gml
.
model
.
geometry
.
primitives
.
Polygon
poly
=
convertToCityGmlPoly
(
waterArea
.
getArea
());
if
(
poly
==
null
)
{
System
.
out
.
println
(
"Skipping WaterBody "
+
waterArea
.
getArea
());
//
System.out.println("Skipping WaterBody " + waterArea.getArea());
continue
;
}
MultiSurface
ms
=
new
MultiSurface
();
...
...
@@ -233,7 +233,7 @@ public class GreenEnricher
for
(
GreenArea
ga
:
greenAreas
)
{
org
.
xmlobjects
.
gml
.
model
.
geometry
.
primitives
.
Polygon
poly
=
convertToCityGmlPoly
(
ga
.
getArea
());
if
(
poly
==
null
)
{
System
.
out
.
println
(
"Skipping "
+
ga
.
getArea
());
//
System.out.println("Skipping " + ga.getArea());
continue
;
}
PlantCover
cover
=
new
PlantCover
();
...
...
@@ -349,7 +349,7 @@ public class GreenEnricher
GreenArea
area2
=
greenAreas
.
get
(
j
);
if
(
area1
.
getArea
().
intersects
(
area2
.
getArea
()))
{
Geometry
difference
=
area1
.
getArea
().
difference
(
area2
.
getArea
());
System
.
out
.
println
(
difference
);
//
System.out.println(difference);
if
(
difference
instanceof
MultiPolygon
)
{
MultiPolygon
multi
=
(
MultiPolygon
)
difference
;
Polygon
poly1
=
(
Polygon
)
multi
.
getGeometryN
(
0
);
...
...
@@ -840,7 +840,7 @@ public class GreenEnricher
Road
road
=
new
Road
();
org
.
xmlobjects
.
gml
.
model
.
geometry
.
primitives
.
Polygon
poly
=
convertToCityGmlPoly
(
roadArea
.
getArea
());
if
(
poly
==
null
)
{
System
.
out
.
println
(
"Skipping RoadArea: "
+
roadArea
.
getArea
());
//
System.out.println("Skipping RoadArea: " + roadArea.getArea());
continue
;
}
MultiSurface
ms
=
new
MultiSurface
();
...
...
@@ -857,7 +857,7 @@ public class GreenEnricher
LandUse
landUse
=
new
LandUse
();
org
.
xmlobjects
.
gml
.
model
.
geometry
.
primitives
.
Polygon
poly
=
convertToCityGmlPoly
(
landUseArea
.
getArea
());
if
(
poly
==
null
)
{
System
.
out
.
println
(
"Skipping RoadArea: "
+
landUseArea
.
getArea
());
//
System.out.println("Skipping RoadArea: " + landUseArea.getArea());
continue
;
}
MultiSurface
ms
=
new
MultiSurface
();
...
...
enrich-citygml-with-greenarea/src/main/java/de/hft/stuttgart/citygml/green/osm/TreeKatasterData.java
View file @
1ad28056
...
...
@@ -42,13 +42,21 @@ public class TreeKatasterData
Tree
tree
=
new
Tree
();
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\""
);
}
tree
.
setPoint
(
p
);
String
type
=
feature
.
getAttribute
(
"Bezeichnun"
).
toString
();
if
(
type
==
null
)
{
System
.
out
.
println
(
"Ignoring tree, no attribute with name \"Bezeichnun\" found"
);
continue
;
}
tree
.
setType
(
type
);
Object
treeHeightObject
=
feature
.
getAttribute
(
"Baumhöhe"
);
if
(
treeHeightObject
==
null
)
{
System
.
out
.
println
(
"Ignoring tree of type "
+
type
+
", no attribute with name \"Baumhöhe\" found"
);
continue
;
}
double
treeHeight
=
Double
.
parseDouble
(
treeHeightObject
.
toString
());
...
...
@@ -59,11 +67,13 @@ public class TreeKatasterData
Object
crownWidth
=
feature
.
getAttribute
(
"Kronenbrei"
);
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"
);
if
(
trunkCirc
==
null
)
{
System
.
out
.
println
(
"Ignoring tree of type "
+
type
+
", no attribute with name \"Stammumfan\" found"
);
continue
;
}
double
circInCm
=
Double
.
parseDouble
(
trunkCirc
.
toString
());
...
...
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