def test_radius_edmonton_decreasing_lat(self): """Ensures correct output from get_latlng_grid_points_in_radius. In this case, the test point is Edmonton and latitude decreases with row number. """ these_rows, these_columns, _ = grids.get_latlng_grid_points_in_radius( grid_point_latitudes_deg=RADIUS_TEST_LATITUDES_DEG[::-1], grid_point_longitudes_deg=RADIUS_TEST_LONGITUDES_DEG, test_latitude_deg=EDMONTON_LATITUDE_DEG, test_longitude_deg=EDMONTON_LONGITUDE_DEG, effective_radius_metres=EFFECTIVE_RADIUS_METRES) self.assertTrue( numpy.array_equal(these_rows, EDMONTON_ROWS_DECREASING_LAT)) self.assertTrue( numpy.array_equal(these_columns, EDMONTON_COLUMNS_DECREASING_LAT))
def test_radius_calgary_increasing_lat(self): """Ensures correct output from get_latlng_grid_points_in_radius. In this case, the test point is Calgary and latitude increases with row number. """ these_rows, these_columns, _ = grids.get_latlng_grid_points_in_radius( grid_point_latitudes_deg=RADIUS_TEST_LATITUDES_DEG, grid_point_longitudes_deg=RADIUS_TEST_LONGITUDES_DEG, test_latitude_deg=CALGARY_LATITUDE_DEG, test_longitude_deg=CALGARY_LONGITUDE_DEG, effective_radius_metres=EFFECTIVE_RADIUS_METRES) self.assertTrue( numpy.array_equal(these_rows, CALGARY_ROWS_INCREASING_LAT)) self.assertTrue( numpy.array_equal(these_columns, CALGARY_COLUMNS_INCREASING_LAT))