marook / osm-read

an openstreetmap XML and PBF data parser for node.js and the browser
GNU Lesser General Public License v3.0
107 stars 25 forks source link

primitivegroup.length - Is it always 1? #58

Closed metabench closed 1 year ago

metabench commented 1 year ago

So far I have found primitivegroup to always be an array with a single item. Is this always the case?

marook commented 1 year ago

I think this question is not really related to osm-read. The original osm pbf protocol buffer specification does indeed specify it as repeatable ( https://github.com/marook/osm-read/blob/21727fb/lib/proto/osmformat.proto#L99 ). Of course this does not imply it is like that in the wild.

metabench commented 1 year ago

@marook I don't want to waste your time with non osm-read issues or make it appear as though your software has got more issues than it actually has.

There are a couple of reasons it could be relevant though:

1) To explain the API that osm-read provides. 2) Because I'm working on code that maybe should make its way back into osm-read and don't have other places right now to discuss implementation details. At present the code I have written assumes a single primativegroup and so does not conform to the spec.

metabench commented 1 year ago

For testing purposes it would help to have and osm.pbf file that has got more than 1 primitivegroup in the array.

If anyone can point me to any example in the wild, or a specifically made sample, that would help.