Cannot reproduce wind visualisation Raster MTS example
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 141
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
We are looking to use the Raster MTS to serve NetCDFs, but we've struggled with our uploaded Tilesets reporting sum_area: 0 and not having any data when we open them in Mapbox Studio. Eventually, we tried to reproduce the wind visualisation example exactly, but even this appears to have this problem.
I've downloaded the NetCDF supplied on the page as gfs-wind.nc. Here's the recipe, as specified on the example page (I've substituted in our account name and the source name), saved as recipe-gfs.json:
{
"version": 1,
"type": "rasterarray",
"sources": [
{
"uri": "mapbox://tileset-source/example-org/gfs-wind"
}
],
"minzoom": 0,
"maxzoom": 3,
"layers": {
"10winds": {
"tilesize": 256,
"resampling": "bilinear",
"buffer": 1,
"source_rules": {
"filter":
[
["all",["==",["get","NETCDF_VARNAME"],"u-component_of_wind_height_above_ground"],
["==",["get","NETCDF_DIM_height_above_ground2"],"10"]],
["all",["==",["get","NETCDF_VARNAME"],"v-component_of_wind_height_above_ground"],
["==",["get","NETCDF_DIM_height_above_ground2"],"10"]]
],
"name": ["to-number", ["get", "NETCDF_DIM_time"]],
"sort_key":["to-number",["get","NETCDF_DIM_time"]],
"order": "asc"
}
}
}
}
Then I've run:
tilesets upload-raster-source example-org gfs-wind ./gfs-wind.nc
tilesets create example-org.tiles-gfs-wind --recipe recipe-gfs.json --name "Test - GFS wind"
tilesets publish example-org.tiles-gfs-wind
When I run tilesets job, I get output that includes:
"layer_stats": {
"10winds": {
"minzoom": 0,
"maxzoom": 3,
"zooms": {
"0": {
"sum_area": 0
}
}
}
},
And in Mapbox Studio link supplied by tilesets job we see the following:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the documented wind visualisation example with the supplied gfs-wind.nc, recipe-gfs.json, and the listed tilesets commands. Inspect the tilesets job output, especially layer_stats and sum_area; the issue is done when the example produces populated zoom levels and visible data in Mapbox Studio.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100