Comments (2)
I did some prototyping here, the rough approach was:
- create a local sqlite DB with
nodes
,ways
,relations
tables and schema:id integer primary key, version integer, data blob
wheredata
is a binary encoding of the element info, metadata, and tags - find all OSM replication diffs required to bring a planet file up to date, and download/parse them in parallel, inserting into the appropriate table using
version
column to decide whether a diff should replace what's there or not (so we don't need to process change files in order) - then when iterating through the osm.pbf file, also iterate through the entries in the the each diff table (both ordered by ID) and apply any diff that exists for an element. When you reach the end of the osm.pbf entries, iterate through the remaining ones from the diff file since they are all new.
The sqlite db takes 1 minute to build and 1.5GB of storage per week of diffs (~2x the size of the compressed change files). It adds 1-2 minutes to each pass through the osm.pbf file - but incurs no memory overhead since it's just cursoring-through the sqlite result set while applying diffs.
It got a bit messy though since multiple threads read through the diffs without communicating so would be a good chunk of work to rewrite - I think the priority is pretty low given there's an existing workaround.
from planetiler.
Another use-case here would be applying daylight map distribution sidecars: https://daylightmap.org/
from planetiler.
Related Issues (20)
- [BUG] Broken geometry of admin_level=4 boundary HOT 3
- [FEATURE] Configure zoom levels per layer HOT 3
- [BUG] download missing latest osm file HOT 1
- [BUG] Error when building planet tiles: "Protocol message contained an invalid tag (zero)" HOT 2
- Support Overture Map format HOT 18
- About the display layer of place name labels HOT 1
- Multiple areas support? HOT 2
- House number is generated for every primative with addr:housenumber key HOT 1
- [FEATURE] Merge with already existing tiles HOT 2
- Prefer name statements over Wikidata labels HOT 2
- [FEATURE] Log problematic geometry causing JTS exceptions HOT 22
- [FEATURE] Min polygon area for including center point
- [FEATURE] Expose OSM entity metadata in the process feature context HOT 2
- [FEATURE] Lua profile followups
- [BUG] US admin level 4 boundary lines appear incomplete HOT 3
- Tilejson attributes missing attributes added or removed during post-processing
- [BUG] tiles missing >= zoom 7 HOT 13
- [FEATURE] Log planet version being used HOT 2
- [BUG] Charging stations won't be exported HOT 4
- [FEATURE] Add arbitrary extra metadata using the Profile interface
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from planetiler.