From f933cf162ec7eae1340d12ff5f909d9b0577cfe3 Mon Sep 17 00:00:00 2001 From: Scott Crosby Date: Mon, 30 Aug 2010 08:30:13 -0500 Subject: [PATCH] Revert "Excise references to now-obsolete Nodes" This reverts commit a625c34e7d892a55ccda3bd11506e18c1eae0302. --- src.java/crosby/binary/BinaryParser.java | 2 ++ src/osmformat.proto | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src.java/crosby/binary/BinaryParser.java b/src.java/crosby/binary/BinaryParser.java index cdd25f5..d0dcde6 100644 --- a/src.java/crosby/binary/BinaryParser.java +++ b/src.java/crosby/binary/BinaryParser.java @@ -98,6 +98,7 @@ public abstract class BinaryParser implements BlockReaderAdapter { for (Osmformat.PrimitiveGroup groupmessage : block .getPrimitivegroupList()) { // Exactly one of these should trigger on each loop. + parseNodes(groupmessage.getNodesList()); parseWays(groupmessage.getWaysList()); parseRelations(groupmessage.getRelationsList()); if (groupmessage.hasDense()) @@ -107,6 +108,7 @@ public abstract class BinaryParser implements BlockReaderAdapter { protected abstract void parseRelations(List rels); protected abstract void parseDense(Osmformat.DenseNodes nodes); + protected abstract void parseNodes(List nodes); protected abstract void parseWays(List ways); protected abstract void parse(Osmformat.HeaderBlock header); diff --git a/src/osmformat.proto b/src/osmformat.proto index 1e18b0d..760ea62 100644 --- a/src/osmformat.proto +++ b/src/osmformat.proto @@ -107,6 +107,7 @@ message PrimitiveBlock { // Group of OSMPrimitives. All primitives in a group must be the same type. message PrimitiveGroup { + repeated Node nodes = 1; optional DenseNodes dense = 2; repeated Way ways = 3; repeated Relation relations = 4; @@ -148,6 +149,19 @@ message ChangeSet { optional HeaderBBox bbox = 11; } + +message Node { + required sint64 id = 1; + // Parallel arrays. + repeated uint32 keys = 2 [packed = true]; // String IDs. + repeated uint32 vals = 3 [packed = true]; // String IDs. + + optional Info info = 4; + + required sint64 lat = 8; + required sint64 lon = 9; +} + /* Used to densly represent a sequence of nodes that do not have any tags. We represent these nodes columnwise as five columns: ID's, lats, and