{"id":18606694,"url":"https://github.com/evomassiny/tiler-rs","last_synced_at":"2025-04-10T20:31:55.468Z","repository":{"id":257597031,"uuid":"101322818","full_name":"evomassiny/tiler-rs","owner":"evomassiny","description":"A simple Tile generator","archived":false,"fork":false,"pushed_at":"2022-01-08T15:25:46.000Z","size":20397,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T04:18:53.582Z","etag":null,"topics":["netcdf","rust","tile"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evomassiny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-24T17:52:23.000Z","updated_at":"2023-11-16T09:46:28.000Z","dependencies_parsed_at":"2024-09-17T17:00:27.572Z","dependency_job_id":"a6886b13-7ec6-4dbd-a432-6b356b6b0669","html_url":"https://github.com/evomassiny/tiler-rs","commit_stats":null,"previous_names":["evomassiny/tiler-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evomassiny%2Ftiler-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evomassiny%2Ftiler-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evomassiny%2Ftiler-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evomassiny%2Ftiler-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evomassiny","download_url":"https://codeload.github.com/evomassiny/tiler-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290041,"owners_count":21078923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["netcdf","rust","tile"],"created_at":"2024-11-07T02:26:45.578Z","updated_at":"2025-04-10T20:31:55.102Z","avatar_url":"https://github.com/evomassiny.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![test status](https://travis-ci.org/evomassiny/tiler-rs.svg?branch=master)\n\n# About\nThis simple rust crate creates Web Mercator Tiles from netCDF datasets, suitable for Js viewer, such as leaflet.\n\nIt uses the [rust-netcdf](https://github.com/mhiley/rust-netcdf) to manipulate netCDF files.\n\nThis is a weekend project, don't expect too much of it.\n\nComments and feedback are welcomed and appreciated.\n\n# Usage\n\n## Documentation\nThe crate documentation is available [here](https://evomassiny.github.io/tiler-rs/tiler/index.html).\n\n## Requirements\n\n* This crate uses a [libnetcdf wrapper](https://github.com/mhiley/rust-netcdf), so you need to have the libnetcdf installed, on debian-based distro :\n```bash\nsudo apt-get install libhdf5-serial-dev netcdf-bin libnetcdf-dev\n```\n\n* Then you should be able to build it using the rust package manager *cargo*:\n```bash\ncargo build --release\n```\n\n* Run a test example (this will create tiles from the **examples_data/wind_magnitude_reduced.nc** file into *examples_data/cache*)\n```bash\ncargo run --release --example static_file_generator\n```\n\n## Example\nHere is a simple example:\n\n* In your Cargo.toml, add the following dependency:\n```\ntiler = { git = \"https://github.com/evomassiny/tiler-rs.git\", branch = \"master\" }\n\n```\n\n* In your code :\n```rust\nextern crate tiler;\n\nfn main()  {\n    // Create a dataset from a netCDF file\n    let dataset = tiler::Dataset::new(\n        \"latitude\",         // Name of the latitude dimension\n        \"longitude\",        // Name of the longitude dimension\n        \"wind_magnitude\",   // Name of the latitude dimension\n        \"./examples_data/wind_magnitude_reduced.nc\" // Path to a dataset\n    ).unwrap();\n\n    // Create a renderer\n    let renderer = tiler::Renderer::from_dataset(\n        dataset,                // input dataset\n        tiler::Scale::Linear {  // use a linear value to color translation\n            min: 0.,            // minimum value of the colormap\n            max: 20.            // maximum value of the colormap\n        },           \n        tiler::ColorMap::RdYlBu_r   // The ColorMap you want to use, (Red Yellow Blue inverted)\n    ).unwrap();\n\n    // create a Tile Struct\n    let tile = tiler::Tile {x: 0, y: 0, z: 0 };\n\n    // render it into an image and save it\n    if let Ok(img) = renderer.render_tile(\u0026tile) {\n        // save it as a png file\n        img.save(\"./tile_0_0_0.png\");\n    }\n}\n\n```\nBy running it using the provided exemple dataset, you will create the following  png file `tile_0_0_0.png`:\n![exemple generated image](./examples_data/tile_0_0_0.png)\n\nThe dataset itself represents the wind speed magnitude on a particular time (03:00 01/08/2017), it comes from the [NOAA](http://www.noaa.gov/) Climat Forecast System.\n\n## Dataset limitations\nFor this library to work, you need to provide a netCDF file:\n\n* With structured data (gridded)\n\n* Expressed in WGS84 coordinates \n\n* With bi-dimensional variables (latititude, longitude)\n\n* With sorted longitude and latitude dimensions (in ascending or descending order).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevomassiny%2Ftiler-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevomassiny%2Ftiler-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevomassiny%2Ftiler-rs/lists"}