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
ab1681b7
Commit
ab1681b7
authored
Dec 03, 2025
by
Luna Riegel
Browse files
Refactor: Remove obsolete enum
parent
059cfd0c
Changes
6
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/BoundarySurface.java
View file @
ab1681b7
...
@@ -40,7 +40,7 @@ public class BoundarySurface extends CityObject {
...
@@ -40,7 +40,7 @@ public class BoundarySurface extends CityObject {
@Serial
@Serial
private
static
final
long
serialVersionUID
=
8793865135393496408L
;
private
static
final
long
serialVersionUID
=
8793865135393496408L
;
private
SurfaceFeatureType
featureType
;
private
BoundarySurfaceType
type
;
private
BoundarySurfaceType
type
;
private
final
List
<
Opening
>
openings
=
new
ArrayList
<>(
2
);
private
final
List
<
Opening
>
openings
=
new
ArrayList
<>(
2
);
...
@@ -49,18 +49,14 @@ public class BoundarySurface extends CityObject {
...
@@ -49,18 +49,14 @@ public class BoundarySurface extends CityObject {
private
AbstractThematicSurface
gmlObject
;
private
AbstractThematicSurface
gmlObject
;
public
BoundarySurface
(
AbstractThematicSurface
aco
)
{
public
BoundarySurface
(
AbstractThematicSurface
aco
)
{
this
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
UNDEFINED
,
aco
);
this
(
BoundarySurfaceType
.
UNDEFINED
,
aco
);
}
}
public
BoundarySurface
(
SurfaceFeatureType
featureType
,
BoundarySurfaceType
type
,
AbstractThematicSurface
aco
)
{
public
BoundarySurface
(
BoundarySurfaceType
type
,
AbstractThematicSurface
aco
)
{
this
.
featureType
=
featureType
;
this
.
type
=
type
;
this
.
type
=
type
;
gmlObject
=
aco
;
gmlObject
=
aco
;
}
}
public
void
setFeatureType
(
SurfaceFeatureType
featureType
)
{
this
.
featureType
=
featureType
;
}
public
void
setType
(
BoundarySurfaceType
type
)
{
public
void
setType
(
BoundarySurfaceType
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
...
@@ -70,9 +66,6 @@ public class BoundarySurface extends CityObject {
...
@@ -70,9 +66,6 @@ public class BoundarySurface extends CityObject {
this
.
gmlObject
=
gmlObject
;
this
.
gmlObject
=
gmlObject
;
}
}
public
SurfaceFeatureType
getSurfaceFeatureType
()
{
return
featureType
;
}
public
BoundarySurfaceType
getType
()
{
public
BoundarySurfaceType
getType
()
{
return
type
;
return
type
;
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Opening.java
View file @
ab1681b7
...
@@ -44,7 +44,6 @@ public class Opening extends CityObject {
...
@@ -44,7 +44,6 @@ public class Opening extends CityObject {
private
BoundarySurface
partOf
;
private
BoundarySurface
partOf
;
private
OpeningType
type
;
private
OpeningType
type
;
private
SurfaceFeatureType
featureType
;
private
AbstractFillingSurface
ao
;
private
AbstractFillingSurface
ao
;
...
@@ -52,9 +51,8 @@ public class Opening extends CityObject {
...
@@ -52,9 +51,8 @@ public class Opening extends CityObject {
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
Opening
(
OpeningType
type
,
SurfaceFeatureType
featureType
,
BoundarySurface
partOf
,
public
Opening
(
OpeningType
type
,
BoundarySurface
partOf
,
AbstractFillingSurface
ao
)
{
AbstractFillingSurface
ao
)
{
this
.
featureType
=
featureType
;
this
.
partOf
=
partOf
;
this
.
partOf
=
partOf
;
this
.
type
=
type
;
this
.
type
=
type
;
this
.
ao
=
ao
;
this
.
ao
=
ao
;
...
@@ -96,11 +94,6 @@ public class Opening extends CityObject {
...
@@ -96,11 +94,6 @@ public class Opening extends CityObject {
}
}
}
}
public
SurfaceFeatureType
getSurfaceFeatureType
()
{
return
featureType
;
}
public
BoundarySurface
getPartOf
()
{
public
BoundarySurface
getPartOf
()
{
return
partOf
;
return
partOf
;
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/mapper/citygml3/SurfaceMapper.java
View file @
ab1681b7
...
@@ -54,8 +54,7 @@ public class SurfaceMapper extends ObjectWalker {
...
@@ -54,8 +54,7 @@ public class SurfaceMapper extends ObjectWalker {
@Override
@Override
public
void
visit
(
WallSurface
wallSurface
)
{
public
void
visit
(
WallSurface
wallSurface
)
{
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
wallSurface
);
wallSurface
);
handleConstructionSurface
(
wallSurface
,
surface
);
handleConstructionSurface
(
wallSurface
,
surface
);
surfaces
.
add
(
surface
);
surfaces
.
add
(
surface
);
}
}
...
@@ -74,11 +73,11 @@ public class SurfaceMapper extends ObjectWalker {
...
@@ -74,11 +73,11 @@ public class SurfaceMapper extends ObjectWalker {
private
void
readAbstractFillingSurface
(
AbstractFillingSurface
afs
,
BoundarySurface
cdSurface
)
{
private
void
readAbstractFillingSurface
(
AbstractFillingSurface
afs
,
BoundarySurface
cdSurface
)
{
Opening
o
;
Opening
o
;
if
(
afs
instanceof
DoorSurface
ds
)
{
if
(
afs
instanceof
DoorSurface
ds
)
{
o
=
new
Opening
(
OpeningType
.
DOOR
,
SurfaceFeatureType
.
BUILDING
,
cdSurface
,
ds
);
o
=
new
Opening
(
OpeningType
.
DOOR
,
cdSurface
,
ds
);
}
else
if
(
afs
instanceof
WindowSurface
ws
)
{
}
else
if
(
afs
instanceof
WindowSurface
ws
)
{
o
=
new
Opening
(
OpeningType
.
WINDOW
,
SurfaceFeatureType
.
BUILDING
,
cdSurface
,
ws
);
o
=
new
Opening
(
OpeningType
.
WINDOW
,
cdSurface
,
ws
);
}
else
{
}
else
{
o
=
new
Opening
(
OpeningType
.
UNKNOWN
,
SurfaceFeatureType
.
BUILDING
,
cdSurface
,
afs
);
o
=
new
Opening
(
OpeningType
.
UNKNOWN
,
cdSurface
,
afs
);
}
}
cdSurface
.
addOpening
(
o
);
cdSurface
.
addOpening
(
o
);
parseAndAddMultiSurface
(
afs
.
getLod0MultiSurface
(),
Lod
.
LOD0
,
o
);
parseAndAddMultiSurface
(
afs
.
getLod0MultiSurface
(),
Lod
.
LOD0
,
o
);
...
@@ -144,64 +143,56 @@ public class SurfaceMapper extends ObjectWalker {
...
@@ -144,64 +143,56 @@ public class SurfaceMapper extends ObjectWalker {
@Override
@Override
public
void
visit
(
FloorSurface
floorSurface
)
{
public
void
visit
(
FloorSurface
floorSurface
)
{
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
FLOOR
,
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
FLOOR
,
floorSurface
);
floorSurface
);
handleConstructionSurface
(
floorSurface
,
surface
);
handleConstructionSurface
(
floorSurface
,
surface
);
surfaces
.
add
(
surface
);
surfaces
.
add
(
surface
);
}
}
@Override
@Override
public
void
visit
(
CeilingSurface
ceilingSurface
)
{
public
void
visit
(
CeilingSurface
ceilingSurface
)
{
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
CEILING
,
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
CEILING
,
ceilingSurface
);
ceilingSurface
);
handleConstructionSurface
(
ceilingSurface
,
surface
);
handleConstructionSurface
(
ceilingSurface
,
surface
);
surfaces
.
add
(
surface
);
surfaces
.
add
(
surface
);
}
}
@Override
@Override
public
void
visit
(
GroundSurface
groundSurface
)
{
public
void
visit
(
GroundSurface
groundSurface
)
{
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
GROUND
,
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
GROUND
,
groundSurface
);
groundSurface
);
handleConstructionSurface
(
groundSurface
,
surface
);
handleConstructionSurface
(
groundSurface
,
surface
);
surfaces
.
add
(
surface
);
surfaces
.
add
(
surface
);
}
}
@Override
@Override
public
void
visit
(
InteriorWallSurface
interiorWallSurface
)
{
public
void
visit
(
InteriorWallSurface
interiorWallSurface
)
{
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
INTERIOR_WALL
,
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
INTERIOR_WALL
,
interiorWallSurface
);
interiorWallSurface
);
handleConstructionSurface
(
interiorWallSurface
,
surface
);
handleConstructionSurface
(
interiorWallSurface
,
surface
);
surfaces
.
add
(
surface
);
surfaces
.
add
(
surface
);
}
}
@Override
@Override
public
void
visit
(
OuterCeilingSurface
outerCeilingSurface
)
{
public
void
visit
(
OuterCeilingSurface
outerCeilingSurface
)
{
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
OUTER_CEILING
,
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
OUTER_CEILING
,
outerCeilingSurface
);
outerCeilingSurface
);
handleConstructionSurface
(
outerCeilingSurface
,
surface
);
handleConstructionSurface
(
outerCeilingSurface
,
surface
);
surfaces
.
add
(
surface
);
surfaces
.
add
(
surface
);
}
}
@Override
@Override
public
void
visit
(
OuterFloorSurface
outerFloorSurface
)
{
public
void
visit
(
OuterFloorSurface
outerFloorSurface
)
{
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
OUTER_FLOOR
,
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
OUTER_FLOOR
,
outerFloorSurface
);
outerFloorSurface
);
handleConstructionSurface
(
outerFloorSurface
,
surface
);
handleConstructionSurface
(
outerFloorSurface
,
surface
);
surfaces
.
add
(
surface
);
surfaces
.
add
(
surface
);
}
}
@Override
@Override
public
void
visit
(
RoofSurface
roofSurface
)
{
public
void
visit
(
RoofSurface
roofSurface
)
{
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
ROOF
,
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
ROOF
,
roofSurface
);
roofSurface
);
handleConstructionSurface
(
roofSurface
,
surface
);
handleConstructionSurface
(
roofSurface
,
surface
);
surfaces
.
add
(
surface
);
surfaces
.
add
(
surface
);
}
}
@Override
@Override
public
void
visit
(
ClosureSurface
closureSurface
)
{
public
void
visit
(
ClosureSurface
closureSurface
)
{
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
CLOSURE
,
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
CLOSURE
,
closureSurface
);
closureSurface
);
handleThematicSurface
(
closureSurface
,
surface
);
handleThematicSurface
(
closureSurface
,
surface
);
surfaces
.
add
(
surface
);
surfaces
.
add
(
surface
);
}
}
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/BoundarySurfaceTest.java
View file @
ab1681b7
...
@@ -53,7 +53,7 @@ public class BoundarySurfaceTest {
...
@@ -53,7 +53,7 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testVisitorPropagation
()
{
public
void
testVisitorPropagation
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
bs
.
addOpening
(
oMock
);
bs
.
addOpening
(
oMock
);
...
@@ -66,7 +66,7 @@ public class BoundarySurfaceTest {
...
@@ -66,7 +66,7 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testAccept
()
{
public
void
testAccept
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
bs
.
addOpening
(
oMock
);
bs
.
addOpening
(
oMock
);
AtomicInteger
bsCounter
=
new
AtomicInteger
(
0
);
AtomicInteger
bsCounter
=
new
AtomicInteger
(
0
);
...
@@ -84,7 +84,7 @@ public class BoundarySurfaceTest {
...
@@ -84,7 +84,7 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testAcceptWithoutFittingCheck
()
{
public
void
testAcceptWithoutFittingCheck
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
bs
.
addOpening
(
oMock
);
bs
.
addOpening
(
oMock
);
AtomicInteger
bsCounter
=
new
AtomicInteger
(
0
);
AtomicInteger
bsCounter
=
new
AtomicInteger
(
0
);
...
@@ -102,7 +102,7 @@ public class BoundarySurfaceTest {
...
@@ -102,7 +102,7 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testPrepareForChecking
()
{
public
void
testPrepareForChecking
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
Geometry
geom
=
new
Geometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
Geometry
geom
=
new
Geometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
Geometry
spyGeom
=
Mockito
.
spy
(
geom
);
Geometry
spyGeom
=
Mockito
.
spy
(
geom
);
bs
.
addGeometry
(
spyGeom
);
bs
.
addGeometry
(
spyGeom
);
...
@@ -112,7 +112,7 @@ public class BoundarySurfaceTest {
...
@@ -112,7 +112,7 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testContainsError
()
{
public
void
testContainsError
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
assertFalse
(
bs
.
containsError
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
assertFalse
(
bs
.
containsError
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
bs
.
addCheckResult
(
bs
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
...
@@ -122,9 +122,9 @@ public class BoundarySurfaceTest {
...
@@ -122,9 +122,9 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testContainsErrorInOpening
()
{
public
void
testContainsErrorInOpening
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
assertFalse
(
bs
.
containsError
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
assertFalse
(
bs
.
containsError
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
Opening
o
=
new
Opening
(
OpeningType
.
WINDOW
,
SurfaceFeatureType
.
BUILDING
,
bs
,
null
);
Opening
o
=
new
Opening
(
OpeningType
.
WINDOW
,
bs
,
null
);
bs
.
addOpening
(
o
);
bs
.
addOpening
(
o
);
o
.
addCheckResult
(
o
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
...
@@ -134,7 +134,7 @@ public class BoundarySurfaceTest {
...
@@ -134,7 +134,7 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testClearAllContainedCheckResults
()
{
public
void
testClearAllContainedCheckResults
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
bs
.
addCheckResult
(
bs
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
...
@@ -147,7 +147,7 @@ public class BoundarySurfaceTest {
...
@@ -147,7 +147,7 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testContainsAnyError
()
{
public
void
testContainsAnyError
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
assertFalse
(
bs
.
containsAnyError
());
assertFalse
(
bs
.
containsAnyError
());
bs
.
addCheckResult
(
bs
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
...
@@ -157,19 +157,18 @@ public class BoundarySurfaceTest {
...
@@ -157,19 +157,18 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testCollectContainedErrors
()
{
public
void
testCollectContainedErrors
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
bs
.
addCheckResult
(
bs
.
addCheckResult
(
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
new
CheckResult
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
,
ResultStatus
.
ERROR
,
Mockito
.
mock
(
CheckError
.
class
)));
List
<
CheckError
>
errors
=
new
ArrayList
<>();
List
<
CheckError
>
errors
=
new
ArrayList
<>();
bs
.
collectContainedErrors
(
errors
);
bs
.
collectContainedErrors
(
errors
);
assertEquals
(
1
,
errors
.
size
());
assertEquals
(
1
,
errors
.
size
());
;
}
}
@Test
@Test
public
void
testReCreateGeometriesWithoutId
()
{
public
void
testReCreateGeometriesWithoutId
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNotNull
(
ws
.
getId
());
assertNotNull
(
ws
.
getId
());
}
}
...
@@ -178,7 +177,7 @@ public class BoundarySurfaceTest {
...
@@ -178,7 +177,7 @@ public class BoundarySurfaceTest {
public
void
testReCreateGeometriesWithId
()
{
public
void
testReCreateGeometriesWithId
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
ws
.
setId
(
"test"
);
ws
.
setId
(
"test"
);
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
// nothing has changed
// nothing has changed
assertEquals
(
"test"
,
ws
.
getId
());
assertEquals
(
"test"
,
ws
.
getId
());
...
@@ -188,89 +187,52 @@ public class BoundarySurfaceTest {
...
@@ -188,89 +187,52 @@ public class BoundarySurfaceTest {
}
}
@Test
@Test
public
void
testReCreateGeometriesMultiSurfaceLod2
()
{
public
void
testReCreateGeometriesMultiSurfaceLod0
()
{
WallSurface
ws
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNotNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
@Test
public
void
testReCreateGeometriesMultiSurfaceBridgeLod2
()
{
WallSurface
ws
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BRIDGE
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNotNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
@Test
public
void
testReCreateGeometriesMultiSurfaceBridgeLod3
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BRIDGE
,
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD
3
));
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD
0
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNotNull
(
ws
.
getLod0MultiSurface
());
assertNull
(
ws
.
getLod1MultiSurface
());
assertNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod2MultiSurface
());
assertN
otN
ull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
}
@Test
@Test
public
void
testReCreateGeometriesMultiSurface
Bridge
Lod
4
()
{
public
void
testReCreateGeometriesMultiSurfaceLod
1
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BRIDGE
,
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD
4
));
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD
1
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNull
(
ws
.
getLod0MultiSurface
());
assertNotNull
(
ws
.
getLod1MultiSurface
());
assertNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertN
otN
ull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
}
@Test
@Test
public
void
testReCreateGeometriesMultiSurface
Tunnel
Lod2
()
{
public
void
testReCreateGeometriesMultiSurfaceLod2
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
TUNNEL
,
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
));
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNull
(
ws
.
getLod0MultiSurface
());
assertNull
(
ws
.
getLod1MultiSurface
());
assertNotNull
(
ws
.
getLod2MultiSurface
());
assertNotNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
}
@Test
public
void
testReCreateGeometriesMultiSurfaceTunnelLod3
()
{
WallSurface
ws
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
TUNNEL
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD3
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNull
(
ws
.
getLod2MultiSurface
());
assertNotNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
@Test
public
void
testReCreateGeometriesMultiSurfaceTunnelLod4
()
{
WallSurface
ws
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
TUNNEL
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD4
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNotNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
@Test
@Test
public
void
testReCreateGeometriesMultiSurfaceLod3
()
{
public
void
testReCreateGeometriesMultiSurfaceLod3
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
ws
.
setId
(
"test"
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD3
));
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD3
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNull
(
ws
.
getLod0MultiSurface
());
assertNull
(
ws
.
getLod1MultiSurface
());
assertNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod2MultiSurface
());
assertNotNull
(
ws
.
getLod3MultiSurface
());
assertNotNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
...
@@ -279,30 +241,21 @@ public class BoundarySurfaceTest {
...
@@ -279,30 +241,21 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testReCreateGeometriesMultiSurfaceLod4
()
{
public
void
testReCreateGeometriesMultiSurfaceLod4
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
ws
.
setId
(
"test"
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD4
));
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD4
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNull
(
ws
.
getLod0MultiSurface
());
assertNull
(
ws
.
getLod1MultiSurface
());
assertNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNotNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
assertNotNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
}
@Test
public
void
testReCreateGeometriesMultiSurfaceLod0
()
{
WallSurface
ws
=
new
WallSurface
();
ws
.
setId
(
"test"
);
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD0
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
assertNotNull
(
ws
.
getLod0MultiSurface
());
}
@Test
(
expected
=
IllegalStateException
.
class
)
@Test
(
expected
=
IllegalStateException
.
class
)
public
void
testReCreateGeometriesSolid
()
{
public
void
testReCreateGeometriesSolid
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
ws
.
setId
(
"test"
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
SOLID
));
bs
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
SOLID
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
bs
.
reCreateGeometries
(
GeometryFactory
.
newInstance
(),
new
ParserConfiguration
(
8
,
false
));
}
}
...
@@ -310,8 +263,7 @@ public class BoundarySurfaceTest {
...
@@ -310,8 +263,7 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testReCreateGeometriesOpenings
()
{
public
void
testReCreateGeometriesOpenings
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
ws
.
setId
(
"test"
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
bs
.
addOpening
(
oMock
);
bs
.
addOpening
(
oMock
);
GeometryFactory
factory
=
GeometryFactory
.
newInstance
();
GeometryFactory
factory
=
GeometryFactory
.
newInstance
();
...
@@ -323,7 +275,7 @@ public class BoundarySurfaceTest {
...
@@ -323,7 +275,7 @@ public class BoundarySurfaceTest {
@Test
@Test
public
void
testGetGmlObject
()
{
public
void
testGetGmlObject
()
{
WallSurface
ws
=
new
WallSurface
();
WallSurface
ws
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
assertEquals
(
ws
,
bs
.
getGmlObject
());
assertEquals
(
ws
,
bs
.
getGmlObject
());
}
}
...
@@ -336,7 +288,7 @@ public class BoundarySurfaceTest {
...
@@ -336,7 +288,7 @@ public class BoundarySurfaceTest {
assertNotNull
(
ws
.
getLod2MultiSurface
());
assertNotNull
(
ws
.
getLod2MultiSurface
());
assertNotNull
(
ws
.
getLod3MultiSurface
());
assertNotNull
(
ws
.
getLod3MultiSurface
());
assertNotNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
assertNotNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
ws
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
ws
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
Opening
oMock
=
Mockito
.
mock
(
Opening
.
class
);
bs
.
addOpening
(
oMock
);
bs
.
addOpening
(
oMock
);
bs
.
accept
(
new
UnsetGeometriesVisitor
());
bs
.
accept
(
new
UnsetGeometriesVisitor
());
...
@@ -346,41 +298,9 @@ public class BoundarySurfaceTest {
...
@@ -346,41 +298,9 @@ public class BoundarySurfaceTest {
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
}
@Test
public
void
testUnsetGmlGeometriesBridge
()
{
WallSurface
ws
=
new
WallSurface
();
ws
.
setLod2MultiSurface
(
new
MultiSurfaceProperty
());
ws
.
setLod3MultiSurface
(
new
MultiSurfaceProperty
());
ws
.
getDeprecatedProperties
().
setLod4MultiSurface
(
new
MultiSurfaceProperty
());
assertNotNull
(
ws
.
getLod2MultiSurface
());
assertNotNull
(
ws
.
getLod3MultiSurface
());
assertNotNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BRIDGE
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
unsetGmlGeometries
();
assertNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
@Test
public
void
testUnsetGmlGeometriesTunnel
()
{
WallSurface
ws
=
new
WallSurface
();
ws
.
setLod2MultiSurface
(
new
MultiSurfaceProperty
());
ws
.
setLod3MultiSurface
(
new
MultiSurfaceProperty
());
ws
.
getDeprecatedProperties
().
setLod4MultiSurface
(
new
MultiSurfaceProperty
());
assertNotNull
(
ws
.
getLod2MultiSurface
());
assertNotNull
(
ws
.
getLod3MultiSurface
());
assertNotNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
TUNNEL
,
BoundarySurfaceType
.
WALL
,
ws
);
bs
.
unsetGmlGeometries
();
assertNull
(
ws
.
getLod2MultiSurface
());
assertNull
(
ws
.
getLod3MultiSurface
());
assertNull
(
ws
.
getDeprecatedProperties
().
getLod4MultiSurface
());
}
@Test
@Test
public
void
testGetFeatureType
()
{
public
void
testGetFeatureType
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
TUNNEL
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
assertEquals
(
FeatureType
.
BOUNDARY_SURFACE
,
bs
.
getFeatureType
());
assertEquals
(
FeatureType
.
BOUNDARY_SURFACE
,
bs
.
getFeatureType
());
}
}
...
@@ -390,17 +310,11 @@ public class BoundarySurfaceTest {
...
@@ -390,17 +310,11 @@ public class BoundarySurfaceTest {
BoundarySurface
bs
=
new
BoundarySurface
(
aco
);
BoundarySurface
bs
=
new
BoundarySurface
(
aco
);
assertEquals
(
aco
,
bs
.
getGmlObject
());
assertEquals
(
aco
,
bs
.
getGmlObject
());
}
}
@Test
public
void
testSetFeatureType
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
TUNNEL
,
BoundarySurfaceType
.
WALL
,
null
);
bs
.
setFeatureType
(
SurfaceFeatureType
.
BRIDGE
);
assertEquals
(
SurfaceFeatureType
.
BRIDGE
,
bs
.
getSurfaceFeatureType
());
}
@Test
@Test
public
void
testSetType
()
{
public
void
testSetType
()
{
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
TUNNEL
,
BoundarySurfaceType
.
WALL
,
null
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
null
);
bs
.
setType
(
BoundarySurfaceType
.
ROOF
);
bs
.
setType
(
BoundarySurfaceType
.
ROOF
);
assertEquals
(
BoundarySurfaceType
.
ROOF
,
bs
.
getType
());
assertEquals
(
BoundarySurfaceType
.
ROOF
,
bs
.
getType
());
}
}
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/BuildingTest.java
View file @
ab1681b7
...
@@ -64,7 +64,7 @@ public class BuildingTest {
...
@@ -64,7 +64,7 @@ public class BuildingTest {
b
.
setCityGmlBuilding
(
createCityGmlBuilding
());
b
.
setCityGmlBuilding
(
createCityGmlBuilding
());
RoofSurface
rs
=
new
RoofSurface
();
RoofSurface
rs
=
new
RoofSurface
();
rs
.
setId
(
"testRoof"
);
rs
.
setId
(
"testRoof"
);
BoundarySurface
surface
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
ROOF
,
rs
);
BoundarySurface
surface
=
new
BoundarySurface
(
BoundarySurfaceType
.
ROOF
,
rs
);
Geometry
geomSurface
=
new
Geometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
Geometry
geomSurface
=
new
Geometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
geomSurface
.
addPolygon
(
new
LinkedPolygon
(
p
,
geomSurface
));
geomSurface
.
addPolygon
(
new
LinkedPolygon
(
p
,
geomSurface
));
geomSurface
.
updateEdgesAndVertices
();
geomSurface
.
updateEdgesAndVertices
();
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/datastructure/GeometryTest.java
View file @
ab1681b7
...
@@ -96,7 +96,7 @@ public class GeometryTest {
...
@@ -96,7 +96,7 @@ public class GeometryTest {
public
void
testRemovePolygonConcreteWithLink
()
{
public
void
testRemovePolygonConcreteWithLink
()
{
ParserConfiguration
config
=
new
ParserConfiguration
(
4
,
false
);
ParserConfiguration
config
=
new
ParserConfiguration
(
4
,
false
);
AbstractConstructionSurface
abs
=
new
WallSurface
();
AbstractConstructionSurface
abs
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
abs
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
abs
);
var
gmlBi
=
new
org
.
citygml4j
.
core
.
model
.
building
.
BuildingInstallation
();
var
gmlBi
=
new
org
.
citygml4j
.
core
.
model
.
building
.
BuildingInstallation
();
Installation
bi
=
new
Installation
();
Installation
bi
=
new
Installation
();
bi
.
setGmlObject
(
gmlBi
);
bi
.
setGmlObject
(
gmlBi
);
...
@@ -133,7 +133,7 @@ public class GeometryTest {
...
@@ -133,7 +133,7 @@ public class GeometryTest {
public
void
testRemovePolygonOnlyConcrete
()
{
public
void
testRemovePolygonOnlyConcrete
()
{
ParserConfiguration
config
=
new
ParserConfiguration
(
4
,
false
);
ParserConfiguration
config
=
new
ParserConfiguration
(
4
,
false
);
AbstractConstructionSurface
abs
=
new
WallSurface
();
AbstractConstructionSurface
abs
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
abs
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
abs
);
Geometry
geom
=
new
Geometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
Geometry
geom
=
new
Geometry
(
GeometryType
.
MULTI_SURFACE
,
Lod
.
LOD2
,
Orientation
.
OUTWARD
);
ConcretePolygon
p
=
new
ConcretePolygon
();
ConcretePolygon
p
=
new
ConcretePolygon
();
...
@@ -156,7 +156,7 @@ public class GeometryTest {
...
@@ -156,7 +156,7 @@ public class GeometryTest {
public
void
testRemovePolygonLinked
()
{
public
void
testRemovePolygonLinked
()
{
ParserConfiguration
config
=
new
ParserConfiguration
(
4
,
false
);
ParserConfiguration
config
=
new
ParserConfiguration
(
4
,
false
);
AbstractConstructionSurface
abs
=
new
WallSurface
();
AbstractConstructionSurface
abs
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
abs
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
abs
);
var
gmlBi
=
new
org
.
citygml4j
.
core
.
model
.
building
.
BuildingInstallation
();
var
gmlBi
=
new
org
.
citygml4j
.
core
.
model
.
building
.
BuildingInstallation
();
Installation
bi
=
new
Installation
();
Installation
bi
=
new
Installation
();
bi
.
setGmlObject
(
gmlBi
);
bi
.
setGmlObject
(
gmlBi
);
...
@@ -193,7 +193,7 @@ public class GeometryTest {
...
@@ -193,7 +193,7 @@ public class GeometryTest {
public
void
testReplacePolygon
()
{
public
void
testReplacePolygon
()
{
ParserConfiguration
config
=
new
ParserConfiguration
(
4
,
false
);
ParserConfiguration
config
=
new
ParserConfiguration
(
4
,
false
);
AbstractConstructionSurface
abs
=
new
WallSurface
();
AbstractConstructionSurface
abs
=
new
WallSurface
();
BoundarySurface
bs
=
new
BoundarySurface
(
SurfaceFeatureType
.
BUILDING
,
BoundarySurfaceType
.
WALL
,
abs
);
BoundarySurface
bs
=
new
BoundarySurface
(
BoundarySurfaceType
.
WALL
,
abs
);
var
gmlBi
=
new
org
.
citygml4j
.
core
.
model
.
building
.
BuildingInstallation
();
var
gmlBi
=
new
org
.
citygml4j
.
core
.
model
.
building
.
BuildingInstallation
();
Installation
bi
=
new
Installation
();
Installation
bi
=
new
Installation
();
bi
.
setGmlObject
(
gmlBi
);
bi
.
setGmlObject
(
gmlBi
);
...
...
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