Commit f95176d1 authored by Riegel's avatar Riegel
Browse files

Fix: Backwards compatibility with CityGML 2.0

parent 82596784
Pipeline #10962 passed with stage
in 1 minute and 26 seconds
...@@ -76,12 +76,18 @@ public class CityFurniture extends CityObject { ...@@ -76,12 +76,18 @@ public class CityFurniture extends CityObject {
case LOD0: case LOD0:
cgmlCityFurniture.setLod0MultiSurface(new MultiSurfaceProperty(ms)); cgmlCityFurniture.setLod0MultiSurface(new MultiSurfaceProperty(ms));
break; break;
case LOD1:
cgmlCityFurniture.getDeprecatedProperties().setLod1Geometry(new MultiSurfaceProperty(ms));
break;
case LOD2: case LOD2:
cgmlCityFurniture.setLod2MultiSurface(new MultiSurfaceProperty(ms)); cgmlCityFurniture.setLod2MultiSurface(new MultiSurfaceProperty(ms));
break; break;
case LOD3: case LOD3:
cgmlCityFurniture.setLod3MultiSurface(new MultiSurfaceProperty(ms)); cgmlCityFurniture.setLod3MultiSurface(new MultiSurfaceProperty(ms));
break; break;
case LOD4:
cgmlCityFurniture.getDeprecatedProperties().setLod4Geometry(new MultiSurfaceProperty(ms));
break;
default: default:
throw new IllegalStateException("Cannot add " + geom.getLod() + " multi surface to buildings"); throw new IllegalStateException("Cannot add " + geom.getLod() + " multi surface to buildings");
} }
...@@ -98,6 +104,8 @@ public class CityFurniture extends CityObject { ...@@ -98,6 +104,8 @@ public class CityFurniture extends CityObject {
case LOD3: case LOD3:
cgmlCityFurniture.setLod3Solid(new SolidProperty(solid)); cgmlCityFurniture.setLod3Solid(new SolidProperty(solid));
break; break;
case LOD4:
cgmlCityFurniture.getDeprecatedProperties().setLod4Geometry(new SolidProperty(solid));
default: default:
throw new IllegalStateException("Cannot add " + geom.getLod() + " solid to buildings"); throw new IllegalStateException("Cannot add " + geom.getLod() + " solid to buildings");
} }
......
...@@ -84,14 +84,20 @@ public class GenericCityObject extends CityObject { ...@@ -84,14 +84,20 @@ public class GenericCityObject extends CityObject {
case LOD0: case LOD0:
cgmlGos.setLod0MultiSurface(new MultiSurfaceProperty(ms)); cgmlGos.setLod0MultiSurface(new MultiSurfaceProperty(ms));
break; break;
case LOD1:
cgmlGos.getDeprecatedProperties().setLod1Geometry(new MultiSurfaceProperty(ms));
break;
case LOD2: case LOD2:
cgmlGos.setLod2MultiSurface(new MultiSurfaceProperty(ms)); cgmlGos.setLod2MultiSurface(new MultiSurfaceProperty(ms));
break; break;
case LOD3: case LOD3:
cgmlGos.setLod3MultiSurface(new MultiSurfaceProperty(ms)); cgmlGos.setLod3MultiSurface(new MultiSurfaceProperty(ms));
break; break;
case LOD4:
cgmlGos.getDeprecatedProperties().setLod4Geometry(new MultiSurfaceProperty(ms));
break;
default: default:
throw new IllegalStateException("Cannot add " + geom.getLod() + " multi surface to buildings"); throw new IllegalStateException("Cannot add " + geom.getLod() + " multi surface to generic city object");
} }
} }
...@@ -106,6 +112,9 @@ public class GenericCityObject extends CityObject { ...@@ -106,6 +112,9 @@ public class GenericCityObject extends CityObject {
case LOD3: case LOD3:
cgmlGos.setLod3Solid(new SolidProperty(solid)); cgmlGos.setLod3Solid(new SolidProperty(solid));
break; break;
case LOD4:
cgmlGos.getDeprecatedProperties().setLod4Geometry(new SolidProperty(solid));
break;
default: default:
throw new IllegalStateException("Cannot add " + geom.getLod() + " solid to buildings"); throw new IllegalStateException("Cannot add " + geom.getLod() + " solid to buildings");
} }
......
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