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
3152a987
Commit
3152a987
authored
Nov 27, 2025
by
Luna Riegel
Browse files
Refactor: Rename functions
parent
cc30db8a
Changes
2
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/database/EmbeddedDatabaseHandler.java
View file @
3152a987
...
@@ -228,9 +228,11 @@ public class EmbeddedDatabaseHandler {
...
@@ -228,9 +228,11 @@ public class EmbeddedDatabaseHandler {
public
List
<
GmlId
>
getBufferIntersectingObjects
(
CityObject
co
,
double
bufferSize
)
{
public
List
<
GmlId
>
getBufferIntersectingObjects
(
CityObject
co
,
double
bufferSize
)
{
return
getBufferIntersectingObjects
(
co
.
getGmlId
(),
bufferSize
);
return
getBufferIntersectingObjects
(
co
.
getGmlId
(),
bufferSize
);
public
List
<
GmlId
>
getBufferCollisionCandidates
(
CityObject
co
,
double
bufferSize
)
{
return
getBufferCollisionCandidates
(
co
.
getGmlId
(),
bufferSize
);
}
}
public
List
<
GmlId
>
getBuffer
IntersectingObject
s
(
GmlId
gmlID
,
double
bufferSize
)
{
public
List
<
GmlId
>
getBuffer
CollisionCandidate
s
(
GmlId
gmlID
,
double
bufferSize
)
{
List
<
GmlId
>
intersectingObjects
=
new
ArrayList
<>();
List
<
GmlId
>
intersectingObjects
=
new
ArrayList
<>();
try
(
Connection
con
=
dataSource
.
getConnection
())
{
try
(
Connection
con
=
dataSource
.
getConnection
())
{
try
(
PreparedStatement
ps
=
con
.
prepareStatement
(
"SELECT gmlid FROM features AS tab1"
+
try
(
PreparedStatement
ps
=
con
.
prepareStatement
(
"SELECT gmlid FROM features AS tab1"
+
...
@@ -251,11 +253,11 @@ public class EmbeddedDatabaseHandler {
...
@@ -251,11 +253,11 @@ public class EmbeddedDatabaseHandler {
return
intersectingObjects
;
return
intersectingObjects
;
}
}
public
List
<
GmlId
>
getBBox
IntersectingObject
s
(
CityObject
co
)
{
public
List
<
GmlId
>
getBBox
CollisionCandidate
s
(
CityObject
co
)
{
return
getBBox
IntersectingObject
s
(
co
.
getGmlId
());
return
getBBox
CollisionCandidate
s
(
co
.
getGmlId
());
}
}
public
List
<
GmlId
>
getBBox
IntersectingObject
s
(
GmlId
id
)
{
public
List
<
GmlId
>
getBBox
CollisionCandidate
s
(
GmlId
id
)
{
List
<
GmlId
>
intersectingObjects
=
new
ArrayList
<>();
List
<
GmlId
>
intersectingObjects
=
new
ArrayList
<>();
try
(
Connection
con
=
dataSource
.
getConnection
())
{
try
(
Connection
con
=
dataSource
.
getConnection
())
{
...
...
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/database/DataBaseHandlerTest.java
View file @
3152a987
...
@@ -112,7 +112,7 @@ public class DataBaseHandlerTest {
...
@@ -112,7 +112,7 @@ public class DataBaseHandlerTest {
handler
.
marshallCityObject
(
b4
);
handler
.
marshallCityObject
(
b4
);
assertEquals
(
4
,
handler
.
getFeatureCount
());
assertEquals
(
4
,
handler
.
getFeatureCount
());
List
<
GmlId
>
objects
=
handler
.
getBBox
IntersectingObject
s
(
b
);
List
<
GmlId
>
objects
=
handler
.
getBBox
CollisionCandidate
s
(
b
);
assertEquals
(
1
,
objects
.
size
());
assertEquals
(
1
,
objects
.
size
());
assertEquals
(
4
,
handler
.
getFeatureCount
());
assertEquals
(
4
,
handler
.
getFeatureCount
());
...
@@ -193,7 +193,7 @@ public class DataBaseHandlerTest {
...
@@ -193,7 +193,7 @@ public class DataBaseHandlerTest {
handler
.
marshallCityObject
(
b4
);
handler
.
marshallCityObject
(
b4
);
assertEquals
(
4
,
handler
.
getFeatureCount
());
assertEquals
(
4
,
handler
.
getFeatureCount
());
List
<
GmlId
>
objects
=
handler
.
getBuffer
IntersectingObject
s
(
b
,
Math
.
sqrt
(
2
));
List
<
GmlId
>
objects
=
handler
.
getBuffer
CollisionCandidate
s
(
b
,
Math
.
sqrt
(
2
));
assertEquals
(
1
,
objects
.
size
());
assertEquals
(
1
,
objects
.
size
());
assertEquals
(
4
,
handler
.
getFeatureCount
());
assertEquals
(
4
,
handler
.
getFeatureCount
());
...
...
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