HNHacker News
TopNewBestAskShowJobs

bdon

1,403 karma · joined April 11, 2010

working on https://protomaps.com

in Taipei, Taiwan

contact info on http://bdon.org https://twitter.com/bdon https://github.com/bdon

submissionscomments
bdon··on Protomaps – A free and open source map of the world
The newest major version has moved to a daily build channel (the last major version was last updated in April)

Today 10/23 is 107GB.

https://maps.protomaps.com/builds/

I'll update the documentation page today.

bdon··on Protomaps – A free and open source map of the world
I'd like to correct that impression - Protomaps is an explicitly commercial venture.

The difference from other commercial vendors is the focus on a complete, easily deployable solution - the hosted API is meant for non-commercial and light commercial use, instead of being the main product offering, to avoid the incentive trap of locking-in paying users to the API.

A related concept is the Community Right to Replicate: https://2i2c.org/right-to-replicate/

bdon··on Protomaps – A free and open source map of the world
At the bottom of this post is an example of creating PMTiles from GeoParquet via tippecanoe + gpq. Thanks to Tim Schaub for making this possible!

gpq convert Cairo_Governorate.parquet --to=geojson | tippecanoe Cairo.geojson -o Cairo.pmtiles

* https://cloudnativegeo.org/blog/2023/10/where-is-cog-for-vec...

* https://github.com/planetlabs/gpq

bdon··on Protomaps – A free and open source map of the world
Generating 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

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.

bdon··on Protomaps – A free and open source map of the world
Indeed!

The Protomaps project encompasses the generation of basemap PMTiles and the ecosystem for delivering them to clients. It supplies a standard daily build from OpenStreetMap, and since the generation is open source it can be customized to conform with your specific requirements.

bdon··on Protomaps – A free and open source map of the world
It does, but there is a limit of something like 500 MB for single files.
bdon··on Protomaps – A free and open source map of the world
That is correct, in addition I have contracts with companies for support as well as development of open source features.

The hosted API is "free" in the sense that there are no tiers. The API costs me money to run, which is why I require a GitHub sponsorship for commercial use. This is ideal for use cases where deploying your own tileset is impractical.

If you are using the hosted API heavily then it makes sense for you to "graduate" to deploying it yourself.

bdon··on Protomaps – A free and open source map of the world
I'm the owner of said commercial company.

LLCs in this context signal "This company has no outside investors", because almost every venture-backed technology company will be organized as a C Corporation instead.

I am choosing to run this open source project through a commercial company - that enables me to have a bank account, use GitHub Sponsors, pay others for work, and enter in support and development contracts with other companies and the public sector. Non-profit foundations like US 501(c)(3) aren't practical to create for solo developers.

bdon··on Overture Maps Foundation releases open map dataset
That is exactly how the open source Workers integration works:

https://protomaps.com/docs/cdn/cloudflare

However, it is an optional acceleration layer on top of the PMTiles access pattern; and it doesn't make a compelling demo, it's just a Z/X/Y layer which is how map tiles have worked for the past 20 years.

bdon··on Overture Maps Foundation releases open map dataset
The daylight PBFs are difficult to combine without a lot of RAM, there's no way around it right now. Either do that or hold out for potential newer releases of the data delivered as Parquet files.
bdon··on Overture Maps Foundation releases open map dataset
This is Cloudflare's new blob storage product R2. Putting the free Cloudflare CDN and cache infront of R2 doesn't work with HTTP Range headers, likely for product differentiation from their Video CDN. The latency of R2 is also much higher than S3 or GCP, but I know the R2 team is working hard on improving this.
bdon··on Overture Maps Foundation releases open map dataset
Thanks - for the issues related to freeway interchanges and rivers, it would be most helpful to report these on GitHub using screenshots and links to lat/lon positions, or even links to OSM nodes and ways.

OSM is a freeform dataset and not a cartographic product, so most of the basemap work now and in the future is on getting good results of this transformation for 200+ countries. The mismatch vs. existing maps must exist because we need to ensure to downstream commercial users that all end products of the map generation are openly licensed - that's why this is being pursued as an independent, self-funded project with support from GitHub Sponsors: http://github.com/sponsors/protomaps

bdon··on Overture Maps Foundation releases open map dataset
The transformation of OpenStreetMap features into the basemap is open source and available under a permissive license now at http://github.com/protomaps/basemaps

This is the focus of most development for the next few months - like you said, it's also a matter of aesthetics and context, like if the map is underlying another PMTiles data layer it should be lower contrast then if it's overlaid with pin markers. The end goal is to have a flexible basemap solution adaptable to most apps but you are free to roll your own proprietary style on top of the open source tiles if you'd like (there are already companies doing this)

bdon··on Overture Maps Foundation releases open map dataset
I just updated https://protomaps.com it to use the more detailed file you found, thanks. So instead of a zoom level of 12 it should work down to 20+ - the actual dataset contains up to zoom 15, which is ~1 billion tiles in a single 110GB file.

It's important to me that I showcase the system working as advertised - you are free to download the 110GB file from that static storage with no restrictions. Unfortunately, the demo is slow because I'm hosting it on Cloudflare R2 which has no outgoing bandwidth fees. Before, it was on DigitalOcean Spaces, which is low latency but would cost me $1-2 out of my own pocket each time someone clicked the link.

The Lambda/Workers integration as described in the other comment is the preferred solution to this for developers operating this at planet scale. Of course, the static storage solution is perfect for small to medium-sized areas, even on GitHub Pages.

bdon··on Overture Maps Foundation releases open map dataset
Library author here - yes, one execution happens per tile, if you have CloudFront in front those will only happen when the PoP has a miss.

