示例#1
0
 def test_get_vector_points_warning(self):
     point = ogr.Geometry(ogr.wkbPoint)
     point.AddPoint(1198054.34, 648493.09)
     self.assertWarns(UserWarning,
                      lambda: list(georef.get_vector_points(point)))
示例#2
0
 def test_transform_geometry(self):
     geom = georef.transform_geometry(self.projobj, dest_srs=self.wgs84)
     x = list(georef.get_vector_points(geom))[0]
     np.testing.assert_allclose(x, self.lonlat)
示例#3
0
 def test_get_vector_points(self):
     # this also tests equality with `ogr_to_numpy`
     x = np.array(list(georef.get_vector_points(self.ogrobj))[0])
     y = georef.ogr_to_numpy(self.ogrobj)
     np.testing.assert_allclose(x, y)
示例#4
0
 def test_get_vector_points(self):
     # this also tests equality with `ogr_to_numpy`
     x = np.array(list(georef.get_vector_points(self.ogrobj))[0])
     y = georef.ogr_to_numpy(self.ogrobj)
     np.testing.assert_allclose(x, y)
示例#5
0
 def test_transform_geometry(self):
     geom = georef.transform_geometry(self.projobj, dest_srs=self.wgs84)
     x = list(georef.get_vector_points(geom))[0]
     np.testing.assert_allclose(x, self.lonlat)
示例#6
0
 def test_get_vector_points_warning(self):
     point_wkt = "POINT (1198054.34 648493.09)"
     point = ogr.CreateGeometryFromWkt(point_wkt)
     with self.assertWarns(UserWarning):
         list(georef.get_vector_points(point))
示例#7
0
 def test_get_vector_points_warning(self):
     point = ogr.Geometry(ogr.wkbPoint)
     point.AddPoint(1198054.34, 648493.09)
     self.assertWarns(UserWarning,
                      lambda: list(georef.get_vector_points(point)))