Commit 55b7c505 authored by Riegel's avatar Riegel
Browse files

Fix Tunnel parsing

parent 49846d26
......@@ -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);
......
......@@ -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) {
......
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