Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
fbcd8f92
Commit
fbcd8f92
authored
5 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Add mapping of Room and Furniture objects
parent
2c171abe
master
107-opengl-view
dev
dev_cpp_code_conversion
dev_gui_features
dev_gui_features_zip_loading
3.16.0
archive/dev_gui_features_zip_loading
archive/dev_citygml3
2 merge requests
!11
CityDoctor Release Version 3.16.0
,
!10
CityGML 3.0. Support
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuilding.java
+13
-0
...stuttgart/citydoctor2/datastructure/AbstractBuilding.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractFurniture.java
+20
-9
...tuttgart/citydoctor2/datastructure/AbstractFurniture.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractRoom.java
+9
-45
...hft/stuttgart/citydoctor2/datastructure/AbstractRoom.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeRoomFurniture.java
+5
-8
...ttgart/citydoctor2/datastructure/BridgeRoomFurniture.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingRoom.java
+26
-7
...hft/stuttgart/citydoctor2/datastructure/BuildingRoom.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingRoomFurniture.java
+5
-8
...gart/citydoctor2/datastructure/BuildingRoomFurniture.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
+94
-28
...rt/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
with
172 additions
and
105 deletions
+172
-105
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuilding.java
+
13
-
0
View file @
fbcd8f92
...
...
@@ -57,6 +57,7 @@ public abstract class AbstractBuilding extends CityObject {
private
final
List
<
BoundarySurface
>
boundarySurfaceList
=
new
ArrayList
<>();
private
final
List
<
BuildingRoom
>
buildingRooms
=
new
ArrayList
<>();
private
final
List
<
BuildingRoomFurniture
>
buildingRoomFurnitureList
=
new
ArrayList
<>();
private
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuilding
ab
;
/**
...
...
@@ -286,8 +287,16 @@ public abstract class AbstractBuilding extends CityObject {
public
void
addBuildingRoom
(
BuildingRoom
room
)
{
buildingRooms
.
add
(
room
);
room
.
setParent
(
this
);
}
public
void
addBuildingRoomFurniture
(
BuildingRoomFurniture
roomFurniture
)
{
buildingRoomFurnitureList
.
add
(
roomFurniture
);
roomFurniture
.
setParent
(
this
);
}
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuilding
ab
)
{
this
.
ab
=
ab
;
}
...
...
@@ -300,6 +309,10 @@ public abstract class AbstractBuilding extends CityObject {
return
buildingRooms
;
}
public
List
<
BuildingRoomFurniture
>
getBuildingRoomFurnitureList
()
{
return
buildingRoomFurnitureList
;
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractFurniture.java
+
20
-
9
View file @
fbcd8f92
...
...
@@ -11,6 +11,8 @@ import org.xmlobjects.gml.model.geometry.primitives.Solid;
import
org.xmlobjects.gml.model.geometry.primitives.SolidProperty
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Represents all types of furniture used inside Buildings.
...
...
@@ -20,7 +22,9 @@ public abstract class AbstractFurniture extends CityObject{
@Serial
private
static
final
long
serialVersionUID
=
-
9050689238027190674L
;
private
AbstractRoom
parent
;
private
final
List
<
BoundarySurface
>
boundarySurfaceList
=
new
ArrayList
<>();
private
CityObject
parent
;
private
org
.
citygml4j
.
core
.
model
.
construction
.
AbstractFurniture
af
;
...
...
@@ -29,6 +33,15 @@ public abstract class AbstractFurniture extends CityObject{
return
af
;
}
public
void
addBoundarySurface
(
BoundarySurface
boundarySurface
)
{
boundarySurfaceList
.
add
(
boundarySurface
);
boundarySurface
.
setParent
(
this
);
}
public
List
<
BoundarySurface
>
getBoundarySurfaceList
()
{
return
boundarySurfaceList
;
}
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
...
...
@@ -42,14 +55,12 @@ public abstract class AbstractFurniture extends CityObject{
}
}
public
void
setParent
(
AbstractRoom
room
)
{
if
(
parent
==
null
)
{
parent
=
room
;
}
else
if
(
parent
!=
room
)
{
parent
.
removeFurniture
(
this
);
room
.
addRoomFurniture
(
this
);
parent
=
room
;
}
protected
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
construction
.
AbstractFurniture
af
){
this
.
af
=
af
;
}
public
void
setParent
(
CityObject
co
)
{
parent
=
co
;
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractRoom.java
+
9
-
45
View file @
fbcd8f92
...
...
@@ -7,6 +7,7 @@ import de.hft.stuttgart.citydoctor2.parser.ParserConfiguration;
import
de.hft.stuttgart.citydoctor2.utils.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.construction.AbstractFurnitureProperty
;
import
org.citygml4j.core.model.core.AbstractCityObject
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurface
;
...
...
@@ -27,11 +28,15 @@ public abstract class AbstractRoom extends CityObject{
private
static
final
long
serialVersionUID
=
-
1730625513988944329L
;
private
final
List
<
Installation
>
roomInstallations
=
new
ArrayList
<>(
2
);
private
final
List
<
AbstractFurniture
>
abstractFurnitureList
=
new
ArrayList
<>(
2
);
// Rooms have a Href list of furniture, the actual object is saved in the Building
private
final
List
<
BoundarySurface
>
boundarySurfaceList
=
new
ArrayList
<>();
protected
org
.
citygml4j
.
core
.
model
.
core
.
AbstractUnoccupiedSpace
cgmlRoom
;
@Override
public
void
accept
(
Check
c
)
{
super
.
accept
(
c
);
...
...
@@ -41,9 +46,6 @@ public abstract class AbstractRoom extends CityObject{
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
accept
(
c
);
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
accept
(
c
);
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
accept
(
c
);
}
...
...
@@ -55,9 +57,6 @@ public abstract class AbstractRoom extends CityObject{
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
collectContainedErrors
(
errors
);
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
collectContainedErrors
(
errors
);
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
collectContainedErrors
(
errors
);
}
...
...
@@ -69,9 +68,6 @@ public abstract class AbstractRoom extends CityObject{
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
clearAllContainedCheckResults
();
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
clearAllContainedCheckResults
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
clearAllContainedCheckResults
();
}
...
...
@@ -88,11 +84,6 @@ public abstract class AbstractRoom extends CityObject{
return
true
;
}
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
if
(
abstractFurniture
.
containsError
(
checkIdentifier
)){
return
true
;
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsError
(
checkIdentifier
)){
return
true
;
...
...
@@ -112,11 +103,6 @@ public abstract class AbstractRoom extends CityObject{
return
true
;
}
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
if
(
abstractFurniture
.
containsAnyError
()){
return
true
;
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsAnyError
()){
return
true
;
...
...
@@ -142,9 +128,6 @@ public abstract class AbstractRoom extends CityObject{
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
reCreateGeometries
(
factory
,
config
);
}
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
reCreateGeometries
(
factory
,
config
);
}
}
...
...
@@ -189,9 +172,6 @@ public abstract class AbstractRoom extends CityObject{
cgmlRoom
.
setLod1Solid
(
null
);
cgmlRoom
.
setLod2Solid
(
null
);
cgmlRoom
.
setLod3Solid
(
null
);
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
unsetGmlGeometries
();
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
unsetGmlGeometries
();
}
...
...
@@ -203,9 +183,6 @@ public abstract class AbstractRoom extends CityObject{
@Override
public
void
prepareForChecking
(){
super
.
prepareForChecking
();
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
prepareForChecking
();
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
prepareForChecking
();
}
...
...
@@ -217,9 +194,6 @@ public abstract class AbstractRoom extends CityObject{
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
AbstractFurniture
abstractFurniture
:
abstractFurnitureList
)
{
abstractFurniture
.
clearMetaInformation
();
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
clearMetaInformation
();
}
...
...
@@ -228,22 +202,18 @@ public abstract class AbstractRoom extends CityObject{
}
}
@Override
public
AbstractCityObject
getGmlObject
()
{
return
cgmlRoom
;
}
public
void
removeFurniture
(
AbstractFurniture
furniture
)
{
abstractFurnitureList
.
remove
(
furniture
);
}
public
List
<
Installation
>
getRoomInstallations
()
{
return
roomInstallations
;
}
public
List
<
AbstractFurniture
>
getRoomFurnitureList
()
{
return
abstractFurnitureList
;
}
public
List
<
BoundarySurface
>
getBoundarySurfaceList
()
{
return
boundarySurfaceList
;
...
...
@@ -259,9 +229,7 @@ public abstract class AbstractRoom extends CityObject{
boundarySurface
.
setParent
(
this
);
}
public
void
addRoomFurniture
(
AbstractFurniture
abstractFurniture
)
{
abstractFurnitureList
.
add
(
abstractFurniture
);
}
@Override
public
FeatureType
getFeatureType
()
{
...
...
@@ -272,7 +240,6 @@ public abstract class AbstractRoom extends CityObject{
public
void
collectInstances
(
CopyHandler
handler
){
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
roomInstallations
);
handler
.
addInstance
(
abstractFurnitureList
);
handler
.
addInstance
(
boundarySurfaceList
);
}
...
...
@@ -286,9 +253,6 @@ public abstract class AbstractRoom extends CityObject{
for
(
Installation
originalRi
:
originalAr
.
roomInstallations
)
{
roomInstallations
.
add
(
handler
.
getCopyInstance
(
originalRi
));
}
for
(
AbstractFurniture
originalAb
:
originalAr
.
abstractFurnitureList
)
{
abstractFurnitureList
.
add
(
handler
.
getCopyInstance
(
originalAb
));
}
cgmlRoom
=
originalAr
.
cgmlRoom
;
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeFurniture.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Bridge
Room
Furniture.java
+
5
-
8
View file @
fbcd8f92
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.bridge.BridgeFurniture
;
import
java.io.Serial
;
public
class
BridgeFurniture
extends
AbstractFurniture
{
public
class
Bridge
Room
Furniture
extends
AbstractFurniture
{
@Serial
private
static
final
long
serialVersionUID
=
2450802405053172352L
;
public
BridgeFurniture
(
BridgeRoom
parent
)
{
setParent
(
parent
);
parent
.
addRoomFurniture
(
this
);
public
void
setGmlObject
(
BridgeFurniture
gmlObject
)
{
super
.
setGmlObject
(
gmlObject
);
}
private
BridgeFurniture
(){}
@Override
public
Copyable
createCopyInstance
(){
return
new
BridgeFurniture
();
return
new
Bridge
Room
Furniture
();
}
}
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingRoom.java
+
26
-
7
View file @
fbcd8f92
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.check.Check
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.building.BuildingFurnitureProperty
;
import
org.citygml4j.core.model.construction.AbstractFurnitureProperty
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
BuildingRoom
extends
AbstractRoom
{
@Serial
private
static
final
long
serialVersionUID
=
-
276088332165299253L
;
private
final
List
<
BuildingFurnitureProperty
>
furnitureRefs
=
new
ArrayList
<>(
2
);
private
AbstractBuilding
parent
;
private
BuildingRoom
(){}
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
building
.
BuildingRoom
cgmlRoom
){
super
.
cgmlRoom
=
cgmlRoom
;
}
public
BuildingRoom
(
AbstractBuilding
parent
)
{
public
void
setParent
(
AbstractBuilding
parent
){
this
.
parent
=
parent
;
parent
.
addBuildingRoom
(
this
);
}
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
building
.
BuildingRoom
cgmlRoom
){
super
.
cgmlRoom
=
cgmlRoom
;
public
void
addFurnitureRef
(
BuildingFurnitureProperty
furnitureRef
)
{
furnitureRefs
.
add
(
furnitureRef
);
}
/**
* Returns the list of citygml3 furniture objects registered to this room.
* The reference objects only hold a HRef to the actual furniture object.
* @return
*/
public
List
<
BuildingFurnitureProperty
>
getFurnitureRefs
()
{
return
furnitureRefs
;
}
public
AbstractBuilding
getParent
()
{
return
parent
;
...
...
@@ -32,6 +50,7 @@ public class BuildingRoom extends AbstractRoom{
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
){
super
.
fillValues
(
original
,
handler
);
BuildingRoom
oRoom
=
(
BuildingRoom
)
original
;
parent
=
handler
.
getCopyInstance
(
oRoom
.
getParent
());
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingFurniture.java
→
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Building
Room
Furniture.java
+
5
-
8
View file @
fbcd8f92
...
...
@@ -2,25 +2,22 @@ package de.hft.stuttgart.citydoctor2.datastructure;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.building.BuildingFurniture
;
import
java.io.Serial
;
public
class
BuildingFurniture
extends
AbstractFurniture
{
public
class
Building
Room
Furniture
extends
AbstractFurniture
{
@Serial
private
static
final
long
serialVersionUID
=
-
1046265159354525567L
;
public
BuildingFurniture
(
BuildingRoom
parent
)
{
setParent
(
parent
);
parent
.
addRoomFurniture
(
this
);
public
void
setGmlObject
(
BuildingFurniture
gmlObject
)
{
super
.
setGmlObject
(
gmlObject
);
}
private
BuildingFurniture
(){}
@Override
public
Copyable
createCopyInstance
(){
return
new
BuildingFurniture
();
return
new
Building
Room
Furniture
();
}
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/Citygml3FeatureMapper.java
+
94
-
28
View file @
fbcd8f92
...
...
@@ -24,6 +24,11 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
de.hft.stuttgart.citydoctor2.datastructure.*
;
import
de.hft.stuttgart.citydoctor2.datastructure.AbstractBuilding
;
import
de.hft.stuttgart.citydoctor2.datastructure.Building
;
import
de.hft.stuttgart.citydoctor2.datastructure.BuildingPart
;
import
de.hft.stuttgart.citydoctor2.datastructure.BuildingRoom
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.model.CityGMLVersion
;
...
...
@@ -34,8 +39,8 @@ import org.citygml4j.core.model.bridge.BridgeInstallation;
import
org.citygml4j.core.model.bridge.BridgeInstallationProperty
;
import
org.citygml4j.core.model.bridge.BridgePart
;
import
org.citygml4j.core.model.bridge.BridgePartProperty
;
import
org.citygml4j.core.model.building.
BuildingInstallationProperty
;
import
org.citygml4j.core.model.building.Building
PartProperty
;
import
org.citygml4j.core.model.building.
*
;
import
org.citygml4j.core.model.building.Building
Furniture
;
import
org.citygml4j.core.model.construction.AbstractConstruction
;
import
org.citygml4j.core.model.core.AbstractCityObject
;
import
org.citygml4j.core.model.core.AbstractFeatureWithLifespan
;
...
...
@@ -79,33 +84,9 @@ import org.xmlobjects.gml.model.geometry.primitives.Solid;
import
org.xmlobjects.gml.model.geometry.primitives.SolidProperty
;
import
org.xmlobjects.gml.model.geometry.primitives.SurfaceProperty
;
import
de.hft.stuttgart.citydoctor2.datastructure.AbstractBuilding
;
import
de.hft.stuttgart.citydoctor2.datastructure.BoundarySurface
;
import
de.hft.stuttgart.citydoctor2.datastructure.BridgeConstructiveElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.BridgeObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.BridgeObject.BridgeType
;
import
de.hft.stuttgart.citydoctor2.datastructure.Building
;
import
de.hft.stuttgart.citydoctor2.datastructure.BuildingPart
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.ConcretePolygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.GeometryType
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlId
;
import
de.hft.stuttgart.citydoctor2.datastructure.Installation
;
import
de.hft.stuttgart.citydoctor2.datastructure.LandObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinkedPolygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.Lod
;
import
de.hft.stuttgart.citydoctor2.datastructure.Opening
;
import
de.hft.stuttgart.citydoctor2.datastructure.Polygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.TransportationObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.TransportationObject.TransportationType
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vegetation
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vegetation.VegetationType
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
import
de.hft.stuttgart.citydoctor2.datastructure.WaterObject
;
import
de.hft.stuttgart.citydoctor2.math.graph.KDTree
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.utils.Localization
;
...
...
@@ -498,8 +479,8 @@ public class Citygml3FeatureMapper extends ObjectWalker {
mapAbstractUnoccupiedSpace
(
ts
,
to
);
}
private
void
mapAbstractUnoccupiedSpace
(
AbstractUnoccupiedSpace
aus
,
Transportation
Object
t
o
)
{
mapAbstractPhysicalSpace
(
aus
,
t
o
);
private
void
mapAbstractUnoccupiedSpace
(
AbstractUnoccupiedSpace
aus
,
City
Object
c
o
)
{
mapAbstractPhysicalSpace
(
aus
,
c
o
);
}
private
TransportationObject
parseAuxiliaryTrafficSpace
(
AuxiliaryTrafficSpace
ats
)
{
...
...
@@ -592,6 +573,15 @@ public class Citygml3FeatureMapper extends ObjectWalker {
cdBuilding
.
addBuildingInstallation
(
bi
);
}
for
(
BuildingRoomProperty
brProp
:
gmlAb
.
getBuildingRooms
())
{
var
gmlBr
=
brProp
.
getObject
();
if
(
gmlBr
==
null
)
{
continue
;
}
BuildingRoom
br
=
mapBuildingRoom
(
gmlBr
);
cdBuilding
.
addBuildingRoom
(
br
);
}
SurfaceMapper
surfaceMapper
=
new
SurfaceMapper
(
polygonMap
,
references
,
vertexMap
,
config
);
for
(
AbstractSpaceBoundaryProperty
surfaceProp
:
gmlAb
.
getBoundaries
())
{
if
(!
surfaceProp
.
isSetObject
())
{
...
...
@@ -620,6 +610,82 @@ public class Citygml3FeatureMapper extends ObjectWalker {
}
}
}
for
(
BuildingFurnitureProperty
bfProp
:
gmlAb
.
getBuildingFurniture
()){
var
gmlBf
=
bfProp
.
getObject
();
if
(
gmlBf
==
null
)
{
continue
;
}
BuildingRoomFurniture
bf
=
mapBuildingFurniture
(
gmlBf
);
cdBuilding
.
addBuildingRoomFurniture
(
bf
);
}
}
private
BuildingRoom
mapBuildingRoom
(
org
.
citygml4j
.
core
.
model
.
building
.
BuildingRoom
gmlBr
)
{
BuildingRoom
br
=
new
BuildingRoom
();
br
.
setGmlObject
(
gmlBr
);
mapAbstractUnoccupiedSpace
(
gmlBr
,
br
);
SurfaceMapper
surfaceMapper
=
new
SurfaceMapper
(
polygonMap
,
references
,
vertexMap
,
config
);
for
(
AbstractSpaceBoundaryProperty
surfaceProp
:
gmlBr
.
getBoundaries
())
{
if
(!
surfaceProp
.
isSetObject
())
{
continue
;
}
AbstractSpaceBoundary
surface
=
surfaceProp
.
getObject
();
surface
.
accept
(
surfaceMapper
);
}
for
(
BoundarySurface
bs
:
surfaceMapper
.
getSurfaces
())
{
br
.
addBoundarySurface
(
bs
);
for
(
Geometry
geom
:
bs
.
getGeometries
())
{
for
(
Polygon
p
:
geom
.
getPolygons
())
{
p
.
setPartOfSurface
(
bs
);
}
}
}
for
(
BuildingInstallationProperty
biProp
:
gmlBr
.
getBuildingInstallations
())
{
var
gmlBi
=
biProp
.
getObject
();
if
(
gmlBi
==
null
)
{
// ignore empty properties
continue
;
}
Installation
bi
=
mapBuildingInstallation
(
gmlBi
);
br
.
addRoomInstallation
(
bi
);
}
for
(
BuildingFurnitureProperty
bfProp
:
gmlBr
.
getBuildingFurniture
()){
var
gmlHref
=
bfProp
.
getHref
();
if
(
gmlHref
==
null
)
{
continue
;
}
br
.
addFurnitureRef
(
bfProp
);
}
return
br
;
}
private
BuildingRoomFurniture
mapBuildingFurniture
(
BuildingFurniture
gmlAF
){
BuildingRoomFurniture
bf
=
new
BuildingRoomFurniture
();
bf
.
setGmlObject
(
gmlAF
);
mapAbstractOccupiedSpace
(
gmlAF
,
bf
);
bf
.
unsetGmlGeometries
();
SurfaceMapper
surfaceMapper
=
new
SurfaceMapper
(
polygonMap
,
references
,
vertexMap
,
config
);
for
(
AbstractSpaceBoundaryProperty
surfaceProp
:
gmlAF
.
getBoundaries
())
{
if
(!
surfaceProp
.
isSetObject
())
{
continue
;
}
AbstractSpaceBoundary
surface
=
surfaceProp
.
getObject
();
surface
.
accept
(
surfaceMapper
);
}
for
(
BoundarySurface
bs
:
surfaceMapper
.
getSurfaces
())
{
bf
.
addBoundarySurface
(
bs
);
for
(
Geometry
geom
:
bs
.
getGeometries
())
{
for
(
Polygon
p
:
geom
.
getPolygons
())
{
p
.
setPartOfSurface
(
bs
);
}
}
}
return
bf
;
}
private
void
updatePartOfSurface
(
AbstractBuilding
cdBuilding
,
SurfaceMapper
surfaceMapper
)
{
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets