Skip to content

Commit

Permalink
geometries of city furniture assigned to lod1 and 2
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktschwab committed Aug 22, 2023
1 parent fe47ddb commit d833ed8
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import io.rtron.io.messages.Severity
import io.rtron.model.roadspaces.roadspace.objects.RoadspaceObject
import io.rtron.transformer.converter.roadspaces2citygml.Roadspaces2CitygmlParameters
import io.rtron.transformer.converter.roadspaces2citygml.geometry.GeometryTransformer
import io.rtron.transformer.converter.roadspaces2citygml.geometry.populateLod1Geometry
import io.rtron.transformer.converter.roadspaces2citygml.geometry.populateLod1ImplicitGeometry
import io.rtron.transformer.converter.roadspaces2citygml.geometry.populateLod2Geometry
import io.rtron.transformer.converter.roadspaces2citygml.geometry.populateLod3Geometry
import io.rtron.transformer.converter.roadspaces2citygml.transformer.deriveGmlIdentifier
import io.rtron.transformer.messages.roadspaces.of
import org.citygml4j.core.model.cityfurniture.CityFurniture
Expand All @@ -51,14 +51,14 @@ class CityFurnitureModuleBuilder(

roadspaceObject.boundingBoxGeometry.tap { currentBoundingBoxGeometry ->
val geometryTransformer = GeometryTransformer.of(currentBoundingBoxGeometry, parameters)
cityFurnitureFeature.populateLod2Geometry(geometryTransformer)
.mapLeft { messageList += DefaultMessage.of("NoSuitableGeometryForCityFurnitureLod2", it.message, roadspaceObject.id, Severity.WARNING, wasFixed = true) }
cityFurnitureFeature.populateLod1Geometry(geometryTransformer)
.mapLeft { messageList += DefaultMessage.of("NoSuitableGeometryForCityFurnitureLod1", it.message, roadspaceObject.id, Severity.WARNING, wasFixed = true) }
}

roadspaceObject.complexGeometry.tap { currentComplexGeometry ->
val geometryTransformer = GeometryTransformer.of(currentComplexGeometry, parameters)
cityFurnitureFeature.populateLod3Geometry(geometryTransformer)
.onLeft { messageList += DefaultMessage.of("NoSuitableGeometryForCityFurnitureLod3", it.message, roadspaceObject.id, Severity.WARNING, wasFixed = true) }
cityFurnitureFeature.populateLod2Geometry(geometryTransformer)
.onLeft { messageList += DefaultMessage.of("NoSuitableGeometryForCityFurnitureLod2", it.message, roadspaceObject.id, Severity.WARNING, wasFixed = true) }

geometryTransformer.rotation.tap {
attributesAdder.addRotationAttributes(it, cityFurnitureFeature)
Expand Down

0 comments on commit d833ed8

Please sign in to comment.