mactrem / com-tiles Goto Github PK
View Code? Open in Web Editor NEWStreamable and read optimized file archive for hosting map tiles at global scale on a cloud object storage
License: MIT License
Streamable and read optimized file archive for hosting map tiles at global scale on a cloud object storage
License: MIT License
The index table for a planet size vector tileset (z0 - z14) has currently about 3.1 gb in size.
Options to reduce the size:
Hello,
I would be really interested to see a new comparison between PMTiles and COMTiles as I haven't found any recent benchmark.
If anyone has any suggestion as to which one performs better, please let me know. I would really appreciate it.
Thanks!
Best Regards,
Filippos
The following primary requirements must be taken into consideration in the design of the index:
• Minimize the transferred amount of data and the number
of requests to reduce costs and latency
• Every tile in the archive can be requested with at most one
additional request
• Fast decoding of the index
As a case study evaluate the following approaches which have been already described on the spec page
Store only one absolute offset in addition to the size of the tiles in an index fragment.
Use a bit aligned encoding for the size of a tile, with a default bit width of 20 bits which allow a max tile size of 1 mb.
This leads to an index fragment size of 10k for 4096 index entries and an index size < 1 GB which can be also
handled well when a COMTiles archive is used in combination with a serverless tileserver e.g. hosted on AWS
lambda. A tile size of <= 1 MB is sufficient for a planet scale OSM MVT tileset e.g. generated with Planetiler.
In addition a different bit width can be specified in the COMTiles metadata section.
Reduce of the index size while continuing to meet the above specified requirements. One approach could be to use a Bitvector encoding to reduce the index size of sparse tilesets. Since over 50% of the COMTiles index fragments of an OSM vector tileset are not present, this approach could significantly reduce the size of the index. This could be inspired by the implicit tiling extension of the 3DTiles spec that contains an availability section to efficiently encode sparse datasets. This Bitvector is approximately smaller then 10kb for a planet-scale z14 tileset, which would not introduce to much additional latency. This could reduce the size of the index to about 400 Mb.
Use an additional fragment table
to allow the usage of a custom compression algorithm for the index fragments.
This could enable the usage of a tile duplication technique inspired by PMTiles, which significantly can reduce the
overall index size. The disadvantage is that this also leads to an additional initial fetch more.
Related to the index fragment size this will probably be a kind of micro optimization in urban regions with a minor win (3x ->
4k?). In the tests the ingeger compression algorithms that showed the best results in terms of the compression ratio and decoding speed was a adapted version of the ORC RLE V1 encoding. In additon, also other ineger compression algorithm should be evaluated, which are designed to support SIMD instructions/vectorization for decoding the index fragments.
SIMD instructions are supported in the browser via WebAssembly
The decoding library should be cross-platform written in Rust which can be compiled to WebAssembly for the usage
in a browser. In general PMTiles does handle this compression (tile deduplication) use-case really well, so this should be only
a evaluation of how the compression ratio will improve when using another compression algorithms on the index
fragment structure on COMTiles. The structure of a COMTiles index fragment differs from an PMTiles directory as
only the size is stored compared to the additional tile id and offset.
Per default the individual tile requests should get batched to improve performance and in particular to reduce the storage costs. This can reduce the number of tile requests by about 90% on a 4k display and 50% on a HD display
As title, do we have demo or example code for maplibre-provider, we can load .comt file to explor it like the m tremmel
Here is the link [m tremmel](https://www.youtube.com/watch?v=oqyQ3wo7n18)
Thanks
Currently the server is in the state of an experimental vector tiles server for serving a COMTiles archive directly from the filesystem. This should be enhanced to run in a serverless environment like AWS Lambda.
Currently the provider library can only abort tile request for individual tile requests but not when the requests get batched.
Hello,
I am really curious if this is production ready, as I would like to use it for my next project along with maplibre-gl-js!
I would love your valuable feedback on this.
Thank you very much.
Currently only Mapbox vector tiles are supported as content of a map tile and no raster formats (PNG, WebP).
Add support for raster tiles like PNG, WebP or JPEG.
Converting a continent sized MBTiles database like europe with about 21 gb takes only about 14 minutes.
But the conversion of a planet tileset with about 55 gb takes about 8 hours.
Task:
it seems that the vector mbtiles data is difficult to download,in order to run the demo conveniently
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.