Live data from Hacker News

Protomaps – A free and open source map of the world

protomaps.com

121–130 of 169 posts

Re: Protomaps – A free and open source map of the world

#121

Earlier quoted context omitted.

I asked the question because it's an interesting question. In our world flooded in misinformation and cheap data, there's often little accurate, high-quality data.

I'm not sure what answer you are looking for / what alternative you are suggesting? OSM is the biggest community effort - NGO, volunteer, corporate, etc - to solve data quality in GIS. The participants do everything to improve quality from individuals walking around with GPS devices to companies launching low earth orbit satellites into space and self-driving cars in the ground with AI error detection. There is a mor…

> I'm not sure what answer you are looking for / what alternative you are suggesting?

None of the above. People might just be curious and interested!

Thanks for sharing all that. I didn't know much about the quality. Much crowd-sourced data has accuracy problems.

Re: Protomaps – A free and open source map of the world

#122
post #31

> The Google Maps API has a generous free tier, but high fees past 30,000 map loads. Protomaps is designed from the ground up to be a system you run yourself - as a 100% static backend on cloud storage - so you only incur the usage costs of storing and serving that data, which can be pennies for moderate usage. It would be interesting to see a cost comparison: recommended hosting setup vs Google Maps, and at what poi…

I haven't found this info in the FAQ, but it would be interesting to know how large that PMTiles file is for a medium-sized country. It seems to be a really attractive way of self-hosting maps that don't have to be 100% up to date and are only used in a specific region. "Recompiling" that file once a year and uploading it to a static file hoster would be an easy process with very little external dependencies. Edit: F…

Geofabrik already does this for vector tiles of each country, but as individual mvt files rather than in a container like pmtiles or mbtiles.

http://download.geofabrik.de/

Re: Protomaps – A free and open source map of the world

#123
post #82

I just used their pmtiles tool to grab a map of just the area around Half Moon Bay, south of San Francisco. I grabbed the latest macOS Go binary from https://github.com/protomaps/go-pmtiles/releases I found a rough bounding box using http://bboxfinder.com/#37.373977,-122.593346,37.570977,-122.... Then I ran this: pmtiles extract https://build.protomaps.com/20231023.pmtiles hmb.pmtiles \ --bbox=-122.593346,37.373977,-…

I turned this into a demo: https://simonw.github.io/hmb-map/ and a blog post: https://til.simonwillison.net/gis/pmtiles

Re: Protomaps – A free and open source map of the world

#126
post #74

Earlier quoted context omitted.

Thanks. I'm OK with a single layer just showing the outlines of coastlines and regions, including the names of regions. I think a suitable simplified world map could fit all this in SVG. edit: Initially underestimated so did some calculations below Key Data Points for Estimate of SVG Size - Radius of Earth: 6371 km - Surface Area of Earth: 510e6 km^2 - Approximate Number of Countries: 250 - Land Area of Earth: 29% of…

SVG is kind-of terrible for maps, but you can get pretty small with GeoPackage (read: sqlite). I recently spent a bit too long on exactly this problem and ended up with the following. 116KB - 5MB for country borders 16MB - 52MB for ~50K city/county level borders based on geoBoundaries The range of sizes depends on how much custom compression/simplification you put into it. The source files are about 10x bigger, but t…

Thank you we forked your repo! What makes you say SVG is kind-of terrible for maps?

Re: Protomaps – A free and open source map of the world

#127

Earlier quoted context omitted.

Thanks. I'm OK with a single layer just showing the outlines of coastlines and regions, including the names of regions. I think a suitable simplified world map could fit all this in SVG. edit: Initially underestimated so did some calculations below Key Data Points for Estimate of SVG Size - Radius of Earth: 6371 km - Surface Area of Earth: 510e6 km^2 - Approximate Number of Countries: 250 - Land Area of Earth: 29% of…

So, you're still going to be better off with a tiled overview sort of system. FWIW, I've got an official 900MB geojson of borders from a large unnamed multinational NGO type that's particular about their mapping. At z=4, or 600m resolution, it's a 2.5MB pmtiles, at z=10 (10m resolution) it's 83M. That's just the ADM0 borders, adding local borders would obviously increase the size.

I'm a total noob to all this, so I totally get if you can't help--it's not your problem, no worries! But would you be able to share any code to convert this, or any of the data?

Re: Protomaps – A free and open source map of the world

#128
post #74

Earlier quoted context omitted.

SVG is kind-of terrible for maps, but you can get pretty small with GeoPackage (read: sqlite). I recently spent a bit too long on exactly this problem and ended up with the following. 116KB - 5MB for country borders 16MB - 52MB for ~50K city/county level borders based on geoBoundaries The range of sizes depends on how much custom compression/simplification you put into it. The source files are about 10x bigger, but t…

Thank you we forked your repo! What makes you say SVG is kind-of terrible for maps?

Thanks!

Well, mostly that it's text / XML you usually have to parse in full and boundaries are data heavy, so if you have anything more than a world map, I don't see that working very well.

In contrast with the OP or GeoPackage, you can query by tiles/range and only extract the boundaries you need if you're zoomed in somewhere. If you use Tiny Well-Known Binary compression, you can also shrink the data quite a bit while keeping the querying capabilities.

But if you only ever need to render the whole thing, topojson is probably the winner as it cleverly encodes only unique borders once, so it tends to be a lot smaller.

And of course if SVG works for your case, go ahead and use it, it's surely the easiest way to render vector gfx in the browser :)

Re: Protomaps – A free and open source map of the world

#129
post #82

I just used their pmtiles tool to grab a map of just the area around Half Moon Bay, south of San Francisco. I grabbed the latest macOS Go binary from https://github.com/protomaps/go-pmtiles/releases I found a rough bounding box using http://bboxfinder.com/#37.373977,-122.593346,37.570977,-122.... Then I ran this: pmtiles extract https://build.protomaps.com/20231023.pmtiles hmb.pmtiles \ --bbox=-122.593346,37.373977,-…

I realise this isn't tech support but I have no idea why it doesn't work for me. The pmtile file you linked works, but creating my own smaller one doesn't.

But the concept is great to get a map for a project

Re: Protomaps – A free and open source map of the world

#130

Earlier quoted context omitted.

I assume that would require BitTorrent v2 (and I think more specifically something along BEP-46 - Updating Torrents Via DHT Mutable Items) or your map is gonna be out-of-sync and sad after a while.

are the torrents in the wild that uses this? and are there bittorrent clients that implement this? how do they surface the mutable aspect to the user? (is it like, your torrent client will silently update files, and if you dont want to update anymore you need to pause? can you still seed if you dont want to update?)

You can't modify files, because torrent file itself is just sequence of chechsums. But there is RSS extension that allpo to pipe updates of new files.
Post reply on HN