-
Notifications
You must be signed in to change notification settings - Fork 7
/
tile.proto
59 lines (49 loc) · 2.48 KB
/
tile.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package opentraffic.osmlr;
import "segment.proto";
// traffic tile consists of a list of entries, where each entry is either a
// Segment or a marker indicating that the traffic segment is no longer in use.
// the ID of a particular traffic segment within the tile is its offset in the
// list.
//
// the reason for including markers for deleted segments (sometimes called
// "tombstones" in the literature) is so that tiles can have continuity across
// data updates. traffic segments which have been updated in a way which is
// compatible across previous versions (i.e: map-matching returns the same road
// segments to some tolerance) will retain their IDs. anything which has changed
// too much will have the old ID marked deleted and a new ID assigned.
//
// assigning IDs therefore potentially requires looking at all previous graphs,
// and a single "master" process to assign new IDs without conflicts. since we
// anticipate data updates to be rare events (monthly, quarterly, etc...) then
// this should not be a problem. in return, we get (mostly) compact IDs which
// are (mostly) tolerant to data updates.
//
message MarkedDeleted {
optional uint32 segment_deleted_date = 1;
// TODO - possible add information about segments that replace the deleted
// segment
}
message Tile {
message Entry {
// an entry in the tile should be _either_ a Segment _or_ a Marker. a tile
// containing an Entry with both or neither is invalid.
// Date is when the OSMLR segment was created (if segment exists) or the
// date when the segment was deleted (if marker exists)
optional Segment segment = 1;
optional MarkedDeleted marker = 2;
optional uint32 segment_creation_date = 3;
}
// a tile consists of a list of Entries.
repeated Entry entries = 1;
// Creation date and time (UTC epoch seconds) for this OSMLR tile.
optional uint32 creation_date = 2;
// Reference to the OSM changeset Id. While not an exact representation of
// the state of the OSM planet file that OSMLR was derived from, this
// provides context on age and provenance of tile data derived from OSM.
optional uint64 changeset_id = 3;
// A string meant to describe this tile. It may be used to describe the geographic
// extents of the tile but has no strict format. So as to remain projection
// or really tiling system agnostic, its simple string which can be interpreted
// differently depending on the tiling system used to generate and consume the tile
optional string description = 4;
}