Commit 25b56fba authored by Riegel's avatar Riegel
Browse files

Fix: Use double primitive

parent d30f0330
...@@ -138,12 +138,12 @@ public class DatabaseHandler { ...@@ -138,12 +138,12 @@ public class DatabaseHandler {
return cos; return cos;
} }
public static List<CityObject> getBufferIntersectingObjects(CityObject co, Double buffersize) { public static List<CityObject> getBufferIntersectingObjects(CityObject co, double bufferSize) {
List<CityObject> intersectingObjects = new ArrayList<>(); List<CityObject> intersectingObjects = new ArrayList<>();
try (Connection con = new ConnectionWrapper(H2GISDBFactory.openSpatialDataBase(DB_NAME))) { try (Connection con = new ConnectionWrapper(H2GISDBFactory.openSpatialDataBase(DB_NAME))) {
try (PreparedStatement ps = con.prepareStatement("SELECT gmlid, bbox, data, type FROM features AS tab1" + try (PreparedStatement ps = con.prepareStatement("SELECT gmlid, bbox, data, type FROM features AS tab1" +
" WHERE ST_INTERSECTS(ST_BUFFER(tab1.geom,?), (SELECT GEOM FROM features WHERE gmlid = ?)) AND tab1.gmlid <> ?")) { " WHERE ST_INTERSECTS(ST_BUFFER(tab1.geom,?), (SELECT GEOM FROM features WHERE gmlid = ?)) AND tab1.gmlid <> ?")) {
ps.setDouble(1, buffersize); ps.setDouble(1, bufferSize);
ps.setString(2, co.getGmlId().toString()); ps.setString(2, co.getGmlId().toString());
ps.setString(3, co.getGmlId().toString()); ps.setString(3, co.getGmlId().toString());
ResultSet rs = ps.executeQuery(); ResultSet rs = ps.executeQuery();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment