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
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,23 @@ metadata:
version: 1

sources:
- name: Elevation
key: elevation-user
- name: Global Elevation Example
key: elevation-example
text: Elevation
description: Global elevation
description: Global elevation example
geometry_type: raster
shade_how: linear
span: min/max
cmap:
- white
- black
span:
- 58
- 248
raster_padding: 0
raster_interpolate: linear
xfield: geometry
yfield: geometry
filepath: ~/mapshader/mapshader/tests/fixtures/elevation.tif
filepath: mapshader/tests/fixtures/elevation.tif
transforms:
- name: squeeze
args:
Expand All @@ -82,6 +88,8 @@ sources:
- name: reproject_raster
args:
epsg: 3857
service_types:
- tile
```

This configuration file can then be passed to the flask server upon startup:
Expand Down
2 changes: 1 addition & 1 deletion mapshader/commands/tif_to_netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def tif_to_netcdf(
arr = reproject_raster(arr, epsg=crs)

dataset = xr.Dataset(
data_vars={data_variable: (['y', 'x'], arr.chunk(chunks))},
data_vars={data_variable: (['y', 'x'], arr.chunk(chunks).data)},
coords={'x': arr.coords[x], 'y': arr.coords[y]},
)
dataset.attrs = dict(name=data_variable)
Expand Down
Binary file modified mapshader/tests/fixtures/shade.nc
Binary file not shown.