/** We always add one primitive group of less that 8k elements to each primitive block. */ private void endBlock () { if (nEntitiesInBlock > 0) { if (currEntityType == OSMEntity.Type.NODE) { primitiveGroupBuilder.setDense(denseNodesBuilder); } // Pass the block off to the compression/writing thread try { Osmformat.PrimitiveBlock primitiveBlock = Osmformat.PrimitiveBlock.newBuilder() .setStringtable(stringTable.toBuilder()).addPrimitivegroup(primitiveGroupBuilder).build(); synchronousQueue.put(primitiveBlock); } catch (InterruptedException e) { throw new RuntimeException(e); } } }
builder.setDense(bi); return builder.build();
.setDense(DenseNodes.newBuilder() .addId(1001).addId(110).addId(-2000).addId(8889) .addLat(12*10000000).addLat(1500000).addLat(-12*10000000).addLat(-12*10000000)