Navigation Menu

Skip to content

Commit

Permalink
extend definition with visible-flag for storing history information
Browse files Browse the repository at this point in the history
  • Loading branch information
MaZderMind committed May 26, 2011
1 parent 64f587f commit 1ddaca6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/osmformat.proto
Expand Up @@ -126,6 +126,16 @@ message Info {
optional int64 changeset = 3;
optional int32 uid = 4;
optional uint32 user_sid = 5; // String IDs

// the visible flag is used to store history information in .osm.pbf files.
// it indicates that the current object version has been created by a delete
// operation on the osm api.

// when a writer sets this flag, it MUST add a required_features with value "HistoricalInformation"
// when a reader is able to work with the visible flag, it MUST check it's existence using has_visible and
// assume TRUE it it is not set. A reader that does not support the visible flag, it MUST dismiss files with
// the required_feature "HistoricalInformation".
optional bool visible = 6;
}

/** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes. */
Expand All @@ -135,6 +145,14 @@ message DenseInfo {
repeated sint64 changeset = 3 [packed = true]; // DELTA coded
repeated sint32 uid = 4 [packed = true]; // DELTA coded
repeated sint32 user_sid = 5 [packed = true]; // String IDs for usernames. DELTA coded

// this field is the dense pendent to Info.visible

// when a writer sets this flag, it MUST add a required_features with value "HistoricalInformation"
// when a reader is able to work with the visible flag, it MUST check it's existence using has_visible and
// assume TRUE it it is not set. A reader that does not support the visible flag, it MUST dismiss files with
// the required_feature "HistoricalInformation".
repeated bool visible = 6 [packed = true];
}


Expand Down

2 comments on commit 1ddaca6

@joto
Copy link

@joto joto commented on 1ddaca6 Jun 1, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there are particular reason why you say the reader MUST check with has_visible? Woudn't it be simpler if you defined a default true?

  • optional bool visible = 6 [default = true];

@MaZderMind
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a default value won't work with the repeated field and I thought it would be a good idea to use the same rules for both fields

Please sign in to comment.