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
845dd0a6
Commit
845dd0a6
authored
May 06, 2025
by
Matthias Betz
Browse files
Merge remote-tracking branch 'remotes/origin/dev' into 111-update-dependencies
parents
8a94994e
ffe66fd4
Pipeline
#11079
passed with stage
in 1 minute and 24 seconds
Changes
162
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/AbstractCheck.java
View file @
845dd0a6
...
...
@@ -22,13 +22,15 @@ import java.util.Collections;
import
java.util.Set
;
/**
* This is an empty implementation for a check. Can be used as a normal visitor
* for the city doctor data model
*
* This class serves as a Parent for non-validating checks that want to use the CheckEngine's Visitor-pattern for the
* implementation of utility functions like e.g. collecting the sub-CityObjects in a Feature.
*
*
* @author Matthias Betz
*
*/
public
class
AbstractCheck
extends
Check
{
public
abstract
class
AbstractCheck
extends
Check
{
@Override
public
Set
<
Requirement
>
appliesToRequirements
()
{
...
...
@@ -50,4 +52,9 @@ public class AbstractCheck extends Check {
return
null
;
}
@Override
public
final
boolean
isValidator
()
{
return
false
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/Check.java
View file @
845dd0a6
...
...
@@ -53,6 +53,7 @@ public abstract class Check {
private
final
List
<
Class
<
Checkable
>>
applicableToClasses
=
new
ArrayList
<>(
2
);
@SuppressWarnings
(
"unchecked"
)
protected
Check
()
{
Method
[]
declaredMethods
=
getClass
().
getDeclaredMethods
();
...
...
@@ -102,6 +103,15 @@ public abstract class Check {
*/
public
abstract
RequirementType
getType
();
/**
* Returns whether this check validates a feature.
*
* @return true if it validates, false otherwise
*/
public
boolean
isValidator
()
{
return
true
;
}
/**
* Checks whether the check can be executed on this checkable, meaning the
* checkable or its content can not have any error of any check dependent on
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/CheckId.java
View file @
845dd0a6
...
...
@@ -57,7 +57,6 @@ public record CheckId(String name) implements Serializable {
public
static
final
CheckId
C_GE_P_ORIENTATION_RINGS_SAME
=
new
CheckId
(
"C_GE_P_ORIENTATION_RINGS_SAME"
);
public
static
final
CheckId
C_SE_POLYGON_WITHOUT_SURFACE
=
new
CheckId
(
"C_SE_POLYGON_WITHOUT_SURFACE"
);
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/Checkable.java
View file @
845dd0a6
...
...
@@ -24,6 +24,13 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
de.hft.stuttgart.citydoctor2.utils.CheckErrorFound
;
import
de.hft.stuttgart.citydoctor2.utils.visitors.CheckableErrorCollector
;
import
de.hft.stuttgart.citydoctor2.utils.visitors.ClearCheckResultsVisitor
;
import
de.hft.stuttgart.citydoctor2.utils.visitors.ClearMetaInformationVisitor
;
import
de.hft.stuttgart.citydoctor2.utils.visitors.ContainsAnyErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.utils.visitors.ContainsErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.utils.visitors.PrepareForCheckingVisitor
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -71,7 +78,9 @@ public abstract class Checkable implements Serializable {
if
(
c
.
canExecute
(
this
))
{
c
.
check
(
this
);
}
setValidated
(
true
);
if
(
c
.
isValidator
())
{
setValidated
(
true
);
}
}
/**
...
...
@@ -81,29 +90,47 @@ public abstract class Checkable implements Serializable {
* @return the GML-ID
*/
public
abstract
GmlId
getGmlId
();
/**
* This should be called before executing a check if low memory consumption
* method has been enabled.
This should c
reate edges and additional meta
* method has been enabled.
C
reate
s
edges and additional meta
* information necessary to perform checks.
*/
public
abstract
void
prepareForChecking
();
public
void
prepareForChecking
()
{
this
.
accept
(
new
PrepareForCheckingVisitor
());
}
/**
* This should be called after checking has been done.
This should r
emove any
* created meta information like edges to free up
additional memory space
* This should be called after checking has been done.
R
emove
s
any
* created meta information like edges to free up
memory.
*/
public
abstract
void
clearMetaInformation
();
public
void
clearMetaInformation
()
{
this
.
accept
(
new
ClearMetaInformationVisitor
());
}
/**
* This method checks if the object or any object contained within this
* checkable has an error. It counts as an error if the result status if the
* given check is <code>DEPENDENCIES_NOT_MET<code>.
*
* @param checkIdentifier the name of the check for which an error is searched
* @return true if an error has been found with the given check
* Checks if the object, or any object in its datastructure, has a specific error or is not fulfilling the dependencies
* of it.
*
* @param checkIdentifier the associated CheckID of this error
* @return true if the error was found, false otherwise
*/
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
try
{
ContainsErrorVisitor
.
checkObject
(
this
,
checkIdentifier
);
}
catch
(
CheckErrorFound
c
)
{
return
true
;
}
return
false
;
}
/**
* Checks if this checkable has an error or is not meeting the dependencies for it.
*
* @param checkIdentifier the associated CheckID of this error
* @return true if the error was found, false otherwise
*/
public
boolean
hasError
(
CheckId
checkIdentifier
)
{
CheckResult
cs
=
getCheckResult
(
checkIdentifier
);
if
(
cs
==
null
)
{
return
false
;
...
...
@@ -133,8 +160,8 @@ public abstract class Checkable implements Serializable {
}
/**
*
* @return all check results f
or
this checkable.
*
* @return all check results
o
f this checkable.
*/
public
Map
<
CheckId
,
CheckResult
>
getAllCheckResults
()
{
return
checkResults
;
...
...
@@ -157,13 +184,11 @@ public abstract class Checkable implements Serializable {
}
/**
* Checks whether this checkable has an error. Dependency errors are not
* considered for this function. This will only check this checkable and not
* traverse any checkables contained in this instance.
* Checks whether this checkable has any error, barring dependency errors.
*
* @return true if it has an error, otherwise false
*/
public
boolean
hasAnyError
()
{
public
boolean
hasAnyError
WithoutDependencies
()
{
for
(
CheckResult
cr
:
checkResults
.
values
())
{
if
(
cr
.
getResultStatus
()
==
ResultStatus
.
ERROR
)
{
return
true
;
...
...
@@ -196,7 +221,7 @@ public abstract class Checkable implements Serializable {
}
/**
* Clears
all errors from
this checkable
* Clears
the checkResults list of
this checkable
.
*/
public
void
clearCheckResults
()
{
setValidated
(
false
);
...
...
@@ -204,16 +229,31 @@ public abstract class Checkable implements Serializable {
}
/**
* Removes all errors from this instance and all contained checkables.
* Clears the checkResults list of this checkable and all child objects in its datastructure.
*/
public
final
void
clearAllContainedCheckResults
()
{
this
.
accept
(
new
ClearCheckResultsVisitor
());
}
/**
* Checks if this checkable contains any error within its datastructure.
*
* @return true if any checkable of this datastructure contains an error, false otherwise
*/
public
abstract
void
clearAllContainedCheckResults
();
public
final
boolean
containsAnyError
()
{
try
{
ContainsAnyErrorVisitor
.
checkObject
(
this
);
}
catch
(
CheckErrorFound
c
)
{
return
true
;
}
return
false
;
}
/**
*
* @return false if the checkable or all checkables contained in this one don't
* have any error.
* Checks if this checkable has any error
* @return true if this checkable has any error, false otherwise
*/
public
boolean
contain
sAnyError
()
{
public
boolean
ha
sAnyError
()
{
for
(
CheckResult
cr
:
checkResults
.
values
())
{
if
(
cr
.
getResultStatus
()
==
ResultStatus
.
ERROR
||
cr
.
getResultStatus
()
==
ResultStatus
.
DEPENDENCIES_NOT_MET
)
{
...
...
@@ -230,6 +270,16 @@ public abstract class Checkable implements Serializable {
* @param errors the collection in which the errors are added.
*/
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
this
.
accept
(
new
CheckableErrorCollector
(
errors
));
}
/**
* Collects all errors from this checkable and adds
* them to the given list. DEPENDENCY_NOT_MET errors are excluded from this.
*
* @param errors the collection in which the errors are added.
*/
public
void
collectErrors
(
List
<
CheckError
>
errors
)
{
for
(
CheckResult
cr
:
checkResults
.
values
())
{
if
(
cr
.
getResultStatus
()
==
ResultStatus
.
ERROR
)
{
errors
.
add
(
cr
.
getError
());
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuilding.java
View file @
845dd0a6
...
...
@@ -19,12 +19,8 @@
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.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
...
...
@@ -83,34 +79,16 @@ public abstract class AbstractBuilding extends CityObject {
ab
.
setLod1Solid
(
null
);
ab
.
setLod2Solid
(
null
);
ab
.
setLod3Solid
(
null
);
ab
.
getDeprecatedProperties
().
setLod4Solid
(
null
);
ab
.
setLod0MultiSurface
(
null
);
ab
.
getDeprecatedProperties
().
setLod1MultiSurface
(
null
);
ab
.
setLod2MultiSurface
(
null
);
ab
.
setLod3MultiSurface
(
null
);
ab
.
getDeprecatedProperties
().
setLod1MultiSurface
(
null
);
ab
.
getDeprecatedProperties
().
setLod4MultiSurface
(
null
);
ab
.
getDeprecatedProperties
().
setLod4Solid
(
null
);
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
unsetGmlGeometries
();
}
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
unsetGmlGeometries
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
unsetGmlGeometries
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
unsetGmlGeometries
();
}
for
(
Storey
storey
:
buildingStoreys
)
{
storey
.
unsetGmlGeometries
();
}
for
(
BuildingUnit
bu
:
buildingUnits
)
{
bu
.
unsetGmlGeometries
();
}
}
@Override
public
void
re
Create
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
re
build
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
...
...
@@ -123,38 +101,21 @@ public abstract class AbstractBuilding extends CityObject {
setSolidAccordingToLod
(
geom
,
solid
);
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
reCreateBoundarySurface
(
factory
,
config
,
bs
);
}
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
reCreateGeometries
(
factory
,
config
);
}
for
(
Storey
storey
:
buildingStoreys
)
{
storey
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BuildingUnit
bu
:
buildingUnits
)
{
bu
.
reCreateGeometries
(
factory
,
config
);
}
removeEmptyBoundarySurfaces
();
}
private
void
reCreateBoundarySurface
(
GeometryFactory
factory
,
ParserConfiguration
config
,
BoundarySurface
bs
)
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
ab
.
getBoundaries
())
{
if
(
bsp
.
getObject
()
!=
null
&&
bsp
.
getObject
()
==
bs
.
getGmlObject
())
{
logger
.
warn
(
"Found empty boundary surface: {}, removing from building"
,
bs
.
getGmlId
());
ab
.
getBoundaries
().
remove
(
bsp
);
break
;
private
void
removeEmptyBoundarySurfaces
()
{
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
ab
.
getBoundaries
())
{
if
(
bsp
.
getObject
()
!=
null
&&
bsp
.
getObject
()
==
bs
.
getGmlObject
())
{
logger
.
warn
(
"Found empty boundary surface: {}, removing from building"
,
bs
.
getGmlId
());
ab
.
getBoundaries
().
remove
(
bsp
);
break
;
}
}
}
return
;
}
bs
.
reCreateGeometries
(
factory
,
config
);
}
private
void
setMultiSurfaceAccordingToLod
(
Geometry
geom
,
MultiSurface
ms
)
{
...
...
@@ -224,130 +185,6 @@ public abstract class AbstractBuilding extends CityObject {
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
collectContainedErrors
(
errors
);
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
collectContainedErrors
(
errors
);
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
collectContainedErrors
(
errors
);
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
collectContainedErrors
(
errors
);
}
for
(
Storey
storey
:
buildingStoreys
)
{
storey
.
collectContainedErrors
(
errors
);
}
for
(
BuildingUnit
bu
:
buildingUnits
)
{
bu
.
collectContainedErrors
(
errors
);
}
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
clearAllContainedCheckResults
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearAllContainedCheckResults
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
clearAllContainedCheckResults
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
clearAllContainedCheckResults
();
}
for
(
Storey
storey
:
buildingStoreys
)
{
storey
.
clearAllContainedCheckResults
();
}
for
(
BuildingUnit
bu
:
buildingUnits
)
{
bu
.
clearAllContainedCheckResults
();
}
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
Installation
bi
:
buildingInstallations
)
{
if
(
bi
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
if
(
br
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
if
(
bfr
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
Storey
storey
:
buildingStoreys
)
{
if
(
storey
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BuildingUnit
bu
:
buildingUnits
)
{
if
(
bu
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
Installation
bi
:
buildingInstallations
)
{
if
(
bi
.
containsAnyError
())
{
return
true
;
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
containsAnyError
())
{
return
true
;
}
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
if
(
br
.
containsAnyError
())
{
return
true
;
}
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
if
(
bfr
.
containsAnyError
())
{
return
true
;
}
}
for
(
Storey
storey
:
buildingStoreys
)
{
if
(
storey
.
containsAnyError
())
{
return
true
;
}
}
for
(
BuildingUnit
bu
:
buildingUnits
)
{
if
(
bu
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
void
setCityGmlBuilding
(
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuilding
ab
)
{
this
.
ab
=
ab
;
}
...
...
@@ -406,86 +243,4 @@ public abstract class AbstractBuilding extends CityObject {
return
buildingUnits
;
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
prepareForChecking
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
prepareForChecking
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
prepareForChecking
();
}
for
(
Storey
storey
:
buildingStoreys
)
{
storey
.
prepareForChecking
();
}
for
(
BuildingUnit
bu
:
buildingUnits
)
{
bu
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
clearMetaInformation
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearMetaInformation
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
clearMetaInformation
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
clearMetaInformation
();
}
for
(
Storey
storey
:
buildingStoreys
)
{
storey
.
clearMetaInformation
();
}
for
(
BuildingUnit
bu
:
buildingUnits
)
{
bu
.
clearMetaInformation
();
}
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
boundarySurfaceList
);
handler
.
addInstance
(
buildingInstallations
);
handler
.
addInstance
(
buildingRooms
);
handler
.
addInstance
(
buildingRoomFurnitureList
);
handler
.
addInstance
(
buildingStoreys
);
handler
.
addInstance
(
buildingUnits
);
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
AbstractBuilding
originalAb
=
(
AbstractBuilding
)
original
;
for
(
BoundarySurface
originalBs
:
originalAb
.
boundarySurfaceList
)
{
boundarySurfaceList
.
add
(
handler
.
getCopyInstance
(
originalBs
));
}
for
(
Installation
originalBi
:
originalAb
.
buildingInstallations
)
{
buildingInstallations
.
add
(
handler
.
getCopyInstance
(
originalBi
));
}
for
(
BuildingRoom
originalBr
:
originalAb
.
buildingRooms
)
{
buildingRooms
.
add
(
handler
.
getCopyInstance
(
originalBr
));
}
for
(
BuildingRoomFurniture
originalBFR
:
originalAb
.
buildingRoomFurnitureList
)
{
buildingRoomFurnitureList
.
add
(
handler
.
getCopyInstance
(
originalBFR
));
}
for
(
Storey
originalBStoreys
:
originalAb
.
buildingStoreys
)
{
buildingStoreys
.
add
(
handler
.
getCopyInstance
(
originalBStoreys
));
}
for
(
BuildingUnit
originalBun
:
originalAb
.
buildingUnits
)
{
buildingUnits
.
add
(
handler
.
getCopyInstance
(
originalBun
));
}
ab
=
originalAb
.
ab
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractBuildingSubdivision.java
View file @
845dd0a6
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.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
...
...
@@ -71,25 +67,13 @@ public abstract class AbstractBuildingSubdivision extends CityObject {
abs
.
setLod1Solid
(
null
);
abs
.
setLod2Solid
(
null
);
abs
.
setLod3Solid
(
null
);
abs
.
setLod0MultiSurface
(
null
);
abs
.
setLod2MultiSurface
(
null
);
abs
.
setLod3MultiSurface
(
null
);
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
unsetGmlGeometries
();
}
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
unsetGmlGeometries
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
unsetGmlGeometries
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
unsetGmlGeometries
();
}
}
@Override
public
void
re
Create
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
re
build
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
...
...
@@ -102,32 +86,21 @@ public abstract class AbstractBuildingSubdivision extends CityObject {
setSolidAccordingToLod
(
geom
,
solid
);
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
reCreateBoundarySurface
(
factory
,
config
,
bs
);
}
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
reCreateGeometries
(
factory
,
config
);
}
removeEmptyBoundarySurfaces
();
}
private
void
reCreateBoundarySurface
(
GeometryFactory
factory
,
ParserConfiguration
config
,
BoundarySurface
bs
)
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
abs
.
getBoundaries
())
{
if
(
bsp
.
getObject
()
!=
null
&&
bsp
.
getObject
()
==
bs
.
getGmlObject
())
{
logger
.
warn
(
"Found empty boundary surface: {}, removing from building"
,
bs
.
getGmlId
());
abs
.
getBoundaries
().
remove
(
bsp
);
break
;
private
void
removeEmptyBoundarySurfaces
()
{
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
abs
.
getBoundaries
())
{
if
(
bsp
.
getObject
()
!=
null
&&
bsp
.
getObject
()
==
bs
.
getGmlObject
())
{
logger
.
warn
(
"Found empty boundary surface: {}, removing from building-subdivision"
,
bs
.
getGmlId
());
abs
.
getBoundaries
().
remove
(
bsp
);
break
;
}
}
}
return
;
}
bs
.
reCreateGeometries
(
factory
,
config
);
}
private
void
setMultiSurfaceAccordingToLod
(
Geometry
geom
,
MultiSurface
ms
)
{
...
...
@@ -182,98 +155,6 @@ public abstract class AbstractBuildingSubdivision extends CityObject {
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
collectContainedErrors
(
errors
);
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
collectContainedErrors
(
errors
);
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
collectContainedErrors
(
errors
);
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
collectContainedErrors
(
errors
);
}
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
clearAllContainedCheckResults
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearAllContainedCheckResults
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
clearAllContainedCheckResults
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
clearAllContainedCheckResults
();
}
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
Installation
bi
:
buildingInstallations
)
{
if
(
bi
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
if
(
br
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
if
(
bfr
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
Installation
bi
:
buildingInstallations
)
{
if
(
bi
.
containsAnyError
())
{
return
true
;
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
containsAnyError
())
{
return
true
;
}
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
if
(
br
.
containsAnyError
())
{
return
true
;
}
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
if
(
bfr
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
void
setCityGmlBuilding
(
org
.
citygml4j
.
core
.
model
.
building
.
AbstractBuildingSubdivision
abs
)
{
this
.
abs
=
abs
;
}
...
...
@@ -315,68 +196,6 @@ public abstract class AbstractBuildingSubdivision extends CityObject {
return
buildingRoomFurnitureList
;
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
prepareForChecking
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
prepareForChecking
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
Installation
bi
:
buildingInstallations
)
{
bi
.
clearMetaInformation
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearMetaInformation
();
}
for
(
BuildingRoom
br
:
buildingRooms
)
{
br
.
clearMetaInformation
();
}
for
(
BuildingRoomFurniture
bfr
:
buildingRoomFurnitureList
)
{
bfr
.
clearMetaInformation
();
}
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
boundarySurfaceList
);
handler
.
addInstance
(
buildingInstallations
);
handler
.
addInstance
(
buildingRooms
);
handler
.
addInstance
(
buildingRoomFurnitureList
);
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
AbstractBuildingSubdivision
originalAbs
=
(
AbstractBuildingSubdivision
)
original
;
for
(
BoundarySurface
originalBs
:
originalAbs
.
boundarySurfaceList
)
{
boundarySurfaceList
.
add
(
handler
.
getCopyInstance
(
originalBs
));
}
for
(
Installation
originalBi
:
originalAbs
.
buildingInstallations
)
{
buildingInstallations
.
add
(
handler
.
getCopyInstance
(
originalBi
));
}
for
(
BuildingRoom
originalBr
:
originalAbs
.
buildingRooms
)
{
buildingRooms
.
add
(
handler
.
getCopyInstance
(
originalBr
));
}
for
(
BuildingRoomFurniture
originalBFR
:
originalAbs
.
buildingRoomFurnitureList
)
{
buildingRoomFurnitureList
.
add
(
handler
.
getCopyInstance
(
originalBFR
));
}
abs
=
originalAbs
.
abs
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractFurniture.java
View file @
845dd0a6
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.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
javafx.scene.paint.Color
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurface
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurfaceProperty
;
...
...
@@ -42,51 +40,6 @@ public abstract class AbstractFurniture extends CityObject {
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
collectContainedErrors
(
errors
);
}
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
clearAllContainedCheckResults
();
}
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
@Override
public
org
.
citygml4j
.
core
.
model
.
construction
.
AbstractFurniture
getGmlObject
()
{
return
af
;
...
...
@@ -94,7 +47,7 @@ public abstract class AbstractFurniture extends CityObject {
@Override
public
CityObject
getTopLevelCityObject
(){
return
parent
;
return
parent
.
getTopLevelCityObject
()
;
}
public
void
addBoundarySurface
(
BoundarySurface
boundarySurface
)
{
...
...
@@ -102,12 +55,12 @@ public abstract class AbstractFurniture extends CityObject {
boundarySurface
.
setParent
(
this
);
}
public
List
<
BoundarySurface
>
getBoundarySurface
List
()
{
public
List
<
BoundarySurface
>
getBoundarySurface
s
()
{
return
boundarySurfaceList
;
}
@Override
public
void
re
Create
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
re
build
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
...
...
@@ -134,6 +87,11 @@ public abstract class AbstractFurniture extends CityObject {
return
parent
;
}
@Override
public
Color
getRenderColor
()
{
return
parent
.
getRenderColor
();
}
@Override
public
void
unsetGmlGeometries
()
{
af
.
setLod0MultiSurface
(
null
);
...
...
@@ -177,32 +135,9 @@ public abstract class AbstractFurniture extends CityObject {
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
clearMetaInformation
();
}
}
@Override
public
FeatureType
getFeatureType
()
{
return
FeatureType
.
FURNITURE
;
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
AbstractFurniture
originalAf
=
(
AbstractFurniture
)
original
;
af
=
originalAf
.
af
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractRoom.java
View file @
845dd0a6
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.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.core.AbstractCityObject
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurface
;
...
...
@@ -27,7 +23,7 @@ public abstract class AbstractRoom extends CityObject {
private
static
final
long
serialVersionUID
=
-
1730625513988944329L
;
private
final
List
<
Installation
>
roomInstallations
=
new
ArrayList
<>(
2
);
// Rooms have a Href list of furniture, the
actual
object
is
saved in the
Building
// Rooms have a Href list of furniture, the
furniture-
object
s are
saved in the
TopLevelFeature
private
final
List
<
BoundarySurface
>
boundarySurfaceList
=
new
ArrayList
<>();
...
...
@@ -50,67 +46,7 @@ public abstract class AbstractRoom extends CityObject {
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
collectContainedErrors
(
errors
);
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
collectContainedErrors
(
errors
);
}
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
clearAllContainedCheckResults
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
clearAllContainedCheckResults
();
}
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
if
(
roomInstallation
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
if
(
roomInstallation
.
containsAnyError
())
{
return
true
;
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
if
(
boundarySurface
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
rebuildGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
...
...
@@ -123,12 +59,6 @@ public abstract class AbstractRoom extends CityObject {
setSolidAccordingToLod
(
geom
,
solid
);
}
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
reCreateGeometries
(
factory
,
config
);
}
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
reCreateGeometries
(
factory
,
config
);
}
}
...
...
@@ -173,37 +103,8 @@ public abstract class AbstractRoom extends CityObject {
cgmlRoom
.
setLod1Solid
(
null
);
cgmlRoom
.
setLod2Solid
(
null
);
cgmlRoom
.
setLod3Solid
(
null
);
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
unsetGmlGeometries
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
unsetGmlGeometries
();
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
prepareForChecking
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
Installation
roomInstallation
:
roomInstallations
)
{
roomInstallation
.
clearMetaInformation
();
}
for
(
BoundarySurface
boundarySurface
:
boundarySurfaceList
)
{
boundarySurface
.
clearMetaInformation
();
}
}
@Override
public
AbstractCityObject
getGmlObject
()
{
return
cgmlRoom
;
...
...
@@ -235,24 +136,4 @@ public abstract class AbstractRoom extends CityObject {
return
FeatureType
.
ROOM
;
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
roomInstallations
);
handler
.
addInstance
(
boundarySurfaceList
);
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
AbstractRoom
originalAr
=
(
AbstractRoom
)
original
;
for
(
BoundarySurface
originalBs
:
originalAr
.
boundarySurfaceList
)
{
boundarySurfaceList
.
add
(
handler
.
getCopyInstance
(
originalBs
));
}
for
(
Installation
originalRi
:
originalAr
.
roomInstallations
)
{
roomInstallations
.
add
(
handler
.
getCopyInstance
(
originalRi
));
}
cgmlRoom
=
originalAr
.
cgmlRoom
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/AbstractTunnel.java
View file @
845dd0a6
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.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
javafx.scene.paint.Color
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
...
...
@@ -54,39 +51,27 @@ public abstract class AbstractTunnel extends CityObject {
return
FeatureType
.
TUNNEL
;
}
@Override
public
Color
getRenderColor
()
{
return
Color
.
SLATEGRAY
;
}
@Override
public
void
unsetGmlGeometries
()
{
at
.
setLod1Solid
(
null
);
at
.
setLod2Solid
(
null
);
at
.
setLod3Solid
(
null
);
at
.
getDeprecatedProperties
().
setLod4Solid
(
null
);
at
.
setLod0MultiSurface
(
null
);
at
.
getDeprecatedProperties
().
setLod1MultiSurface
(
null
);
at
.
setLod2MultiSurface
(
null
);
at
.
setLod3MultiSurface
(
null
);
at
.
getDeprecatedProperties
().
setLod1MultiSurface
(
null
);
at
.
getDeprecatedProperties
().
setLod4MultiSurface
(
null
);
at
.
getDeprecatedProperties
().
setLod4Solid
(
null
);
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
unsetGmlGeometries
();
}
for
(
Installation
bi
:
tunnelInstallations
)
{
bi
.
unsetGmlGeometries
();
}
for
(
TunnelHollow
th
:
tunnelHollows
)
{
th
.
unsetGmlGeometries
();
}
for
(
TunnelFurniture
tfr
:
tunnelFurnitureList
)
{
tfr
.
unsetGmlGeometries
();
}
for
(
TunnelConstructiveElement
te
:
tunnelConstructiveElements
)
{
te
.
unsetGmlGeometries
();
}
for
(
TunnelPart
tp
:
tunnelParts
)
{
tp
.
unsetGmlGeometries
();
}
}
@Override
public
void
re
Create
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
re
build
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
...
...
@@ -99,38 +84,21 @@ public abstract class AbstractTunnel extends CityObject {
setSolidAccordingToLod
(
geom
,
solid
);
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
reCreateBoundarySurface
(
factory
,
config
,
bs
);
}
for
(
Installation
bi
:
tunnelInstallations
)
{
bi
.
reCreateGeometries
(
factory
,
config
);
}
for
(
TunnelHollow
th
:
tunnelHollows
)
{
th
.
reCreateGeometries
(
factory
,
config
);
}
for
(
TunnelFurniture
tfr
:
tunnelFurnitureList
)
{
tfr
.
reCreateGeometries
(
factory
,
config
);
}
for
(
TunnelConstructiveElement
te
:
tunnelConstructiveElements
)
{
te
.
reCreateGeometries
(
factory
,
config
);
}
for
(
TunnelPart
tp
:
tunnelParts
)
{
tp
.
reCreateGeometries
(
factory
,
config
);
}
removeEmptyBoundarySurfaces
();
}
private
void
reCreateBoundarySurface
(
GeometryFactory
factory
,
ParserConfiguration
config
,
BoundarySurface
bs
)
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
at
.
getBoundaries
())
{
if
(
bsp
.
getObject
()
!=
null
&&
bsp
.
getObject
()
==
bs
.
getGmlObject
())
{
logger
.
warn
(
"Found empty boundary surface: {}, removing from building"
,
bs
.
getGmlId
());
at
.
getBoundaries
().
remove
(
bsp
);
break
;
private
void
removeEmptyBoundarySurfaces
()
{
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
at
.
getBoundaries
())
{
if
(
bsp
.
getObject
()
!=
null
&&
bsp
.
getObject
()
==
bs
.
getGmlObject
())
{
logger
.
warn
(
"Found empty boundary surface: {}, removing from tunnel"
,
bs
.
getGmlId
());
at
.
getBoundaries
().
remove
(
bsp
);
break
;
}
}
}
return
;
}
bs
.
reCreateGeometries
(
factory
,
config
);
}
private
void
setMultiSurfaceAccordingToLod
(
Geometry
geom
,
MultiSurface
ms
)
{
...
...
@@ -200,129 +168,6 @@ public abstract class AbstractTunnel extends CityObject {
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
Installation
bi
:
tunnelInstallations
)
{
bi
.
collectContainedErrors
(
errors
);
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
collectContainedErrors
(
errors
);
}
for
(
TunnelHollow
th
:
tunnelHollows
)
{
th
.
collectContainedErrors
(
errors
);
}
for
(
TunnelFurniture
tfr
:
tunnelFurnitureList
)
{
tfr
.
collectContainedErrors
(
errors
);
}
for
(
TunnelConstructiveElement
te
:
tunnelConstructiveElements
)
{
te
.
collectContainedErrors
(
errors
);
}
for
(
TunnelPart
tp
:
tunnelParts
)
{
tp
.
collectContainedErrors
(
errors
);
}
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
Installation
bi
:
tunnelInstallations
)
{
bi
.
clearAllContainedCheckResults
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearAllContainedCheckResults
();
}
for
(
TunnelHollow
th
:
tunnelHollows
)
{
th
.
clearAllContainedCheckResults
();
}
for
(
TunnelFurniture
tfr
:
tunnelFurnitureList
)
{
tfr
.
clearAllContainedCheckResults
();
}
for
(
TunnelConstructiveElement
te
:
tunnelConstructiveElements
)
{
te
.
clearAllContainedCheckResults
();
}
for
(
TunnelPart
tp
:
tunnelParts
)
{
tp
.
clearAllContainedCheckResults
();
}
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
Installation
bi
:
tunnelInstallations
)
{
if
(
bi
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
TunnelHollow
th
:
tunnelHollows
)
{
if
(
th
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
TunnelFurniture
tfr
:
tunnelFurnitureList
)
{
if
(
tfr
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
TunnelConstructiveElement
te
:
tunnelConstructiveElements
)
{
if
(
te
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
TunnelPart
tp
:
tunnelParts
)
{
if
(
tp
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
Installation
bi
:
tunnelInstallations
)
{
if
(
bi
.
containsAnyError
())
{
return
true
;
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
containsAnyError
())
{
return
true
;
}
}
for
(
TunnelHollow
th
:
tunnelHollows
)
{
if
(
th
.
containsAnyError
())
{
return
true
;
}
}
for
(
TunnelFurniture
tfr
:
tunnelFurnitureList
)
{
if
(
tfr
.
containsAnyError
())
{
return
true
;
}
}
for
(
TunnelConstructiveElement
te
:
tunnelConstructiveElements
)
{
if
(
te
.
containsAnyError
())
{
return
true
;
}
}
for
(
TunnelPart
tp
:
tunnelParts
)
{
if
(
tp
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
void
setCityGmlBuilding
(
org
.
citygml4j
.
core
.
model
.
tunnel
.
AbstractTunnel
at
)
{
this
.
at
=
at
;
...
...
@@ -381,85 +226,4 @@ public abstract class AbstractTunnel extends CityObject {
return
tunnelConstructiveElements
;
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Installation
bi
:
tunnelInstallations
)
{
bi
.
prepareForChecking
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
for
(
TunnelHollow
th
:
tunnelHollows
)
{
th
.
prepareForChecking
();
}
for
(
TunnelFurniture
tfr
:
tunnelFurnitureList
)
{
tfr
.
prepareForChecking
();
}
for
(
TunnelConstructiveElement
te
:
tunnelConstructiveElements
)
{
te
.
prepareForChecking
();
}
for
(
TunnelPart
tp
:
tunnelParts
)
{
tp
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
Installation
bi
:
tunnelInstallations
)
{
bi
.
clearMetaInformation
();
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearMetaInformation
();
}
for
(
TunnelHollow
th
:
tunnelHollows
)
{
th
.
clearMetaInformation
();
}
for
(
TunnelFurniture
tfr
:
tunnelFurnitureList
)
{
tfr
.
clearMetaInformation
();
}
for
(
TunnelConstructiveElement
te
:
tunnelConstructiveElements
)
{
te
.
clearMetaInformation
();
}
for
(
TunnelPart
tp
:
tunnelParts
)
{
tp
.
clearMetaInformation
();
}
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
boundarySurfaceList
);
handler
.
addInstance
(
tunnelInstallations
);
handler
.
addInstance
(
tunnelHollows
);
handler
.
addInstance
(
tunnelFurnitureList
);
handler
.
addInstance
(
tunnelConstructiveElements
);
handler
.
addInstance
(
tunnelParts
);
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
AbstractTunnel
originalAt
=
(
AbstractTunnel
)
original
;
for
(
BoundarySurface
originalBs
:
originalAt
.
boundarySurfaceList
)
{
boundarySurfaceList
.
add
(
handler
.
getCopyInstance
(
originalBs
));
}
for
(
Installation
originalTi
:
originalAt
.
tunnelInstallations
)
{
tunnelInstallations
.
add
(
handler
.
getCopyInstance
(
originalTi
));
}
for
(
TunnelHollow
originalTh
:
originalAt
.
tunnelHollows
)
{
tunnelHollows
.
add
(
handler
.
getCopyInstance
(
originalTh
));
}
for
(
TunnelFurniture
originalTFR
:
originalAt
.
tunnelFurnitureList
)
{
tunnelFurnitureList
.
add
(
handler
.
getCopyInstance
(
originalTFR
));
}
for
(
TunnelConstructiveElement
originalTE
:
originalAt
.
tunnelConstructiveElements
)
{
tunnelConstructiveElements
.
add
(
handler
.
getCopyInstance
(
originalTE
));
}
for
(
TunnelPart
originalTp
:
originalAt
.
tunnelParts
)
{
tunnelParts
.
add
(
handler
.
getCopyInstance
(
originalTp
));
}
at
=
originalAt
.
at
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BoundarySurface.java
View file @
845dd0a6
...
...
@@ -19,17 +19,13 @@
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.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
javafx.scene.paint.Color
;
import
org.citygml4j.core.model.core.AbstractThematicSurface
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurface
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurfaceProperty
;
import
java.io.Serial
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -87,7 +83,27 @@ public class BoundarySurface extends CityObject {
}
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
String
getDisplayText
()
{
return
String
.
format
(
"[%s] %s"
,
this
.
type
.
name
(),
this
.
getGmlId
().
toString
());
}
@Override
public
Color
getRenderColor
()
{
return
switch
(
type
)
{
case
ROOF
->
Color
.
RED
;
case
GROUND
->
Color
.
KHAKI
;
default
->
{
if
(
parent
!=
null
)
{
yield
parent
.
getRenderColor
();
}
else
{
yield
Color
.
WHITE
;
}
}
};
}
@Override
public
void
rebuildGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
if
(
gmlObject
.
getId
()
==
null
)
{
gmlObject
.
setId
(
getGmlId
().
getGmlString
());
}
...
...
@@ -104,9 +120,6 @@ public class BoundarySurface extends CityObject {
throw
new
IllegalStateException
(
"BoundarySurfaces can only have MultiSurface geometries"
);
}
}
for
(
Opening
o
:
openings
)
{
o
.
reCreateGeometries
(
factory
,
config
);
}
}
private
void
setGeometryAccordingToLod
(
Lod
lod
,
MultiSurfaceProperty
ms
)
{
...
...
@@ -131,50 +144,6 @@ public class BoundarySurface extends CityObject {
}
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
Opening
o
:
openings
)
{
o
.
clearAllContainedCheckResults
();
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
Opening
o
:
openings
)
{
o
.
collectContainedErrors
(
errors
);
}
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
Opening
o
:
openings
)
{
if
(
o
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
Opening
o
:
openings
)
{
if
(
o
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
@Override
public
void
accept
(
Check
c
)
{
super
.
accept
(
c
);
...
...
@@ -201,10 +170,6 @@ public class BoundarySurface extends CityObject {
gmlObject
.
setLod2MultiSurface
(
null
);
gmlObject
.
setLod3MultiSurface
(
null
);
gmlObject
.
getDeprecatedProperties
().
setLod4MultiSurface
(
null
);
for
(
Opening
o
:
openings
)
{
o
.
unsetGmlGeometries
();
}
}
@Override
...
...
@@ -244,48 +209,4 @@ public class BoundarySurface extends CityObject {
openings
.
add
(
opening
);
opening
.
setPartOfSurface
(
this
);
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Opening
o
:
openings
)
{
o
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
Opening
o
:
openings
)
{
o
.
clearMetaInformation
();
}
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
BoundarySurface
(
gmlObject
);
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
for
(
Opening
o
:
openings
)
{
handler
.
addInstance
(
o
);
}
handler
.
addInstance
(
parent
);
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
BoundarySurface
originalBs
=
(
BoundarySurface
)
original
;
featureType
=
originalBs
.
featureType
;
type
=
originalBs
.
type
;
for
(
Opening
originalOpening
:
originalBs
.
openings
)
{
openings
.
add
(
handler
.
getCopyInstance
(
originalOpening
));
}
parent
=
handler
.
getCopyInstance
(
originalBs
.
parent
);
gmlObject
=
originalBs
.
gmlObject
;
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeConstructiveElement.java
View file @
845dd0a6
...
...
@@ -19,12 +19,9 @@
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.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
javafx.scene.paint.Color
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
...
...
@@ -66,14 +63,13 @@ public class BridgeConstructiveElement extends CityObject {
return
parent
;
}
@Override
public
Co
pyable
createCopyInstance
()
{
return
new
BridgeConstructiveElement
(
gmlBridgeElement
);
public
Co
lor
getRenderColor
()
{
return
parent
.
getRenderColor
().
brighter
(
);
}
@Override
public
void
re
Create
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
re
build
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
// only handles CityGML2 for now
// unknown which CityGML is handled here
// need context information to decide
...
...
@@ -96,9 +92,6 @@ public class BridgeConstructiveElement extends CityObject {
break
;
}
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
reCreateBoundarySurface
(
factory
,
config
,
bs
);
}
}
@Override
...
...
@@ -112,50 +105,6 @@ public class BridgeConstructiveElement extends CityObject {
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
collectContainedErrors
(
errors
);
}
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearAllContainedCheckResults
();
}
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
if
(
bs
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
private
void
reCreateBoundarySurface
(
GeometryFactory
factory
,
ParserConfiguration
config
,
BoundarySurface
bs
)
{
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
gmlBridgeElement
.
getBoundaries
())
{
...
...
@@ -248,9 +197,6 @@ public class BridgeConstructiveElement extends CityObject {
gmlBridgeElement
.
setLod1Solid
(
null
);
gmlBridgeElement
.
setLod2Solid
(
null
);
gmlBridgeElement
.
setLod3Solid
(
null
);
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
unsetGmlGeometries
();
}
}
@Override
...
...
@@ -272,35 +218,4 @@ public class BridgeConstructiveElement extends CityObject {
return
boundarySurfaceList
;
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
BoundarySurface
bs
:
boundarySurfaceList
)
{
bs
.
clearMetaInformation
();
}
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
boundarySurfaceList
);
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
BridgeConstructiveElement
originalBce
=
(
BridgeConstructiveElement
)
original
;
for
(
BoundarySurface
originalBs
:
originalBce
.
boundarySurfaceList
)
{
boundarySurfaceList
.
add
(
handler
.
getCopyInstance
(
originalBs
));
}
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeObject.java
View file @
845dd0a6
...
...
@@ -19,12 +19,11 @@
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.CityGmlUtils
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
javafx.scene.paint.Color
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.citygml4j.core.model.bridge.AbstractBridge
;
import
org.citygml4j.core.model.bridge.BridgeInstallation
;
import
org.citygml4j.core.model.bridge.BridgeInstallationProperty
;
...
...
@@ -48,6 +47,9 @@ public class BridgeObject extends CityObject {
@Serial
private
static
final
long
serialVersionUID
=
6301112640328373842L
;
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
BridgeObject
.
class
);
private
final
List
<
BridgeObject
>
parts
=
new
ArrayList
<>(
2
);
private
final
List
<
BridgeConstructiveElement
>
elements
=
new
ArrayList
<>(
2
);
private
final
List
<
BoundarySurface
>
boundarySurfaces
=
new
ArrayList
<>(
2
);
...
...
@@ -98,7 +100,12 @@ public class BridgeObject extends CityObject {
}
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
Color
getRenderColor
()
{
return
Color
.
LIGHTSTEELBLUE
;
}
@Override
public
void
rebuildGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
...
...
@@ -111,29 +118,28 @@ public class BridgeObject extends CityObject {
setSolidAccordingToLod
(
geom
,
solid
);
}
}
removeEmptyBoundarySurfaces
();
}
private
void
removeEmptyBoundarySurfaces
()
{
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
bs
.
reCreateGeometries
(
factory
,
config
);
}
for
(
Installation
bi
:
bridgeInstallations
)
{
bi
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BridgeObject
part
:
parts
)
{
part
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
reCreateGeometries
(
factory
,
config
);
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
bri
.
reCreateGeometries
(
factory
,
config
);
if
(
bs
.
getGeometries
().
isEmpty
())
{
for
(
AbstractSpaceBoundaryProperty
bsp
:
ab
.
getBoundaries
())
{
if
(
bsp
.
getObject
()
!=
null
&&
bsp
.
getObject
()
==
bs
.
getGmlObject
())
{
logger
.
warn
(
"Found empty boundary surface: {}, removing from bridge"
,
bs
.
getGmlId
());
ab
.
getBoundaries
().
remove
(
bsp
);
break
;
}
}
}
}
}
private
void
setMultiSurfaceAccordingToLod
(
Geometry
geom
,
MultiSurface
ms
)
{
switch
(
geom
.
getLod
())
{
case
LOD0:
ab
.
setLod0MultiSurface
(
new
MultiSurfaceProperty
(
ms
));
break
;
case
LOD1:
ab
.
getDeprecatedProperties
().
setLod1MultiSurface
(
new
MultiSurfaceProperty
(
ms
));
break
;
...
...
@@ -184,147 +190,6 @@ public class BridgeObject extends CityObject {
furniture
.
setParent
(
this
);
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
bs
.
clearAllContainedCheckResults
();
}
for
(
Installation
bi
:
bridgeInstallations
)
{
bi
.
clearAllContainedCheckResults
();
}
for
(
BridgeObject
part
:
parts
)
{
part
.
clearAllContainedCheckResults
();
}
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
clearAllContainedCheckResults
();
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
clearAllContainedCheckResults
();
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
bri
.
clearAllContainedCheckResults
();
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
bs
.
collectContainedErrors
(
errors
);
}
for
(
Installation
bi
:
bridgeInstallations
)
{
bi
.
collectContainedErrors
(
errors
);
}
for
(
BridgeObject
part
:
parts
)
{
part
.
collectContainedErrors
(
errors
);
}
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
collectContainedErrors
(
errors
);
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
collectContainedErrors
(
errors
);
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
bri
.
collectContainedErrors
(
errors
);
}
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
Installation
bi
:
bridgeInstallations
)
{
if
(
bi
.
containsAnyError
())
{
return
true
;
}
}
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
if
(
bs
.
containsAnyError
())
{
return
true
;
}
}
if
(
doPartsContainAnyError
())
{
return
true
;
}
for
(
BridgeConstructiveElement
ele
:
elements
)
{
if
(
ele
.
containsAnyError
())
{
return
true
;
}
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
if
(
br
.
containsAnyError
())
{
return
true
;
}
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
if
(
bri
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
private
boolean
doPartsContainAnyError
()
{
for
(
BridgeObject
part
:
parts
)
{
if
(
part
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
Installation
bi
:
bridgeInstallations
)
{
if
(
bi
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
if
(
bs
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
if
(
doPartsContainError
(
checkIdentifier
))
{
return
true
;
}
for
(
BridgeConstructiveElement
ele
:
elements
)
{
if
(
ele
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
if
(
br
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
if
(
bri
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
private
boolean
doPartsContainError
(
CheckId
checkIdentifier
)
{
for
(
BridgeObject
part
:
parts
)
{
if
(
part
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
@Override
public
void
accept
(
Check
c
)
{
super
.
accept
(
c
);
...
...
@@ -389,29 +254,12 @@ public class BridgeObject extends CityObject {
ab
.
setLod1Solid
(
null
);
ab
.
setLod2Solid
(
null
);
ab
.
setLod3Solid
(
null
);
ab
.
getDeprecatedProperties
().
setLod4Solid
(
null
);
ab
.
setLod0MultiSurface
(
null
);
ab
.
getDeprecatedProperties
().
setLod1MultiSurface
(
null
);
ab
.
setLod2MultiSurface
(
null
);
ab
.
setLod3MultiSurface
(
null
);
ab
.
getDeprecatedProperties
().
setLod1MultiSurface
(
null
);
ab
.
getDeprecatedProperties
().
setLod4MultiSurface
(
null
);
ab
.
getDeprecatedProperties
().
setLod4Solid
(
null
);
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
bs
.
unsetGmlGeometries
();
}
for
(
Installation
bi
:
bridgeInstallations
)
{
bi
.
unsetGmlGeometries
();
}
for
(
BridgeObject
part
:
parts
)
{
part
.
unsetGmlGeometries
();
}
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
unsetGmlGeometries
();
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
unsetGmlGeometries
();
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
bri
.
unsetGmlGeometries
();
}
}
...
...
@@ -428,89 +276,6 @@ public class BridgeObject extends CityObject {
return
"BridgeObject [type="
+
type
+
", id="
+
getGmlId
()
+
"]"
;
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BridgeConstructiveElement
e
:
elements
)
{
e
.
prepareForChecking
();
}
for
(
BridgeObject
part
:
parts
)
{
part
.
prepareForChecking
();
}
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
bs
.
prepareForChecking
();
}
for
(
Installation
bi
:
bridgeInstallations
)
{
bi
.
prepareForChecking
();
}
for
(
BridgeObject
part
:
parts
)
{
part
.
prepareForChecking
();
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
prepareForChecking
();
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
bri
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
bs
.
clearMetaInformation
();
}
for
(
Installation
bi
:
bridgeInstallations
)
{
bi
.
clearMetaInformation
();
}
for
(
BridgeObject
part
:
parts
)
{
part
.
clearMetaInformation
();
}
for
(
BridgeConstructiveElement
ele
:
elements
)
{
ele
.
clearMetaInformation
();
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
br
.
clearMetaInformation
();
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
bri
.
clearMetaInformation
();
}
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
for
(
BoundarySurface
bs
:
boundarySurfaces
)
{
handler
.
addInstance
(
bs
);
}
for
(
Installation
bi
:
bridgeInstallations
)
{
handler
.
addInstance
(
bi
);
}
for
(
BridgeObject
part
:
parts
)
{
handler
.
addInstance
(
part
);
}
for
(
BridgeConstructiveElement
ele
:
elements
)
{
handler
.
addInstance
(
ele
);
}
for
(
BridgeRoom
br
:
bridgeRooms
)
{
handler
.
addInstance
(
br
);
}
for
(
BridgeRoomFurniture
bri
:
bridgeFurniture
)
{
handler
.
addInstance
(
bri
);
}
}
public
void
anonymize
()
{
for
(
Geometry
geom
:
getGeometries
())
{
...
...
@@ -529,36 +294,6 @@ public class BridgeObject extends CityObject {
this
.
ab
=
gmlB
;
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
BridgeObject
originalBo
=
(
BridgeObject
)
original
;
for
(
BoundarySurface
originalBs
:
originalBo
.
boundarySurfaces
)
{
boundarySurfaces
.
add
(
handler
.
getCopyInstance
(
originalBs
));
}
for
(
Installation
originalBi
:
originalBo
.
bridgeInstallations
)
{
bridgeInstallations
.
add
(
handler
.
getCopyInstance
(
originalBi
));
}
for
(
BridgeObject
part
:
originalBo
.
parts
)
{
getParts
().
add
(
handler
.
getCopyInstance
(
part
));
}
for
(
BridgeConstructiveElement
ele
:
originalBo
.
elements
)
{
getConstructiveElements
().
add
(
handler
.
getCopyInstance
(
ele
));
}
for
(
BridgeRoom
br
:
originalBo
.
bridgeRooms
)
{
getBridgeRooms
().
add
(
handler
.
getCopyInstance
(
br
));
}
for
(
BridgeRoomFurniture
bri
:
originalBo
.
bridgeFurniture
)
{
getBridgeFurniture
().
add
(
handler
.
getCopyInstance
(
bri
));
}
}
public
List
<
BoundarySurface
>
getBoundarySurfaces
()
{
return
boundarySurfaces
;
}
...
...
@@ -568,11 +303,6 @@ public class BridgeObject extends CityObject {
element
.
setParent
(
this
);
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
BridgeObject
(
type
,
ab
,
parent
);
}
public
List
<
BridgeObject
>
getParts
()
{
return
parts
;
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeRoom.java
View file @
845dd0a6
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
javafx.scene.paint.Color
;
import
java.io.Serial
;
...
...
@@ -30,26 +29,14 @@ public class BridgeRoom extends AbstractRoom {
return
parent
;
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
BridgeRoom
oRoom
=
(
BridgeRoom
)
original
;
parent
=
handler
.
getCopyInstance
(
oRoom
.
getParent
());
}
@Override
public
CityObject
getTopLevelCityObject
()
{
return
getParen
t
();
return
parent
.
getTopLevelCityObjec
t
();
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
parent
);
public
Color
getRenderColor
()
{
return
parent
.
getRenderColor
();
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
BridgeRoom
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BridgeRoomFurniture.java
View file @
845dd0a6
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.bridge.BridgeFurniture
;
import
java.io.Serial
;
...
...
@@ -13,9 +12,4 @@ public class BridgeRoomFurniture extends AbstractFurniture {
public
void
setGmlObject
(
BridgeFurniture
gmlObject
)
{
super
.
setGmlObject
(
gmlObject
);
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
BridgeRoomFurniture
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Building.java
View file @
845dd0a6
...
...
@@ -19,15 +19,9 @@
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.BuildingInstallation
;
import
org.citygml4j.core.model.building.BuildingInstallationProperty
;
import
org.citygml4j.core.model.core.AbstractSpaceBoundaryProperty
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
java.io.Serial
;
import
java.util.ArrayList
;
...
...
@@ -44,13 +38,6 @@ public class Building extends AbstractBuilding {
return
buildingParts
;
}
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
super
.
reCreateGeometries
(
factory
,
config
);
for
(
BuildingPart
bp
:
buildingParts
)
{
bp
.
reCreateGeometries
(
factory
,
config
);
}
}
@Override
public
CityObject
getTopLevelCityObject
()
{
...
...
@@ -68,50 +55,6 @@ public class Building extends AbstractBuilding {
}
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
BuildingPart
bp
:
buildingParts
)
{
bp
.
clearAllContainedCheckResults
();
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
BuildingPart
bp
:
buildingParts
)
{
bp
.
collectContainedErrors
(
errors
);
}
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
BuildingPart
bp
:
buildingParts
)
{
if
(
bp
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
BuildingPart
bp
:
buildingParts
)
{
if
(
bp
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
public
void
addBuildingPart
(
BuildingPart
buildingPart
)
{
buildingParts
.
add
(
buildingPart
);
}
...
...
@@ -138,42 +81,4 @@ public class Building extends AbstractBuilding {
setCityGmlBuilding
(
gmlB
);
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
BuildingPart
part
:
buildingParts
)
{
part
.
clearMetaInformation
();
}
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
BuildingPart
part
:
buildingParts
)
{
part
.
prepareForChecking
();
}
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
Building
originalBuilding
=
(
Building
)
original
;
for
(
BuildingPart
originalBp
:
originalBuilding
.
buildingParts
)
{
buildingParts
.
add
(
handler
.
getCopyInstance
(
originalBp
));
}
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
for
(
BuildingPart
bp
:
buildingParts
)
{
handler
.
addInstance
(
bp
);
}
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
Building
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingPart.java
View file @
845dd0a6
...
...
@@ -18,9 +18,6 @@
*/
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
java.io.Serial
;
public
class
BuildingPart
extends
AbstractBuilding
{
...
...
@@ -57,22 +54,4 @@ public class BuildingPart extends AbstractBuilding {
return
"BuildingPart [id="
+
getGmlId
()
+
"]"
;
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
BuildingPart
originalPart
=
(
BuildingPart
)
original
;
parent
=
handler
.
getCopyInstance
(
originalPart
.
parent
);
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
parent
);
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
BuildingPart
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingRoom.java
View file @
845dd0a6
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.CopyHandler
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
javafx.scene.paint.Color
;
import
org.citygml4j.core.model.building.BuildingFurnitureProperty
;
import
java.io.Serial
;
...
...
@@ -42,27 +41,13 @@ public class BuildingRoom extends AbstractRoom {
return
parent
;
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
BuildingRoom
oRoom
=
(
BuildingRoom
)
original
;
parent
=
handler
.
getCopyInstance
(
oRoom
.
getParent
());
}
@Override
public
CityObject
getTopLevelCityObject
()
{
return
getParent
().
getTopLevelCityObject
();
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
handler
.
addInstance
(
parent
);
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
BuildingRoom
();
public
Color
getRenderColor
()
{
return
parent
.
getRenderColor
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingRoomFurniture.java
View file @
845dd0a6
package
de.hft.stuttgart.citydoctor2.datastructure
;
import
de.hft.stuttgart.citydoctor2.utils.Copyable
;
import
org.citygml4j.core.model.building.BuildingFurniture
;
import
java.io.Serial
;
...
...
@@ -15,10 +14,5 @@ public class BuildingRoomFurniture extends AbstractFurniture {
super
.
setGmlObject
(
gmlObject
);
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
BuildingRoomFurniture
();
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingUnit.java
View file @
845dd0a6
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.util.geometry.GeometryFactory
;
import
java.io.Serial
;
...
...
@@ -19,28 +15,6 @@ public class BuildingUnit extends AbstractBuildingSubdivision {
private
final
List
<
Storey
>
storeys
=
new
ArrayList
<>();
@Override
public
Copyable
createCopyInstance
()
{
return
new
BuildingUnit
();
}
@Override
public
void
unsetGmlGeometries
()
{
super
.
unsetGmlGeometries
();
for
(
Storey
storey
:
storeys
)
{
storey
.
unsetGmlGeometries
();
}
}
@Override
public
void
reCreateGeometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
super
.
reCreateGeometries
(
factory
,
config
);
for
(
Storey
storey
:
storeys
)
{
storey
.
reCreateGeometries
(
factory
,
config
);
}
}
@Override
public
void
accept
(
Check
c
)
{
super
.
accept
(
c
);
...
...
@@ -49,83 +23,7 @@ public class BuildingUnit extends AbstractBuildingSubdivision {
}
}
@Override
public
void
collectContainedErrors
(
List
<
CheckError
>
errors
)
{
super
.
collectContainedErrors
(
errors
);
for
(
Storey
storey
:
storeys
)
{
storey
.
collectContainedErrors
(
errors
);
}
}
@Override
public
void
clearAllContainedCheckResults
()
{
super
.
clearAllContainedCheckResults
();
for
(
Storey
storey
:
storeys
)
{
storey
.
clearAllContainedCheckResults
();
}
}
@Override
public
boolean
containsError
(
CheckId
checkIdentifier
)
{
boolean
hasError
=
super
.
containsError
(
checkIdentifier
);
if
(
hasError
)
{
return
true
;
}
for
(
Storey
storey
:
storeys
)
{
if
(
storey
.
containsError
(
checkIdentifier
))
{
return
true
;
}
}
return
false
;
}
@Override
public
boolean
containsAnyError
()
{
boolean
hasError
=
super
.
containsAnyError
();
if
(
hasError
)
{
return
true
;
}
for
(
Storey
storey
:
storeys
)
{
if
(
storey
.
containsAnyError
())
{
return
true
;
}
}
return
false
;
}
@Override
public
void
prepareForChecking
()
{
super
.
prepareForChecking
();
for
(
Storey
storey
:
storeys
)
{
storey
.
prepareForChecking
();
}
}
@Override
public
void
clearMetaInformation
()
{
super
.
clearMetaInformation
();
for
(
Storey
storey
:
storeys
)
{
storey
.
clearMetaInformation
();
}
}
@Override
public
void
collectInstances
(
CopyHandler
handler
)
{
super
.
collectInstances
(
handler
);
for
(
Storey
storey
:
storeys
)
{
storey
.
collectInstances
(
handler
);
}
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
BuildingUnit
originalBu
=
(
BuildingUnit
)
original
;
for
(
Storey
storey
:
originalBu
.
storeys
)
{
storeys
.
add
(
handler
.
getCopyInstance
(
storey
));
}
this
.
abs
=
originalBu
.
abs
;
}
public
List
<
Storey
>
getStoreys
()
{
return
storeys
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/CityFurniture.java
View file @
845dd0a6
...
...
@@ -3,8 +3,7 @@ package de.hft.stuttgart.citydoctor2.datastructure;
import
de.hft.stuttgart.citydoctor2.check.Check
;
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
javafx.scene.paint.Color
;
import
org.citygml4j.core.model.core.AbstractCityObject
;
import
org.citygml4j.core.util.geometry.GeometryFactory
;
import
org.xmlobjects.gml.model.geometry.aggregates.MultiSurface
;
...
...
@@ -35,6 +34,11 @@ public class CityFurniture extends CityObject {
return
cgmlCityFurniture
;
}
@Override
public
Color
getRenderColor
()
{
return
Color
.
THISTLE
;
}
public
void
setGmlObject
(
org
.
citygml4j
.
core
.
model
.
cityfurniture
.
CityFurniture
gmlCityFurniture
)
{
cgmlCityFurniture
=
gmlCityFurniture
;
}
...
...
@@ -47,6 +51,9 @@ public class CityFurniture extends CityObject {
cgmlCityFurniture
.
setLod1Solid
(
null
);
cgmlCityFurniture
.
setLod2Solid
(
null
);
cgmlCityFurniture
.
setLod3Solid
(
null
);
cgmlCityFurniture
.
getDeprecatedProperties
().
setLod1Geometry
(
null
);
cgmlCityFurniture
.
getDeprecatedProperties
().
setLod2Geometry
(
null
);
cgmlCityFurniture
.
getDeprecatedProperties
().
setLod3Geometry
(
null
);
cgmlCityFurniture
.
getDeprecatedProperties
().
setLod4Geometry
(
null
);
}
...
...
@@ -56,7 +63,7 @@ public class CityFurniture extends CityObject {
}
@Override
public
void
re
Create
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
public
void
re
build
Geometries
(
GeometryFactory
factory
,
ParserConfiguration
config
)
{
for
(
Geometry
geom
:
getGeometries
())
{
if
(
geom
instanceof
ImplicitGeometryHolder
)
{
continue
;
...
...
@@ -116,15 +123,4 @@ public class CityFurniture extends CityObject {
return
FeatureType
.
CITY_FURNITURE
;
}
@Override
public
Copyable
createCopyInstance
()
{
return
new
CityFurniture
();
}
@Override
public
void
fillValues
(
Copyable
original
,
CopyHandler
handler
)
{
super
.
fillValues
(
original
,
handler
);
CityFurniture
originalCF
=
(
CityFurniture
)
original
;
cgmlCityFurniture
=
originalCF
.
cgmlCityFurniture
;
}
}
Prev
1
2
3
4
5
…
9
Next
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