diff --git a/modules/core/src/main/java/org/locationtech/jts/geom/MultiPoint.java b/modules/core/src/main/java/org/locationtech/jts/geom/MultiPoint.java index 7fb61c1e8e..0080a44761 100644 --- a/modules/core/src/main/java/org/locationtech/jts/geom/MultiPoint.java +++ b/modules/core/src/main/java/org/locationtech/jts/geom/MultiPoint.java @@ -87,10 +87,6 @@ protected MultiPoint reverseInternal() { } return new MultiPoint(points, factory); } - - public boolean isValid() { - return true; - } public boolean equalsExact(Geometry other, double tolerance) { if (!isEquivalentClass(other)) { diff --git a/modules/tests/src/test/resources/testxml/general/TestValid.xml b/modules/tests/src/test/resources/testxml/general/TestValid.xml index cd201977d5..4ef18654aa 100644 --- a/modules/tests/src/test/resources/testxml/general/TestValid.xml +++ b/modules/tests/src/test/resources/testxml/general/TestValid.xml @@ -60,7 +60,7 @@ - P - repeated points + mP - repeated points MULTIPOINT((10 10), (20 20), (30 30), (10 10)) @@ -69,6 +69,16 @@ + + mP - invalid point + + MULTIPOINT((10 10), (20 20), (30 30), (10 NaN)) + + + false + + + L - empty @@ -141,6 +151,14 @@ LINESTRING (40 180, 120 120, 140 200, 140 200, 200 140, 240 200) + + mL - MultiLinestring with invalid point + MULTILINESTRING((1 1, 2 NaN, 0 0)) + + false + + + A - zero-area polygon POLYGON ((0 0, 0 0, 0 0, 0 0, 0 0))