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