5 ms·
For me the most interesting part is “PMTiles”: > PMTiles is a single-file archive format for pyramids of tiled data. A PMTiles archive can be hosted on a stora
by AlbertoGP 3y ago
For me the most interesting part is “PMTiles”:
> PMTiles is a single-file archive format for pyramids of tiled data. A PMTiles archive can be hosted on a storage platform like S3, and enables low-cost, zero-maintenance map applications.
> PMTiles is a general format for tiled data addressed by Z/X/Y coordinates. This can be cartographic basemap vector tiles, remote sensing observations, JPEG images, or more.
> PMTiles readers use HTTP Range Requests to fetch only the relevant tile or metadata inside a PMTiles archive on-demand.
> The arrangement of tiles and directories is designed to minimize the amount of overhead requests when panning and zooming.
https://docs.protomaps.com/pmtiles/ https://docs.protomaps.com/pmtiles/
- wiredfool 3y agoPmtiles are the vector counterpart to Cloud Optimized GEOTIFF (COG), allowing for efficient usage of mapping info from clients when the server supports a http range request. Previous iterations of this on the vector side have either been a ton of small files(pbf) or a large file that needed a front end to serve the individual tiles (mbtiles). At this point, you can take an OSM dump and convert it to a country level basemap in minutes on a stout machine, or hours for a continent, which you can then self host on a plain old web server with a custom style sheet.
- bdon 3y agoGenerating country level basemaps from scratch is a great approach! I've made an even easier path which is to just extract the relevant tiles from a daily build: https://docs.protomaps.com/guide/getting-started https://docs.protomaps.com/guide/getting-started This can take seconds to minutes for small-medium areas and doesn't need a powerful computer at all. The drawbacks are that the build is only daily, and the lower-zoom tiles aren't clipped so include extra information beyond your specified area.
- mycall 3y agoI've been using TileServer GL for a while and it looks like there is support for pmtiles coming soon. https://github.com/maptiler/tileserver-gl/pull/1009 https://github.com/maptiler/tileserver-gl/pull/1009
- kylebarron 3y agopmtiles are only the counterpart to the "overviews" part of COG. pmtiles doesn't give you analysis-ready data. For that, look to FlatGeobuf or GeoParquet (once it gets a spatial index in v1.1 of the spec)
- wiredfool 3y agoYeah, I'm aware of that. I love what you're going with geoparquet, it's certainly quite nice for analysis and some viewing. But there are still going to be a lot of datasets and clients that aren't going to be able to handle that where the tiled approach will work. I'm looking at this currently for a couple of clients, and I think that for what we're doing -- we're going to wind up serving both a view and analysis version separately.
- jonotron 3y agoPMTiles is amazing. We discovered it when we were building a Canadian wildfire hotspot map this summer. We were taking daily CSV files, turning them into vector tiles, syncing them with S3, and displaying in mapbox-gl map. The biggest cost was S3 file operations. We had to aggressively cluster to reduce our cost down and got to a point where the tiles numbered ~75,000. At the frequency we wanted to update this was costing $500/mo in S3 ops. Now we process the files into a single PMTiles file, deploy that one file and cut the costs down to pennies. For a map that we make public, it was incredibly enabling. You can checkout the Canadian hotspot data for all of 2023 if you're curious: https://lens.pathandfocus.com https://lens.pathandfocus.com
- deleted 3y ago[deleted]
- bambax 3y agoThese being vector files, does it mean they can be styled on the fly?
- bambax 3y ago(the answer is yes)
- Reason077 3y agoSo, could PMTiles be used as a cheap/dirty/fast way to host other forms of geospatial data that isn't strictly "map tiles"? Such as a large-ish, infrequently updated POI database?
- wiredfool 3y agoIf the geometry is points/lines/polygon/multi* + properties on the features, yes. (In other words, if it's representable as geojson), with the caveat that it's more for viewing and less for analysis. It's essentially what the internal layers are in the base layer -- there are land use, buildings, transit, physical, and border features that are combined with a stylesheet to make the base layer map tiles. There are some subtleties for packing the overview data for the wider zooms, and what happens when you have tiles that are too big because of number of features or metadata size -- where you can drop on density or coalesce on density.