[OSM-dev] visible-Flag in PBF

Oliver Tonnhofer olt at omniscale.de
Fri May 6 09:25:45 BST 2011


On 06.05.2011, at 10:00, Jochen Topf wrote:
> These are the canges we would need to make:
> 
> ============================================================
> --- a/src/osmformat.proto
> +++ b/src/osmformat.proto
> @@ -126,6 +126,7 @@ message Info {
>    optional int64 changeset = 3;
>    optional int32 uid = 4;
>    optional uint32 user_sid = 5; // String IDs
> +   optional bool visible = 6 [default = true];
> }
> 
> /** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes. */
> @@ -135,6 +136,7 @@ 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
> +   repeated bool visible = 6 [packed = true];
> }
> ============================================================
> 
> The first one is unproblematic. It should add an optional field with
> a default value. All old code should still work. The Info message
> is used for encoding nodes, ways, and relations.
> 
> But there is a different encoding for DenseNodes which is much more efficient
> than the simple Node encoding. The DenseNodes is what everybody is using. And
> that uses the DenseInfo message. The DenseInfo uses repeated fields which
> can't be optional.


Isn't `repeated` like `optional`, since it can have zero occurrences?
I haven't tested that, though.

Scott: You should note in the protofile that the IDs are taken, if this doesn't go into the official proto files.


Regards,
Oliver

-- 
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt | @oltonn







More information about the dev mailing list