Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
55b7c505
Commit
55b7c505
authored
Oct 31, 2024
by
Riegel
Browse files
Fix Tunnel parsing
parent
49846d26
Changes
2
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
View file @
55b7c505
...
...
@@ -389,25 +389,6 @@ public class Citygml3FeatureMapper extends ObjectWalker {
TunnelHollow
br
=
mapTunnelHollow
(
gmlTh
);
cdTunnel
.
addTunnelHollow
(
br
);
}
SurfaceMapper
surfaceMapper
=
new
SurfaceMapper
(
polygonMap
,
references
,
vertexMap
,
config
);
for
(
AbstractSpaceBoundaryProperty
surfaceProp
:
gmlTunnel
.
getBoundaries
())
{
if
(!
surfaceProp
.
isSetObject
())
{
continue
;
}
AbstractSpaceBoundary
surface
=
surfaceProp
.
getObject
();
surface
.
accept
(
surfaceMapper
);
}
cdTunnel
.
unsetGmlGeometries
();
resolveAndClearReferences
();
updateEdgesAndVertices
(
cdTunnel
);
for
(
BoundarySurface
bs
:
surfaceMapper
.
getSurfaces
())
{
updateEdgesAndVertices
(
bs
);
for
(
Opening
o
:
bs
.
getOpenings
())
{
updateEdgesAndVertices
(
o
);
}
}
for
(
Installation
ti
:
cdTunnel
.
getTunnelInstallations
())
{
updateEdgesAndVertices
(
ti
);
for
(
BoundarySurface
bs
:
ti
.
getBoundarySurfaces
())
{
...
...
@@ -425,6 +406,20 @@ public class Citygml3FeatureMapper extends ObjectWalker {
TunnelFurniture
tf
=
mapTunnelFurniture
(
gmlTf
);
cdTunnel
.
addTunnelFurniture
(
tf
);
}
SurfaceMapper
surfaceMapper
=
new
SurfaceMapper
(
polygonMap
,
references
,
vertexMap
,
config
);
for
(
AbstractSpaceBoundaryProperty
surfaceProp
:
gmlTunnel
.
getBoundaries
())
{
if
(!
surfaceProp
.
isSetObject
())
{
continue
;
}
AbstractSpaceBoundary
surface
=
surfaceProp
.
getObject
();
surface
.
accept
(
surfaceMapper
);
}
cdTunnel
.
unsetGmlGeometries
();
resolveAndClearReferences
();
updateEdgesAndVertices
(
cdTunnel
);
}
private
Installation
mapTunnelInstallation
(
TunnelInstallation
gmlTi
)
{
...
...
@@ -1149,6 +1144,9 @@ public class Citygml3FeatureMapper extends ObjectWalker {
List
<
ConcretePolygon
>
polygons
=
geometryMapper
.
getPolygons
();
for
(
ConcretePolygon
concretePoly
:
polygons
)
{
if
(
concretePoly
instanceof
CompositePolygon
)
{
continue
;
}
geom
.
addPolygon
(
concretePoly
);
if
(
concretePoly
.
hasExistingGmlId
())
{
polygonMap
.
put
(
concretePoly
.
getGmlId
().
getGmlString
(),
concretePoly
);
...
...
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/Renderer.java
View file @
55b7c505
...
...
@@ -1022,6 +1022,28 @@ public class Renderer {
}
public
void
collectTunnelPolygons
(
Set
<
ConcretePolygon
>
polygons
,
AbstractTunnel
at
)
{
addPolygons
(
at
,
polygons
);
for
(
Installation
ti
:
at
.
getTunnelInstallations
())
{
addPolygons
(
ti
,
polygons
);
for
(
BoundarySurface
bs
:
ti
.
getBoundarySurfaces
())
{
addPolygons
(
bs
,
polygons
);
for
(
Opening
o
:
bs
.
getOpenings
())
{
addPolygons
(
o
,
polygons
);
}
}
}
for
(
TunnelHollow
th
:
at
.
getTunnelHollows
())
{
addPolygons
(
th
,
polygons
);
for
(
BoundarySurface
bs
:
th
.
getBoundarySurfaces
())
{
addPolygons
(
bs
,
polygons
);
}
}
for
(
BoundarySurface
bs
:
at
.
getBoundarySurfaces
())
{
addPolygons
(
bs
,
polygons
);
for
(
Opening
o
:
bs
.
getOpenings
())
{
addPolygons
(
o
,
polygons
);
}
}
}
private
void
collectCityFurniture
(
Set
<
ConcretePolygon
>
polygons
,
CityFurniture
cf
)
{
...
...
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