diff --git a/src/operation/valid/IsSimpleOp.cpp b/src/operation/valid/IsSimpleOp.cpp
index e072f99fd6..61e966b4c7 100644
--- a/src/operation/valid/IsSimpleOp.cpp
+++ b/src/operation/valid/IsSimpleOp.cpp
@@ -145,6 +145,8 @@ IsSimpleOp::isSimpleMultiPoint(const MultiPoint& mp)
for (std::size_t i = 0; i < mp.getNumGeometries(); i++) {
const Point* pt = mp.getGeometryN(i);
+ if (pt->isEmpty())
+ continue;
const CoordinateXY* p = pt->getCoordinate();
if (points.find(*p) != points.end()) {
nonSimplePts.push_back(*p);
diff --git a/tests/xmltester/tests/general/TestSimple.xml b/tests/xmltester/tests/general/TestSimple.xml
index e8838d124c..a75cdb1f81 100644
--- a/tests/xmltester/tests/general/TestSimple.xml
+++ b/tests/xmltester/tests/general/TestSimple.xml
@@ -49,6 +49,14 @@
+
+ mP - with empty element
+
+ MULTIPOINT (EMPTY, (80 220), (160 220))
+
+ true
+
+
L - simple line
@@ -246,7 +254,7 @@
mL - intersection between elements at non-vertex
MULTILINESTRING(
- (40 140, 160 40),
+ (40 140, 160 40),
(160 140, 40 40))
@@ -260,7 +268,7 @@
mL - no intersection between elements
MULTILINESTRING(
- (20 160, 20 20),
+ (20 160, 20 20),
(100 160, 100 20))
@@ -273,7 +281,7 @@
mL - mutual intersection at endpoints only
- MULTILINESTRING ((60 140, 20 80, 60 40),
+ MULTILINESTRING ((60 140, 20 80, 60 40),
(60 40, 100 80, 60 140))
@@ -286,7 +294,7 @@
mL - one element is non-simple
- MULTILINESTRING ((60 40, 140 40, 100 120, 100 0),
+ MULTILINESTRING ((60 40, 140 40, 100 120, 100 0),
(100 200, 200 120))
@@ -299,8 +307,8 @@
mL - proper intersection between elements at vertex
- MULTILINESTRING ((40 120, 100 60),
- (160 120, 100 60),
+ MULTILINESTRING ((40 120, 100 60),
+ (160 120, 100 60),
(40 60, 160 60))
@@ -313,7 +321,7 @@
mL - intersection between closed lines
- MULTILINESTRING ((80 160, 40 220, 40 100, 80 160),
+ MULTILINESTRING ((80 160, 40 220, 40 100, 80 160),
(80 160, 120 220, 120 100, 80 160))
@@ -326,8 +334,8 @@
mL - intersection between closed and open lines
- MULTILINESTRING ((80 160, 40 220),
- (80 160, 120 220, 120 100, 80 160),
+ MULTILINESTRING ((80 160, 40 220),
+ (80 160, 120 220, 120 100, 80 160),
(40 100, 80 160))
@@ -349,6 +357,14 @@
+
+ mL - with empty element
+
+ MULTILINESTRING ((0 0, 100 100), EMPTY)
+
+ true
+
+
LR - valid ring
@@ -400,7 +416,7 @@
false
-
+
A - polygon with equal segments
POLYGON ((50 90, 90 90, 90 50, 50 50, 10 10, 50 50, 50 90))
@@ -408,7 +424,7 @@
false
-
+
A - empty
@@ -422,8 +438,8 @@
mA - valid polygon
- MULTIPOLYGON (((240 160, 140 220, 80 60, 220 40, 240 160)),
- ((160 380, 100 240, 20 380, 160 380),
+ MULTIPOLYGON (((240 160, 140 220, 80 60, 220 40, 240 160)),
+ ((160 380, 100 240, 20 380, 160 380),
(120 340, 60 360, 80 320, 120 340)))
@@ -434,8 +450,8 @@
mA - with touching elements
- MULTIPOLYGON (((240 160, 100 240, 80 60, 220 40, 240 160)),
- ((160 380, 100 240, 20 380, 160 380),
+ MULTIPOLYGON (((240 160, 100 240, 80 60, 220 40, 240 160)),
+ ((160 380, 100 240, 20 380, 160 380),
(120 340, 60 360, 80 320, 120 340)))
@@ -453,12 +469,20 @@ MULTIPOLYGON (((100 100, 100 200, 200 100, 200 200, 100 100)), ((100 400, 200 40
+
+ mA - with empty element
+
+MULTIPOLYGON (((0 10, 10 10, 10 0, 0 0, 0 10)), EMPTY)
+
+ true
+
+
GC - all components simple
-GEOMETRYCOLLECTION (POLYGON ((100 200, 200 200, 200 100, 100 100, 100 200)),
- LINESTRING (100 300, 200 250),
- POINT (250 250),
+GEOMETRYCOLLECTION (POLYGON ((100 200, 200 200, 200 100, 100 100, 100 200)),
+ LINESTRING (100 300, 200 250),
+ POINT (250 250),
POINT (250 150))
true
@@ -468,13 +492,22 @@ GEOMETRYCOLLECTION (POLYGON ((100 200, 200 200, 200 100, 100 100, 100 200)),
GC - one non-simple component
-GEOMETRYCOLLECTION (POLYGON ((100 100, 100 200, 200 100, 200 200, 100 100)),
- LINESTRING (100 300, 200 250),
- POINT (250 250),
+GEOMETRYCOLLECTION (POLYGON ((100 100, 100 200, 200 100, 200 200, 100 100)),
+ LINESTRING (100 300, 200 250),
+ POINT (250 250),
POINT (250 150))
false
+
+ GC - with empty element
+
+GEOMETRYCOLLECTION (POLYGON ((0 10, 10 10, 10 0, 0 0, 0 10)),
+ LINESTRING (100 300, 200 250),
+ POINT EMPTY)
+ true
+
+