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)))
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)
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)
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))