File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,12 @@ originally created by Brandon Liu for Protomaps.
17
17
- Async ` mmap ` (Tokio) for local files
18
18
- Async ` http ` and ` https ` (Reqwuest + Tokio) for URLs
19
19
- Async ` s3 ` (Rust-S3 + Tokio) for S3-compatible buckets
20
+ - Creating PMTile archives
20
21
21
22
## Plans & TODOs
22
23
23
24
- [ ] Documentation and example code
24
- - [ ] Support writing and conversion to and from MBTiles + ` x/y/z `
25
+ - [ ] Support conversion to and from MBTiles + ` x/y/z `
25
26
- [ ] Support additional backends (sync ` mmap ` and ` http ` at least)
26
27
- [ ] Support additional async styles (e.g., ` async-std ` )
27
28
Original file line number Diff line number Diff line change
1
+ //! Read and write `PMTiles` according to the [PMTiles v3 spec](https://github.com/protomaps/PMTiles/blob/master/spec/v3/spec.md).
2
+ //!
3
+ //! ## Writing a `PMTiles` file
4
+ //!
5
+ //! ```rust
6
+ //! use pmtiles::{PmTilesWriter, TileType};
7
+ //! use std::fs::File;
8
+ //!
9
+ //! # let tile_0_0_0 = vec![];
10
+ //! let file = File::create("tiles.pmtiles").unwrap();
11
+ //! let mut writer = PmTilesWriter::new(TileType::Mvt).create(file).unwrap();
12
+ //! writer.add_tile(0, &tile_0_0_0).unwrap();
13
+ //! writer.finish().unwrap();
14
+ //! ```
15
+ //!
16
+
1
17
#![ forbid( unsafe_code) ]
2
18
3
19
#[ cfg( feature = "__async" ) ]
You can’t perform that action at this time.
0 commit comments