diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a41082d26e..886c5cf5fb 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,4 @@ ## Changelog for v1.0.1 - Upgrade dependencies H2, H2GIS, JTS and Groovy +- Fix some tests due to some rounding precision in JTS 1.20 diff --git a/geoindicators/src/test/groovy/org/orbisgis/geoclimate/geoindicators/WorkflowGeoIndicatorsTest.groovy b/geoindicators/src/test/groovy/org/orbisgis/geoclimate/geoindicators/WorkflowGeoIndicatorsTest.groovy index 121952ae4c..f7c78ea120 100644 --- a/geoindicators/src/test/groovy/org/orbisgis/geoclimate/geoindicators/WorkflowGeoIndicatorsTest.groovy +++ b/geoindicators/src/test/groovy/org/orbisgis/geoclimate/geoindicators/WorkflowGeoIndicatorsTest.groovy @@ -373,6 +373,7 @@ class WorkflowGeoIndicatorsTest { "", "", "", "", ["indicatorUse": indicatorUse, svfSimplified: false], prefixName) assertNotNull(geoIndicatorsCompute_i) + datasource.save(geoIndicatorsCompute_i.rsu_indicators, "/tmp/test4.geojson", true) checkRSUIndicators(datasource, geoIndicatorsCompute_i.rsu_indicators) if (indicatorUse.contains("UTRF")) { @@ -601,11 +602,11 @@ class WorkflowGeoIndicatorsTest { countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE water_fraction>0".toString()) assertEquals(2, countResult.count) - //Check low_vegetation_fraction > 0 - countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE low_vegetation_fraction>0".toString()) - assertEquals(55, countResult.count) + //Check low_vegetation_fraction > 0.001 + countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE low_vegetation_fraction>0.001".toString()) + assertEquals(49, countResult.count) - //Check low_vegetation_fraction > 0 + //Check impervious_fraction > 0 countResult = datasource.firstRow("select count(*) as count from ${rsuIndicatorsTableName} WHERE impervious_fraction>0".toString()) assertEquals(0, countResult.count) }