コード例 #1
0
ファイル: test_clipper.py プロジェクト: borysiasty/inasafe
 def test_explodeMultiPointGeometry(self):
     """Test exploding POINT multipart to single part geometries works"""
     myGeometry = QgsGeometry.fromWkt('MULTIPOINT((-0.966314 0.445890),'
                                      '(-0.281133 0.555729))')
     myCollection = explode_multipart_geometry(myGeometry)
     message = 'Expected 2 parts from multipart point geometry'
     assert len(myCollection) == 2, message
コード例 #2
0
ファイル: test_clipper.py プロジェクト: danylaksono/inasafe
 def test_explodeMultiPointGeometry(self):
     """Test exploding POINT multipart to single part geometries works"""
     myGeometry = QgsGeometry.fromWkt(
         'MULTIPOINT((-0.966314 0.445890),'
         '(-0.281133 0.555729))')
     myCollection = explode_multipart_geometry(myGeometry)
     myMessage = 'Expected 2 parts from multipart point geometry'
     assert len(myCollection) == 2, myMessage
コード例 #3
0
ファイル: test_clipper.py プロジェクト: danylaksono/inasafe
 def test_explodeMultiLineGeometry(self):
     """Test exploding LINES multipart to single part geometries works"""
     myGeometry = QgsGeometry.fromWkt(
         'MULTILINESTRING((-0.974159 0.526961,'
         ' -0.291594 0.644645), (-0.411893 0.728331,'
         ' -0.160834 0.568804))')
     myCollection = explode_multipart_geometry(myGeometry)
     myMessage = 'Expected 2 parts from multipart line geometry'
     assert len(myCollection) == 2, myMessage
コード例 #4
0
ファイル: test_clipper.py プロジェクト: borysiasty/inasafe
 def test_explodeMultiLineGeometry(self):
     """Test exploding LINES multipart to single part geometries works"""
     myGeometry = QgsGeometry.fromWkt(
         'MULTILINESTRING((-0.974159 0.526961,'
         ' -0.291594 0.644645), (-0.411893 0.728331,'
         ' -0.160834 0.568804))')
     myCollection = explode_multipart_geometry(myGeometry)
     message = 'Expected 2 parts from multipart line geometry'
     assert len(myCollection) == 2, message
コード例 #5
0
ファイル: test_clipper.py プロジェクト: danylaksono/inasafe
 def test_explodeMultiPolygonGeometry(self):
     """Test exploding POLY multipart to single part geometries works"""
     myGeometry = QgsGeometry.fromWkt(
         'MULTIPOLYGON(((-0.966314 0.445890,'
         '-0.281133 0.555729,-0.092839 0.218369,-0.908780 0.035305,'
         '-0.966314 0.445890)),((-0.906164 0.003923,-0.077148 0.197447,'
         '0.043151 -0.074533,-0.882628 -0.296824,-0.906164 0.003923)))')
     myCollection = explode_multipart_geometry(myGeometry)
     myMessage = 'Expected 2 parts from multipart polygon geometry'
     assert len(myCollection) == 2, myMessage
コード例 #6
0
ファイル: test_clipper.py プロジェクト: borysiasty/inasafe
 def test_explodeMultiPolygonGeometry(self):
     """Test exploding POLY multipart to single part geometries works"""
     myGeometry = QgsGeometry.fromWkt(
         'MULTIPOLYGON(((-0.966314 0.445890,'
         '-0.281133 0.555729,-0.092839 0.218369,-0.908780 0.035305,'
         '-0.966314 0.445890)),((-0.906164 0.003923,-0.077148 0.197447,'
         '0.043151 -0.074533,-0.882628 -0.296824,-0.906164 0.003923)))')
     myCollection = explode_multipart_geometry(myGeometry)
     message = 'Expected 2 parts from multipart polygon geometry'
     assert len(myCollection) == 2, message