Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xrspatial/tests/general_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def create_test_raster(
backend='numpy',
name='myraster',
dims=['y', 'x'],
attrs={'res': (0.5, 0.5), 'crs': 'EPSG: 5070'},
attrs={'res': (0.5, 0.5), 'crs': 'EPSG:5070'},
chunks=(3, 3)
):
raster = xr.DataArray(data, name=name, dims=dims, attrs=attrs)
Expand Down
2 changes: 1 addition & 1 deletion xrspatial/tests/test_aspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def _rectangular_cell_raster(backend='numpy', xres=10.0, yres=1.0):
data = (X + Y).astype(np.float64)
return create_test_raster(
data, backend=backend,
attrs={'res': (xres, yres), 'crs': 'EPSG: 5070'})
attrs={'res': (xres, yres), 'crs': 'EPSG:5070'})


@pytest.mark.parametrize("backend", ['numpy', 'dask+numpy'])
Expand Down
2 changes: 1 addition & 1 deletion xrspatial/tests/test_contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ def test_geopandas_crs_from_attrs(self):
"""return_type='geopandas' copies agg.attrs['crs'] onto the gdf."""
pytest.importorskip("geopandas")
data = _make_peak()
# create_test_raster sets attrs={'res': ..., 'crs': 'EPSG: 5070'}.
# create_test_raster sets attrs={'res': ..., 'crs': 'EPSG:5070'}.
agg = create_test_raster(data, backend='numpy')
gdf = contours(agg, levels=[1.5], return_type="geopandas")
# GeoPandas normalizes the CRS; check it resolves to EPSG:5070.
Expand Down
2 changes: 1 addition & 1 deletion xrspatial/tests/test_multispectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ def _tc_band(backend):
data = np.random.default_rng(3429).random((6, 6)).astype(np.float32)
return create_test_raster(
data, backend=backend, dims=['lat', 'lon'],
attrs={'res': (0.5, 0.5), 'crs': 'EPSG: 5070'},
attrs={'res': (0.5, 0.5), 'crs': 'EPSG:5070'},
)


Expand Down
2 changes: 1 addition & 1 deletion xrspatial/tests/test_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def test_res_passthrough_unchanged():
def test_no_res_attr_stays_absent():
"""preview should not invent a res when the input never had one."""
data = np.random.default_rng(1).random((200, 400)).astype(np.float32)
agg = create_test_raster(data, attrs={'crs': 'EPSG: 5070'})
agg = create_test_raster(data, attrs={'crs': 'EPSG:5070'})
assert 'res' not in agg.attrs
result = preview(agg, width=40)
assert 'res' not in result.attrs
Expand Down
Loading