def test__fail_unsupported_coord_system(self): cs = Orthographic(0, 0) test_cube = self._make_test_cube(cs=cs) with self.assertRaisesRegexp( ValueError, 'Grib saving is not supported for coordinate system:'): grid_definition_section(test_cube, self.mock_grib)
def setUp(self): self.latitude_of_projection_origin = 0.0 self.longitude_of_projection_origin = 0.0 self.semi_major_axis = 6377563.396 self.semi_minor_axis = 6356256.909 self.ellipsoid = GeogCS(self.semi_major_axis, self.semi_minor_axis) self.ortho_cs = Orthographic(self.latitude_of_projection_origin, self.longitude_of_projection_origin, ellipsoid=self.ellipsoid)
def test_optional_args_None(self): # Check expected defaults with optional args=None. crs = Orthographic(0, 0, false_easting=None, false_northing=None) self._check_crs_defaults(crs)
def test_no_optional_args(self): # Check expected defaults with no optional args. crs = Orthographic(0, 0) self._check_crs_defaults(crs)
def test_set_optional_args(self): # Check that setting the optional (non-ellipse) args works. crs = Orthographic(0, 0, false_easting=100, false_northing=-203.7) self.assertEqualAndKind(crs.false_easting, 100.0) self.assertEqualAndKind(crs.false_northing, -203.7)