With 512MB RAM these generally complete in under 100ms so the unit costs of Lambda are within a few multiples of Cloudflare Workers (.5USD / million invocations)

bdon··on Convert Shapefile to Vector Tiles with FileTiler
Two commands!

ogr2ogr -f GeoJSONSeq /vsistdout/ dataset.shp | tippecanoe -o dataset.pmtiles

aws s3 cp dataset.pmtiles s3://bucket/output.pmtiles

bdon··on Serverless maps at 1/700 the cost of Google Maps API
Some CDNs handle range requests; the purpose of introducing Lambda/Workers here is to transform normal Z/X/Y URLs into range requests, so you can use PMTiles with any client like MapLibre Native or legacy code without loading a plugin.

Protomaps actually has its own vector renderer different from Mapbox GL or MapLibre at https://github.com/protomaps/protomaps.js . It does use a handful of low-level Mapbox JavaScript libraries, but otherwise was consciously developed to be 100% separate from existing Mapbox rendering and styling code, and has an objectively inferior (Leaflet) user experience.

In practice, most serious uses of Protomaps are now using MapLibre GL, so there will be more focus going on that in the project going forward.

bdon··on Serverless maps at 1/700 the cost of Google Maps API
The z0-14 tilesets from https://app.protomaps.com/downloads/small_map should be good enough for street-level mapping with overzooming. You can email me at brandon@protomaps.com if this doesn't fit your needs yet.
bdon··on Serverless maps at 1/700 the cost of Google Maps API
Thanks, this should be fixed now.
bdon··on Serverless maps at 1/700 the cost of Google Maps API
It is the dominant use case, and a static server-rendered image is more computationally expensive to generate than a tile-based system; a static image has effectively infinite variation in center, bounds and map scale, so requires dynamic computation from a server to send a JPEG/PNG. A tile-based system can just pre-generate a couple million tiles which is exactly the strategy Protomaps uses.
bdon··on Serverless maps at 1/700 the cost of Google Maps API
Author here. AWS is quite a bit more expensive than cloudflare, mostly because of egress charges from Cloudfront.

Cloudflare R2 latency is tricky to predict and can be anywhere from a few hundred milliseconds to 1s+ in my experience. This is for cache misses, only, of course; cache hits are comparable to AWS. Cloudflare really has every incentive to improve their product so I expect this to be much more competitive in the near future.

bdon··on Serverless maps at 1/700 the cost of Google Maps API
Tiles, vector or raster, to be consumed for general use are not really in the scope of the OpenStreetMap project. This is surprising to many because it's the first thing you see on OSM.org; the tiles there are for the explicit purpose of feedback to data editors, and make a best-effort to synchronize the instantaneous state of the database in the tiles, unlike Protomaps which delivers a snapshot.

Paul Norman has a project called Tilekiln to adapt vector rendering for this use case on OSM.org: https://github.com/pnorman/tilekiln

bdon··on Serverless maps at 1/700 the cost of Google Maps API
Hi, thanks for the pointer, the Arabic rendering should be fixed now on the demo.
bdon··on Serverless maps at 1/700 the cost of Google Maps API
The solution I described in the blog post is an optional layer on top designed for high traffic deployments, see here: https://protomaps.com/docs/cdn

As most storage systems like S3 aren't free and have per-request fees, the price is pretty comparable to this CDN deployment.

Protomaps is very intentionally built with little in common with Mapbox; the main shared parts are using the same Protocol Buffers vector tile format, because there's no reason to write another one; and compatibility with the fork of Mapbox GL 1 (MapLibre GL). See https://protomaps.com/docs/faq#mapbox

bdon··on Serverless maps at 1/700 the cost of Google Maps API
Hi, the value add in the commercial offering on top of raw OSM is described here:

https://protomaps.com/docs/faq#openstreetmap

I also maintain open source tooling for anyone to replicate and extract OSM on-demand, as well as a free download portal:

https://github.com/protomaps/OSMExpress

https://app.protomaps.com/downloads

bdon··on Serverless maps at 1/700 the cost of Google Maps API
Thanks, should be fixed now!
bdon··on Serverless maps at 1/700 the cost of Google Maps API
Whoops, i broke the link in the GitHub repo; but I just fixed it on my phone! Thanks for the heads up.
bdon··on Serverless maps at 1/700 the cost of Google Maps API
As the developer of this system, I concur with this; Protomaps is focused on map tiles, and can be used with other solutions such as http://geocode.earth for search.

A small detail: I don't believe this is the absolute cheapest way to deliver map tiles. Renting an unmetered bandwidth server is always going to be the cheapest way to host content, but unmanaged servers don't give you SSL termination, infinite storage, or an edge cache.

Protomaps is designed as the right compromise between self-hosted operational+development costs and SaaS-like delivery.

bdon··on Serverless maps at 1/700 the cost of Google Maps API
Hmm, I haven't heard of any open source projects re-implementing Google's client library, and I imagine it would be difficult to keep parity with a closed-source project.

Most open source efforts have consolidated around MapLibre GL https://maplibre.org which is a maintained fork of Mapbox GL before their switch to a source-available license.

bdon··on Serverless maps at 1/700 the cost of Google Maps API
As mentioned in the post there's a _free_ API for non-commercial use that I maintain, and you can make commercial use of it by becoming a GitHub Sponsor:

http://github.com/sponsors/protomaps

But being "Google Maps compatible" will never be possible as long as the Google Maps client library and data are proprietary.

← PreviousPage 2 of 7Next →