@@ -675,10 +675,10 @@ def test_geometry_types(self):
675
675
("Point M" , 2001 , True ),
676
676
("LineString M" , 2002 , True ),
677
677
("Polygon M" , 2003 , True ),
678
- ("MultiPoint M" , 2004 , False ),
679
- ("MultiLineString M" , 2005 , False ),
680
- ("MultiPolygon M" , 2006 , False ),
681
- ("GeometryCollection M" , 2007 , False ),
678
+ ("MultiPoint M" , 2004 , True ),
679
+ ("MultiLineString M" , 2005 , True ),
680
+ ("MultiPolygon M" , 2006 , True ),
681
+ ("GeometryCollection M" , 2007 , True ),
682
682
("CircularString M" , 2008 , False ),
683
683
("CompoundCurve M" , 2009 , False ),
684
684
("CurvePolygon M" , 2010 , False ),
@@ -690,10 +690,10 @@ def test_geometry_types(self):
690
690
("Point ZM" , 3001 , True ),
691
691
("LineString ZM" , 3002 , True ),
692
692
("Polygon ZM" , 3003 , True ),
693
- ("MultiPoint ZM" , 3004 , False ),
694
- ("MultiLineString ZM" , 3005 , False ),
695
- ("MultiPolygon ZM" , 3006 , False ),
696
- ("GeometryCollection ZM" , 3007 , False ),
693
+ ("MultiPoint ZM" , 3004 , True ),
694
+ ("MultiLineString ZM" , 3005 , True ),
695
+ ("MultiPolygon ZM" , 3006 , True ),
696
+ ("GeometryCollection ZM" , 3007 , True ),
697
697
("CircularString ZM" , 3008 , False ),
698
698
("CompoundCurve ZM" , 3009 , False ),
699
699
("CurvePolygon ZM" , 3010 , False ),
@@ -943,6 +943,30 @@ def test_polygon_m_dimension(self):
943
943
geom .shell .wkt , "LINEARRING (0 0 0,10 0 0,10 10 0,0 10 0,0 0 0)"
944
944
)
945
945
946
+ def test_multi_geometries_m_dimension (self ):
947
+ tests = [
948
+ "MULTIPOINT M ((10 40 10), (40 30 10), (20 20 10))" ,
949
+ "MULTIPOINT ZM ((10 40 0 10), (40 30 1 10), (20 20 1 10))" ,
950
+ "MULTILINESTRING M ((10 10 1, 20 20 2),(40 40 1, 30 30 2))" ,
951
+ "MULTILINESTRING ZM ((10 10 0 1, 20 20 0 2),(40 40 1, 30 30 0 2))" ,
952
+ (
953
+ "MULTIPOLYGON ZM (((30 20 1 0, 45 40 1 0, 30 20 1 0)),"
954
+ "((15 5 0 0, 40 10 0 0, 15 5 0 0)))"
955
+ ),
956
+ (
957
+ "GEOMETRYCOLLECTION M (POINT M (40 10 0),"
958
+ "LINESTRING M (10 10 0, 20 20 0, 10 40 0))"
959
+ ),
960
+ (
961
+ "GEOMETRYCOLLECTION ZM (POINT ZM (40 10 0 1),"
962
+ "LINESTRING ZM (10 10 1 0, 20 20 1 0, 10 40 1 0))"
963
+ ),
964
+ ]
965
+ for geom_input in tests :
966
+ with self .subTest (geom_input = geom_input ):
967
+ geom = OGRGeometry (geom_input )
968
+ self .assertIs (geom .is_measured , True )
969
+
946
970
947
971
class DeprecationTests (SimpleTestCase ):
948
972
def test_coord_setter_deprecation (self ):
0 commit comments