Email or username:

Password:

Forgot your password?
scy

Holy shit I think I’m in love.

#Protomaps, a way to serve vector #maps of the entire world using a single static file and HTTP range requests.

It’s basically a static site generator for interactive maps. Tile servers are pretty much obsolete now. No database needed, you can run your interactive, smooth-zooming vector map from any HTTP storage. S3, Caddy running on your Wi-Fi router, even GitHub pages.

protomaps.com/

It’s open source & free to use. Wow. 🤯

via chaos.social/@djh/111280447304

57 comments
Manawyrm | Sarah

@scy Nice idea. Sadly the demo is getting hurt by sequential loading/high response times (over 1sec!), probably due to bad server configuration. Oops :)

Brian Dear

@scy

Wow, very cool. Would love to see nav systems in cars use something like this. Seems like far less of a bandwidth hog.

Oliver Schafeld

Would love to see an open source nav system too. But getting real-time traffic information into the system is a a whole other ball game, I think. And the traffic info is what in my experience still sets Google Maps apart from what other vendors have to offer.

Marcos Dione

@scy yes, up the point which you want to update the data, and now you have to regenerate everything (the format is not updatable) and upload the whole beast in one go.

scy

@mdione Regenerating everything doesn't seem that big of a deal, according to github.com/onthegomap/planetil it takes 4 hours and $5 of cloud resources. Or you do it on your own hardware.

But maybe you won't have to, because you can just take the builds provided by Protomaps, download the slice you need, and be done. I've downloaded a cut-out of about ⅙ of Germany in 30 seconds and got a 500 MB file. That's _very_ manageable.

menschenfreund

@scy Thanks, I was wondering how to do this. Very interesting.

Marcos Dione

@scy that's awesome, I didn't know. Except that you're dependent on their decision about at which zoom levels have what data. If you can live with that, it's great.

Jorge Sanz

@mdione @scy generating your own pmtiles file with planetiler (also from @protomaps) for a small country (say, Estonia) takes a couple minute or less.

The software takes the region name as a parameter, downloads a recent OSM export and generates the pmtiles file, all in a single step. And it supports OpenMapTiles and Shortbread schemas out of the box.

Alan McConchie

@scy @jeremy the @protomaps account isn’t very active, but the creator @bdon is!

Garvin Hicking

@scy Thanks, that indeed sounds loveable!!

Scott Feeney

@scy Oh nice, the CLI can create cutouts of unlimited size now!

Previously there was a limit on how large of a cutout you could create, so we couldn't download a cutout of the whole SF Bay Area. Would have had to have downloaded the 100 GB file of the entire world (every day, to keep up to date). This was the last thing blocking my app from using Protomaps. Excited to take another look now.

Anisse

@scy Nice! Makes me think of the HTTP VFS implementations for sqlite.

Markus

@scy To be fair: Tiles are also static if you generate them in advance. Still, that's really cool! I have at least one project which could benefit from ProtonMaps, i'll have to take a look at that. (currently I just use a Nginx proxy in front of tile.openstreetmap.org so that visitors IPs are not sent to OpenStreetMap 🙈).

Markus

@scy It's just a map of a place on the website of a small culture/sports club, that should be okay according to usage policy. But yes, this is another reason to touch this again.

jaschop

@scy
ohai, they have my house in there.

plus they're on the fediverse @protomaps

Jim Hague

@scy Cool! I can zoom right down to seeing my house.

Philip Gillißen

@scy how big is the planet file? Without downloading it completely, I haven't found the size on the webpage.

scy

@guerda 100 gigs.

maps.protomaps.com/builds/

The funny thing is: You can create an extract of that without even downloading the whole planet file.

