Exemplo n.º 1
0
 def test_multi_geom_conversion(self):
     points = Points([(0, 0), (1, 2.5)])
     geom = points.geom()
     self.assertIsInstance(geom, MultiPoint)
     self.assertEqual(len(geom), 2)
     self.assertEqual(np.column_stack(geom[0].xy), np.array([[0, 0]]))
     self.assertEqual(np.column_stack(geom[1].xy), np.array([[1, 2.5]]))
Exemplo n.º 2
0
 def test_single_geom_conversion(self):
     points = Points([(0, 0)])
     geom = points.geom()
     self.assertIsInstance(geom, Point)
     self.assertEqual(np.column_stack(geom.xy), np.array([[0, 0]]))
Exemplo n.º 3
0
 def test_empty_geom_conversion(self):
     points = Points([])
     self.assertEqual(points.geom(), GeometryCollection())