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
cc30db8a
Commit
cc30db8a
authored
Nov 27, 2025
by
Luna Riegel
Browse files
Refactor: Remove obsolete function
parent
cee896c7
Changes
2
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/database/EmbeddedDatabaseHandler.java
View file @
cc30db8a
...
@@ -224,19 +224,6 @@ public class EmbeddedDatabaseHandler {
...
@@ -224,19 +224,6 @@ public class EmbeddedDatabaseHandler {
return
ids
;
return
ids
;
}
}
public
List
<
CityObject
>
getAllCityObjects
()
{
List
<
CityObject
>
cos
=
new
ArrayList
<>();
try
(
Connection
con
=
dataSource
.
getConnection
())
{
try
(
PreparedStatement
ps
=
con
.
prepareStatement
(
"SELECT gmlid, bbox, data FROM features"
))
{
ResultSet
rs
=
ps
.
executeQuery
();
cos
.
addAll
(
retrieveCityObjects
(
rs
));
}
}
catch
(
SQLException
e
)
{
logger
.
error
(
Localization
.
getText
(
"DatabaseHandler.getAllCityObjectsFailure"
));
logger
.
debug
(
e
.
getMessage
());
}
return
cos
;
}
public
List
<
GmlId
>
getBufferIntersectingObjects
(
CityObject
co
,
double
bufferSize
)
{
public
List
<
GmlId
>
getBufferIntersectingObjects
(
CityObject
co
,
double
bufferSize
)
{
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/database/DataBaseHandlerTest.java
View file @
cc30db8a
...
@@ -16,13 +16,10 @@ import de.hft.stuttgart.citydoctor2.parser.CityGmlParser;
...
@@ -16,13 +16,10 @@ import de.hft.stuttgart.citydoctor2.parser.CityGmlParser;
import
de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException
;
import
de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
org.citygml4j.core.model.building.AbstractBuilding
;
import
org.citygml4j.core.model.building.AbstractBuilding
;
import
org.h2gis.functions.factory.H2GISDBFactory
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.mockito.Mockito
;
import
org.mockito.Mockito
;
import
java.sql.Connection
;
import
java.sql.SQLException
;
import
java.util.List
;
import
java.util.List
;
import
static
de
.
hft
.
stuttgart
.
citydoctor2
.
database
.
SerializationTest
.
assertCityObjectEquality
;
import
static
de
.
hft
.
stuttgart
.
citydoctor2
.
database
.
SerializationTest
.
assertCityObjectEquality
;
...
@@ -45,27 +42,6 @@ public class DataBaseHandlerTest {
...
@@ -45,27 +42,6 @@ public class DataBaseHandlerTest {
}
}
@Test
public
void
testGetAllFeatures
()
{
Building
b
=
new
Building
();
b
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
SOLID
,
Lod
.
LOD0
));
Building
b2
=
new
Building
();
b2
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
SOLID
,
Lod
.
LOD2
));
Building
b3
=
new
Building
();
b3
.
addGeometry
(
GeometryTestUtils
.
createDummyGeometry
(
GeometryType
.
SOLID
,
Lod
.
LOD3
));
handler
.
marshallCityObject
(
b
);
handler
.
marshallCityObject
(
b2
);
handler
.
marshallCityObject
(
b3
);
assertEquals
(
3
,
handler
.
getFeatureCount
());
List
<
CityObject
>
objects
=
handler
.
getAllCityObjects
();
assertEquals
(
3
,
objects
.
size
());
assertEquals
(
3
,
handler
.
getFeatureCount
());
}
@Test
@Test
public
void
testGetBboxIntersectingObjects
()
{
public
void
testGetBboxIntersectingObjects
()
{
Building
b
=
new
Building
();
Building
b
=
new
Building
();
...
...
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