Conversation
osm-live/Readme.md
Outdated
| - [To way/1170508451](https://www.openstreetmap.org/way/1170508451) | ||
| - [Relation ownself](https://www.openstreetmap.org/relation/8085812) | ||
|
|
||
| #### Overpass fetching |
There was a problem hiding this comment.
Separate section
Generating roads & points
If way, node has we need to retreive relation(s) they belong to in order to create roads correctly with turns restrictions, ...
So we need the code to fetch relations and make them complete.
[ Missing info ] ... However as we make these relations complete we fetch ways that were not changed and they are not complete (as we don't fetch parent relations again after step 3), [Explain how we handle this stituation]
| // 3. final step make all relations / way / node complete | ||
| (way(r.a);.a;) ->.a; | ||
| (node(r.a);.a;) ->.a; | ||
| ``` |
There was a problem hiding this comment.
[Missing section]
Explain how multipolygons are handled
osm-live/Readme.md
Outdated
| 3. Make `*_diff.obf` - where only changed/deleted objects are present. In the `*_diff.obf` we store objects from `*_after.obf` that are different from `*_before.obf` (created or modified). | ||
| 5. Split world's `*_diff.obf` into different countries/region files. | ||
|
|
||
| ## What to do with OSM relations ? |
There was a problem hiding this comment.
[Suggested name]
Propagating tags from OSM relations
osm-live/Readme.md
Outdated
| (node(r.a);.a;) ->.a; | ||
| ``` | ||
|
|
||
| If the relation changed itself when we retreive members (nodes and ways), after retrieving all member's relations (even if incompleted - without all the members included!!!), the data is stored to `*_before_rel.obf` and `*_after_rel.obf`: |
There was a problem hiding this comment.
[Separate section]
Generating routes (relations)
If there are changes in relation itself and relation represents a visible / searchable entity such as routes, we need to regenerate ways / points that belong to this route. This needs to be handled separately if way is removed from relation it won't be handled correctly while Generating roads & points process
osm-live/Readme.md
Outdated
| $DATE_DIR/src/${BASENAME}_before_rel.osm.gz $DATE_DIR/src/${BASENAME}_after_rel.osm.gz \ | ||
| $DATE_DIR/src/${BASENAME}_diff.osm.gz ${BASENAME}_after_rel_m.osm.gz | ||
| ``` | ||
| Files `*_before_rel.osm` and `*_after_rel.osm` can include different sets of relations. And different relations contains different sets of members (nodes/ways)!!!<br> |
There was a problem hiding this comment.
Files *_before_rel.osm and *_after_rel.osm can include different sets of relations based on overpass query.
And different relations contains different sets of members (nodes/ways)!!!
Why it's important information, looks clear? with !!!
- Why is it happen?
It's clear based on the example of the query above, no need to explain...
1, 2 - easily generates different sets of way, node and 3 generates different sets of the relations
osm-live/Readme.md
Outdated
| ``` | ||
| Files `*_before_rel.osm` and `*_after_rel.osm` can include different sets of relations. And different relations contains different sets of members (nodes/ways)!!!<br> | ||
| - Why is it happen? - Before query on specific time (`$START_DATE` or `$END_DATE`) we do not know what relations was created/deleted. So `*_before_rel.osm` will consist of deleted relations, and `*_after_rel.osm` will consist of created relations. | ||
| - Why is it problem (different sets of nodes/members) ? - Because in `*_diff.obf` we can got many "created" and "deleted" nodes/ways.<br> |
There was a problem hiding this comment.
While explaining the problem is ok, it's not clear what the problem and what's the purpose of before_rel.osm.gz, after_rel_m.osm.gz.
We need to start with what do we want to achieve that should be in the file. To calculate the difference
Then we can put:
Query
Explanation of query
Unused data in after file
not a problem because the data is complete or a problem?
Unnecessary data in before file
Explain type of unnecessary data source and solution with generate-relation-osm
osm-live/Readme.md
Outdated
| - So, what to do? - We just copy nodes/ways from `*_before_rel.osm` to `*_after_rel.osm`. | ||
| - Hmm, but nodes/ways in `*_before_rel.osm` can consist of old tags or geometry ?! - Yes, therefore need to use `*_diff.osm` for find all `<action type="create">`, `<action type="modify">`, `<action type="delete">` and correctly copy objects. Good example in the issue [Geometry duplication in live update](https://github.com/osmandapp/OsmAnd/issues/21561) whre made fix that avoid copying modified nodes/ways to `*_after_rel_m.osm`. | ||
|
|
||
| ## What is next ? |
There was a problem hiding this comment.
Section
Generate obf files and diffs
Section
No description provided.