271 karma · joined Feb 22, 2016 (10y ago) · 71 submissions
comment 5mo ago · link · parent
comment 8mo ago · link · parent
comment 10mo ago · link · parent
comment 10mo ago · link · parent
comment 1y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
13.
Explorable Overture Map Tiles(msbarry.github.io ↗)
2 points · by zylepe · 3y ago · discuss
comment 3y ago · link · parent
https://github.com/onthegomap/planetiler/blob/db0ab02263baaa...
It batches inserts into bulk statements and is able to do writes in the 500k+ per second range, and reads are 300-400k/s using those settings.
comment 3y ago · link · parent
Brandon from Protomaps is also helping add pmtiles output natively to planetiler, so you won't need a conversion step afterwards!
comment 4y ago · link · parent
comment 4y ago · link · parent
Another bonus of writing pmtiles directly is that it will cut the time to generate vector tiles for the planet from ~40 to ~30 minutes on a 64-core ec2 instance since pmtiles format is much simpler and more efficient to write than SQLite. It should also cut the output file size a bit from the 80gb that mbtiles uses.
comment 4y ago · link · parent
There’s a python utility to convert mbtiles to pmtiles, but I’m also planning to add native pmtiles output to planetiler soon [2].
comment 4y ago · link · parent
comment 4y ago · link · parent
I like the idea of rebalance opportunity notifications, but it’s harder to get retirement funds into a google sheet with all the automatic contributions that happen…
comment 4y ago · link · parent
For an offsite backup, I should start printing 2 and storing one copy at a relative’s house…
comment 5y ago · link · parent
Also you could try switching from the default --nodemap-type=sortedtable to --nodemap-type=sparsearray. Sorted table uses 12 bytes per node and is more compact for extracts, sparse array uses 8 bytes per node but wastes some storage when there are gaps in the ID space.
There is also an osm.pbf extension that embeds node locations in ways, but you need just as much RAM to convert a file to that format: https://docs.osmcode.org/osmium/latest/osmium-add-locations-...
Once you generate the mbtiles file, you can serve from a much smaller machine.
comment 5y ago · link · parent
That second call lets you manipulate vector features on each tile using JTS geometry utilities (i.e. merge nearby polygons or lines with the same tags). PostGIS uses GEOS which is ported from JTS so you have access to pretty much the same geometry utilities - often with the same name.
It's definitely not as flexible as a PostGIS based solution - especially if you join faraway features that don't appear on the same tile, but in practice it was enough to port the entire OpenMapTiles schema.
See the basemap layers package: https://github.com/onthegomap/flatmap/tree/main/flatmap-base... for example see the landcover layer https://github.com/onthegomap/flatmap/blob/main/flatmap-base... which was ported from the SQL contained in https://github.com/openmaptiles/openmaptiles/tree/master/lay...
Also, this OpenMapTiles PR might help improve your existing pipeline after it gets merged: https://github.com/openmaptiles/openmaptiles-tools/pull/383
Edit: formatting
comment 5y ago · link · parent
with z13 building merge (extra 14 CPU hours of processing):
- $4.68 on Digital Ocean 128GB 16 CPU instance (4 hours @ $1.17/hr)
without z13 building merge: - $2.75 on AWS EC2 c5ad.16xlarge instance (1 hour @ $2.75/hr)
- $2.88 on Linode 128GB 50 dedicated CPU instance (2 hours @ $1.44/hr)
Unfortunately it costs $10 in egress bandwidth fees to get the result out of AWS ;-)Edit: formatting