src/java/m/crp1/erosion/V3_0.java
@@ -338,14 +338,16 @@ |
} |
|
protected String findMupolygonKeyByCentroid(SOILS_DATA soilsDb, GISObject centroid) throws SQLException { |
- try (Statement stmt = soilsDb.getConnection().createStatement();) { |
- String query = "select cast('' as xml).value(\n" |
- + " 'xs:base64Binary(sql:column(\"mugeo\"))', 'varchar(max)' )" |
- + " as geo from (SELECT mupolygongeo.STAsBinary() as mugeo " |
- + " FROM mupolygon WITH (index(SI_mupolygon_24876)) " |
- + " WHERE mupolygongeo.STContains(geometry::STGeomFromText('" + centroid.toWKT() + "', 4326))=1 ) as a"; |
|
- ResultSet results = stmt.executeQuery(query); |
+ try (PreparedStatement stmt = soilsDb.getConnection().prepareStatement( |
+ "select cast('' as xml).value(\n" |
+ + " 'xs:base64Binary(sql:column(\"mugeo\"))', 'varchar(max)' )" |
+ + " as geo from (SELECT mupolygongeo.STAsBinary() as mugeo " |
+ + " FROM mupolygon WITH (index(SI_mupolygon_24876)) " |
+ + " WHERE mupolygongeo.STContains(geometry::STGeomFromText('?', 4326))=1 ) as a" |
+ )) { |
+ stmt.setString(1, centroid.toWKT()); |
+ ResultSet results = stmt.executeQuery(); |
if (results.next()) { |
return results.getString("geo"); |
} else { |
web/WEB-INF/csip-defaults.json
@@ -1,3 +1,3 @@ |
{ |
- "csip.context.version": "$version: 0.0.0 xxxxxxx date, built at 2023-11-27 13:50 by scase_work$" |
+ "csip.context.version": "$version: 0.0.0 xxxxxxx date, built at 2023-11-27 15:00 by scase_work$" |
} |