The command in the docs starts with `pmtiles extract build.protomaps.com/20231001.p, and I was like “but that’s madness, that’s gonna download 100 gig in whatever CI job I’m gonna use this in!”

Except that it doesn’t. It uses the PMTiles format to only download the sections you need.

Reeeeaaaally clever.

Philip Gillißen

@scy wow that is awesome, I understand why you say that you love this. Thank you. I have to test it out soon!

Daniel

@guerda @scy the full planet .pmtiles file is roughly 100 GB in size.

You can check the Content-Length header for the file linked to on the protomaps website.

Pretty dope for a global vector tile basemap 😍

Râu Cao ⚡

@scy Fantastic idea! I wonder what other, similar things we could do with range requests.

Fedo ¶

@scy@chaos.social wait, isn’t it the map used for Monster Hunter Now?

jack

@scy my first impression is: can you specify the projection or is it always Mercator

🍄🌈🎮💻🚲🥓🎃💀🏴🛻🇺🇸

@scy and when any streetname changes you have to download the whole world map all over again?

🍄🌈🎮💻🚲🥓🎃💀🏴🛻🇺🇸

@scy clever use of a range query here, whatever "compressed Hilbert ordering" is it must be cool. I wonder what other datasets could benefit from that treatment.

Antanicus

@scy holy shit this is outstanding! I can already see how this could become part of the fediverse in more ways than one

Georg

@antanicus @scy There has been an interesting talk on #cccamp23 with a similar but different approach: media.ccc.de/v/camp2023-57248-

They are also mentioning protomaps AFAIK and the reason why they choose another solution.

scy

@sercxanto @antanicus Thanks for the pointer. It’s a nice project, but it requires custom server software.

Benjamin

@temptoetiam Ah oui, je me rappelle du lancement de ce projet, c'est développé par un seul type à partir d'une très bonne idée. Il semble avoir bien avancé :)

Après, c'est fou comme j'ai l'impression d'avoir fait le tour de ces infinies variations techniques autour des mêmes cartes… Le dernier KOD de Martin m'a vachement plus motivé à reprendre mes explorations de cartes tordues :D

dave horsey

@scy Just listened to the Mapscaping podcast where they discuss #Protomaps. Sounds like it could be a game changer. mapscaping.podbean.com/e/plane

Sudrien

@scy and I reading correctly from the front page demo it's a 114 gb dataset

Edit: no, 132 gb. planet.openstreetmap.org/

scy

@sudrien If you need the whole world at every zoom level.

Daniel

@scy @sudrien The .pmtiles planet is around 100 GB for the whole planet.

The OpenStreetMap planet pbf files are not the same: it's the raw data but not the vector tiles.

gudenau

@scy Can you do this with graphics too?

Ud😷 Sauer

@scy nice, but how can you update the map?

Daniel

@fernsehmuell @scy You re-create the .pmtiles file! For small cities it takes seconds to minutes.

The use case it's not good for is minutely up to date planet wide vector tiles.

But if you need that, you're not the target audience ☺️

Jani Tikkanen

@scy
I have always hated pre-rendered tiled maps. They use lots of space both on servers and clients and thus cause related problems like slow download speeds, limiting downloads due to big size and you can't easily change colours or select displayed details to name a few. I hope this will become a new standard on serving and using openstreetmap data on various applications.

scy

@Tikkis Well, these are pre-rendered tiled maps, if you think about it. They’re just pre-rendered to vector layers that can be toggled and styled individually, instead of rasterized PNGs with a fixed style.

The _real_ innovation is the file format & being able to use range requests.

Anthony Sorace

@scy @delan This looks like a neat project, but I’m unclear of the benefits if I’m not using S3 &c. 100% agree on not wanting a database, but is there a benefit if this approach I’m missing over separate vector files if I’m not concerned about S3 costs?

Daniel

@a @scy @delan vector files in .mbtiles format are sqlite files. You need to run a server to respond with vector tile data to the client.

The protomaps .pmtiles file instead is a single static file you can drop on any hoster and be done with it, no server required other than a static host.

You can put a .pmtiles file e.g. of a city on Github pages and serve it from there alongside your map 😍

Anthony Sorace

@djh @scy @delan Sure, but isn’t that specific to their format? Granted I have much more experience with raster tiles, but can’t you serve, say, GeoJSON as static files?

Daniel

@a @scy @delan Sure but GeoJSON is not simplified based on zoom levels, is a text/string based format, and so on.

For smaller datasets GeoJSON is perfect but at some point (heh) you need to move to optimized vector tiles.

🌈 Andrew ☄️

@scy So cool! I’ve been wondering for a while now whether you could do a similar thing for font subsetting. I really need to take another look at that idea.

Go Up