diff --git a/osmtools/src/test/groovy/org/orbisgis/geoclimate/osmtools/AbstractOSMToolsTest.groovy b/osmtools/src/test/groovy/org/orbisgis/geoclimate/osmtools/AbstractOSMToolsTest.groovy index c1d1afd542..3c74616879 100644 --- a/osmtools/src/test/groovy/org/orbisgis/geoclimate/osmtools/AbstractOSMToolsTest.groovy +++ b/osmtools/src/test/groovy/org/orbisgis/geoclimate/osmtools/AbstractOSMToolsTest.groovy @@ -114,8 +114,8 @@ abstract class AbstractOSMToolsTest { ('POINT(0 10)', 3),('POINT(10 10)', 4); CREATE TABLE ${prefix}_way_node(id_way int, id_node int, node_order int); - INSERT INTO ${prefix}_way_node VALUES(1, 1, 1),(1, 2, 2),(1, 3, 3), - (1, 4, 4),(1, 1, 5); + INSERT INTO ${prefix}_way_node VALUES(1, 1, 1),(1, 2, 2),(1, 4, 3), + (1, 5, 4),(1, 1, 5); CREATE TABLE ${prefix}_way(id_way int); INSERT INTO ${prefix}_way VALUES(1); diff --git a/osmtools/src/test/groovy/org/orbisgis/geoclimate/osmtools/TransformTest.groovy b/osmtools/src/test/groovy/org/orbisgis/geoclimate/osmtools/TransformTest.groovy index 5c6512e488..a678377e12 100644 --- a/osmtools/src/test/groovy/org/orbisgis/geoclimate/osmtools/TransformTest.groovy +++ b/osmtools/src/test/groovy/org/orbisgis/geoclimate/osmtools/TransformTest.groovy @@ -257,7 +257,7 @@ class TransformTest extends AbstractOSMToolsTest { @Test void extractWaysAsPolygonsTest() { def prefix = "OSM_" + uuid() - def epsgCode = 2453 + def epsgCode = 4326 def tags = [building: "house"] def columnsToKeep = ["water", "building"] @@ -562,13 +562,13 @@ class TransformTest extends AbstractOSMToolsTest { def tags = ["building"] String outputTableName = OSMTools.Transform.toPolygons(ds, prefix, 4326, tags) assertEquals 6, ds.firstRow("select count(*) as count from ${outputTableName} where ST_NumInteriorRings(the_geom) > 0").count as int - assertEquals 1032, ds.firstRow("select count(*) as count from ${outputTableName} where ST_NumInteriorRings(the_geom) = 0").count as int + assertEquals 1028, ds.firstRow("select count(*) as count from ${outputTableName} where ST_NumInteriorRings(the_geom) = 0").count as int //Create landuse layer tags = ["landuse": ["farmland", "forest", "grass", "meadow", "orchard", "vineyard", "village_green", "allotments"],] outputTableName = OSMTools.Transform.toPolygons(ds, prefix, 4326, tags) - assertEquals 131, ds.firstRow("select count(*) as count from ${outputTableName}").count as int - assertEquals 123, ds.firstRow("select count(*) as count from ${outputTableName} where \"landuse\"='grass'").count as int + assertEquals 130, ds.firstRow("select count(*) as count from ${outputTableName}").count as int + assertEquals 122, ds.firstRow("select count(*) as count from ${outputTableName} where \"landuse\"='grass'").count as int //Create urban areas layer tags = ["landuse": [ @@ -579,8 +579,8 @@ class TransformTest extends AbstractOSMToolsTest { ]] outputTableName = OSMTools.Transform.toPolygons(ds, prefix, 4326, tags) - assertEquals 6, ds.firstRow("select count(*) as count from ${outputTableName}").count as int - assertEquals 4, ds.firstRow("select count(*) as count from ${outputTableName} where \"landuse\"='residential'").count as int + assertEquals 5, ds.firstRow("select count(*) as count from ${outputTableName}").count as int + assertEquals 3, ds.firstRow("select count(*) as count from ${outputTableName} where \"landuse\"='residential'").count as int }