[osmosis] 01/06: Imported Upstream version 0.44.1

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Thu Jun 4 17:23:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository osmosis.

commit fad8217ea9384c79c695d4d4ac24ad7bbb07307b
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Jun 4 15:29:53 2015 +0200

    Imported Upstream version 0.44.1
---
 .gitignore                                         |    6 +-
 build.gradle                                       |    7 +-
 db-server/.gitignore                               |    4 +
 db-server/Dockerfile                               |   14 +
 db-server/build.sh                                 |    6 +
 db-server/docker-start.sh                          |   66 +
 db-server/readme.txt                               |   13 +
 db-server/script                                   |    1 +
 gradle.properties                                  |   23 +-
 gradle/wrapper/gradle-wrapper.jar                  |  Bin 46735 -> 52266 bytes
 gradle/wrapper/gradle-wrapper.properties           |    4 +-
 osmosis-apidb/build.gradle                         |    2 +-
 .../apidb/common/MysqlIdentityValueLoader2.java    |    2 +-
 .../common/PostgresqlIdentityValueLoader2.java     |    4 +-
 .../osmosis/apidb/v0_6/ApidbVersionConstants.java  |   13 +-
 .../osmosis/apidb/v0_6/ApidbWriter.java            |   29 +-
 .../osmosis/apidb/v0_6/impl/EntityDao.java         |    4 +-
 .../areafilter/common/PolygonFileReader.java       |   61 +-
 .../osmosis/core/database/FeaturePopulator.java    |    3 +-
 .../osmosis/core/domain/v0_6/Bound.java            |    9 +-
 .../osmosis/core/domain/v0_6/CommonEntityData.java |    2 +-
 .../osmosis/core/domain/v0_6/Entity.java           |    2 +-
 .../osmosis/core/domain/v0_6/Node.java             |    8 +-
 .../osmosis/core/domain/v0_6/Relation.java         |   11 +-
 .../osmosis/core/domain/v0_6/RelationMember.java   |    4 +-
 .../osmosis/core/domain/v0_6/Tag.java              |    8 +-
 .../osmosis/core/domain/v0_6/Way.java              |   13 +-
 .../osmosis/core/domain/v0_6/WayNode.java          |    4 +-
 .../core/report/v0_6/IntegrityReporter.java        |    6 +-
 .../osmosis/core/store/DataPostbox.java            |   10 +-
 .../osmosis/core/util/TileCalculator.java          |    2 +-
 .../osmosis/core/bound/v0_6/BoundComputerTest.java |    3 +-
 .../osmosis/core/bound/v0_6/BoundSetterTest.java   |    3 +-
 .../dataset/v0_6/impl/BoundingBoxContext.java      |   10 +-
 .../dataset/v0_6/impl/DatasetStoreReader.java      |    4 +-
 osmosis-hstore-jdbc/build.gradle                   |    2 +-
 .../org/postgresql/driverconfig.properties         |    1 -
 osmosis-osm-binary/ReleaseNotes.txt                |   21 +
 .../osmosis/osmbinary/Fileformat.java              | 1002 ++-
 .../openstreetmap/osmosis/osmbinary/Osmformat.java | 9043 +++++++++++++++-----
 osmosis-pgsimple/build.gradle                      |    2 +-
 osmosis-pgsnapshot/build.gradle                    |    2 +-
 .../pgsnapshot/common/SchemaVersionValidator.java  |    2 +-
 .../osmosis/pgsnapshot/v0_6/impl/EntityDao.java    |    2 +-
 .../pgsnapshot/v0_6/impl/EntityFeatureDao.java     |    3 +-
 .../osmosis/pgsnapshot/v0_6/impl/EntityMapper.java |    6 +-
 .../pgsnapshot/v0_6/impl/EntityRowMapper.java      |    7 +-
 .../pgsnapshot/v0_6/impl/RelationMemberMapper.java |    2 +-
 .../osmosis/pgsnapshot/v0_6/impl/WayDao.java       |   20 -
 .../pgsnapshot/v0_6/impl/WayNodeMapper.java        |    2 +-
 .../replication/common/ServerStateReader.java      |    2 +
 .../v0_6/BaseReplicationDownloader.java            |    2 +
 .../replication/v0_6/IntervalDownloader.java       |    2 +
 .../replication/v0_6/ReplicationFileMerger.java    |    6 +-
 .../replication/v0_6/ReplicationLagReader.java     |    5 +-
 .../v0_6/impl/intervalConfiguration.txt            |    2 +-
 .../impl/replicationDownloaderConfiguration.txt    |    2 +-
 .../impl/replicationFileMergerConfiguration.txt    |    2 +-
 .../osmosis/set/v0_6/ChangeSimplifierTest.java     |    3 +-
 .../osmosis/set/v0_6/EntityMergerTest.java         |    3 +-
 .../tagfilter/common/KeyValueFileReader.java       |    2 +-
 .../osmosis/tagtransform/impl/TransformHelper.java |    2 +-
 .../osmosis/xml/v0_6/XmlChangeUploader.java        |    1 +
 .../osmosis/xml/v0_6/XmlDownloader.java            |    2 +
 .../openstreetmap/osmosis/xml/v0_6/XmlWriter.java  |    4 +-
 .../osmosis/xml/v0_6/impl/BoundWriter.java         |    4 +-
 .../osmosis/xml/v0_6/impl/OsmWriter.java           |    6 +-
 .../osmosis/xml/common/ElementWriterTest.java      |    3 +-
 package/bin/osmosis.bat                            |    4 +-
 package/changes.txt                                |   21 +
 package/script/contrib/replicate_osm_file.sh       |    6 +-
 package/script/pgsnapshot_load_0.6.sql             |   46 +-
 package/script/pgsnapshot_schema_0.6.sql           |   36 +-
 settings.gradle                                    |    7 +-
 74 files changed, 7908 insertions(+), 2743 deletions(-)

diff --git a/.gitignore b/.gitignore
index 5cad606..a775aa6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,6 @@
 .gradle
-
+*.javaEe
+*.javae
+*.iml
+*.ipr
+*.iws
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 6a06f69..2f1f678 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,19 +1,22 @@
 task wrapper(type: Wrapper) {
-	gradleVersion = '1.4'
+	gradleVersion = '2.4'
 }
 
+apply plugin: 'idea'
 
 /* Build collections containing each type of project.  These collections will
  * be used to apply common configurations to projects of the same type.
  */
 def packageProjects = allprojects.findAll { project -> project.path.equals(':package') }
 def buildProjects = allprojects.findAll { project -> project.path.equals(':build-support') }
+def dockerProjects = allprojects.findAll { project -> project.path.equals(':db-server') }
 // Java projects are all those that aren't in the previous collections.
-def javaProjects = subprojects.findAll { project -> !packageProjects.contains(project) && !buildProjects.contains(project) }
+def javaProjects = subprojects.findAll { project -> !packageProjects.contains(project) && !buildProjects.contains(project) && !dockerProjects.contains(project) }
 
 // Apply common project configuration
 subprojects {
 	apply plugin: 'eclipse-wtp'
+	apply plugin: 'idea'
 
 	// All projects use a common group id.
 	group = 'org.openstreetmap.osmosis'
diff --git a/db-server/.gitignore b/db-server/.gitignore
new file mode 100644
index 0000000..3da7554
--- /dev/null
+++ b/db-server/.gitignore
@@ -0,0 +1,4 @@
+.classpath
+.project
+.settings
+
diff --git a/db-server/Dockerfile b/db-server/Dockerfile
new file mode 100644
index 0000000..fea9195
--- /dev/null
+++ b/db-server/Dockerfile
@@ -0,0 +1,14 @@
+FROM fedora:21
+
+# Install PostgreSQL
+RUN yum install -y postgresql-server postgresql-contrib
+
+# Install PostGIS
+RUN yum install -y postgis
+
+EXPOSE 5432
+
+COPY docker-start.sh /start.sh
+COPY script /install/script
+
+CMD ["/start.sh"]
diff --git a/db-server/build.sh b/db-server/build.sh
new file mode 100755
index 0000000..2b1e1a9
--- /dev/null
+++ b/db-server/build.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Build the docker image.
+# The use of tar is a workaround for the docker restriction of not following symlinks.  This
+# tar command dereferences symlinks and then passes the resultant archive to the docker build. 
+tar -czh . | docker build -t="bretth/osmosis-build" -
diff --git a/db-server/docker-start.sh b/db-server/docker-start.sh
new file mode 100755
index 0000000..d100a82
--- /dev/null
+++ b/db-server/docker-start.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+DATADIR="/var/lib/pgsql/data"
+
+# test if DATADIR has content
+if [ ! "$(ls -A $DATADIR)" ]; then
+	# Create the en_US.UTF-8 locale.  We need UTF-8 support in the database.
+	localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
+
+	echo "Initializing Postgres Database at $DATADIR"
+	su postgres sh -lc "initdb --encoding=UTF-8 --locale=en_US.UTF-8"
+
+	su postgres sh -lc "postgres --single -jE" <<-EOSQL
+		CREATE USER osm WITH SUPERUSER PASSWORD 'password';
+	EOSQL
+
+	# Allow the osm user to connect remotely with a password.
+	echo "listen_addresses = '*'" >> "${DATADIR}/postgresql.conf"
+	echo "host all osm 0.0.0.0/0 md5" >> "${DATADIR}/pg_hba.conf"
+
+	# Create the pgsnapshot database owned by osm.
+	su postgres sh -lc "postgres --single -jE" <<-EOSQL
+		CREATE DATABASE pgosmsnap06_test OWNER osm;
+	EOSQL
+
+	# Create the apidb database owned by osm.
+	su postgres sh -lc "postgres --single -jE" <<-EOSQL
+		CREATE DATABASE api06_test OWNER osm;
+	EOSQL
+
+	# Start the database server temporarily while we configure the databases.
+	su postgres sh -lc "pg_ctl -w start"
+
+	# Configure the pgosmsnap06_test database as the OSM user.
+	su postgres sh -lc "psql -U osm pgosmsnap06_test" <<-EOSQL
+		CREATE EXTENSION hstore;
+		CREATE EXTENSION postgis;
+		\i /install/script/pgsnapshot_schema_0.6.sql
+		\i /install/script/pgsnapshot_schema_0.6_action.sql
+		\i /install/script/pgsnapshot_schema_0.6_bbox.sql
+		\i /install/script/pgsnapshot_schema_0.6_linestring.sql
+	EOSQL
+
+	# Configure the api06_test database as the OSM user.
+	su postgres sh -lc "psql -U osm api06_test" <<-EOSQL
+		\i /install/script/contrib/apidb_0.6.sql
+		\i /install/script/contrib/apidb_0.6_osmosis_xid_indexing.sql
+	EOSQL
+
+	# Stop the database.
+	su postgres sh -lc "pg_ctl -w stop"
+fi
+
+SHUTDOWN_COMMAND="echo \"Shutting down postgres\"; su postgres sh -lc \"pg_ctl -w stop\""
+trap "${SHUTDOWN_COMMAND}" SIGTERM
+trap "${SHUTDOWN_COMMAND}" SIGINT
+
+# Start the database server.
+su postgres sh -lc "pg_ctl -w start"
+
+echo "Docker container startup complete"
+
+# Wait for the server to exit.
+while test -e "/var/lib/pgsql/data/postmaster.pid"; do
+	sleep 0.5
+done
diff --git a/db-server/readme.txt b/db-server/readme.txt
new file mode 100644
index 0000000..57e586d
--- /dev/null
+++ b/db-server/readme.txt
@@ -0,0 +1,13 @@
+This directory contains the scripts to create a docker-based database server to be used for unit testing.
+In order to use this server, docker must be installed on the local workstation.  Beyond that, no additional
+configuration should be required.
+
+To build the docker image, run the following script.
+    ./build.sh
+
+To run the docker image, run the following command.  To stop the server, press Ctrl-C.
+    docker run -ti --rm=true --name osmosis-build -p 5432:5432 bretth/osmosis-build
+
+If you wish to troubleshoot a running server, you may run the following command to get a bash prompt
+inside the docker container.
+    docker exec -ti osmosis-build /bin/bash
diff --git a/db-server/script b/db-server/script
new file mode 120000
index 0000000..a8cd555
--- /dev/null
+++ b/db-server/script
@@ -0,0 +1 @@
+../package/script
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index a10bb19..43bdd27 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -4,21 +4,20 @@
 org.gradle.daemon=true
 
 # 3rd Party Library Versions
-dependencyVersionClassworlds=2.4
-dependencyVersionCommonsCodec=1.7
-dependencyVersionCommonsCompress=1.4.1
+dependencyVersionClassworlds=2.5.2
+dependencyVersionCommonsCodec=1.10
+dependencyVersionCommonsCompress=1.9
 dependencyVersionCommonsDbcp=1.4
 dependencyVersionJpf=1.5
-dependencyVersionJunit=4.10
-dependencyVersionMySql=5.1.21
-dependencyVersionNetty=3.2.7.Final
-dependencyVersionOsmPbf=1.1.1-754a33af
+dependencyVersionJunit=4.12
+dependencyVersionMySql=5.1.35
+dependencyVersionNetty=3.2.10.Final
 dependencyVersionPostGis=1.3.3
-dependencyVersionPostgreSql=9.1-901-1.jdbc4
-dependencyVersionProtobuf=2.4.1
-dependencyVersionSpring=3.1.2.RELEASE
-dependencyVersionWoodstoxCore=4.1.4
-dependencyVersionWoodstoxStax2=3.1.1
+dependencyVersionPostgreSql=9.4-1201-jdbc4
+dependencyVersionProtobuf=2.6.1
+dependencyVersionSpring=4.1.6.RELEASE
+dependencyVersionWoodstoxCore=4.4.1
+dependencyVersionWoodstoxStax2=3.1.4
 # Remaining on 2.9.1 instead of 2.10.0 for now because the newer version
 # depends on org.w3c.dom.ElementTraversal which is not being transitively
 # included. This could be possibly be fixed by including a newer version
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 42d9b0e..b5166da 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 8141911..4c550e0 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Mar 24 21:08:40 EST 2013
+#Wed Jun 03 22:25:15 EST 2015
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.4-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
diff --git a/osmosis-apidb/build.gradle b/osmosis-apidb/build.gradle
index 8aa5f64..6618c96 100644
--- a/osmosis-apidb/build.gradle
+++ b/osmosis-apidb/build.gradle
@@ -4,7 +4,7 @@ dependencies {
     compile project(':osmosis-xml')
     compile group: 'commons-dbcp', name: 'commons-dbcp', version: dependencyVersionCommonsDbcp
     compile group: 'org.springframework', name: 'spring-jdbc', version: dependencyVersionSpring
-    runtime group: 'postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
+    runtime group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
     runtime group: 'mysql', name: 'mysql-connector-java', version: dependencyVersionMySql
     testCompile project(':osmosis-testutil')
 }
diff --git a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/common/MysqlIdentityValueLoader2.java b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/common/MysqlIdentityValueLoader2.java
index d369e53..d5c8b47 100644
--- a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/common/MysqlIdentityValueLoader2.java
+++ b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/common/MysqlIdentityValueLoader2.java
@@ -32,7 +32,7 @@ public class MysqlIdentityValueLoader2 implements IdentityValueLoader {
 	 * @return The newly inserted id.
 	 */
 	public long getLastInsertId() {
-		return dbCtx.getJdbcTemplate().queryForLong(SQL_SELECT_LAST_INSERT_ID);
+		return dbCtx.getJdbcTemplate().queryForObject(SQL_SELECT_LAST_INSERT_ID, Long.class);
 	}
 
 
diff --git a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/common/PostgresqlIdentityValueLoader2.java b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/common/PostgresqlIdentityValueLoader2.java
index db59319..24d341f 100644
--- a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/common/PostgresqlIdentityValueLoader2.java
+++ b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/common/PostgresqlIdentityValueLoader2.java
@@ -34,7 +34,7 @@ public class PostgresqlIdentityValueLoader2 implements IdentityValueLoader {
 	 * @return The newly inserted id.
 	 */
 	public long getLastInsertId() {
-		return dbCtx.getJdbcTemplate().queryForLong(SQL_SELECT_LAST_INSERT_ID);
+		return dbCtx.getJdbcTemplate().queryForObject(SQL_SELECT_LAST_INSERT_ID, Long.class);
 	}
 
 
@@ -43,7 +43,7 @@ public class PostgresqlIdentityValueLoader2 implements IdentityValueLoader {
 	 */
 	@Override
 	public long getLastSequenceId(String sequenceName) {
-		return dbCtx.getJdbcTemplate().queryForLong(SQL_SELECT_LAST_SEQUENCE_ID, sequenceName);
+		return dbCtx.getJdbcTemplate().queryForObject(SQL_SELECT_LAST_SEQUENCE_ID, Long.class, sequenceName);
 	}
 	
 	
diff --git a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/ApidbVersionConstants.java b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/ApidbVersionConstants.java
index e461299..92e0f3a 100644
--- a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/ApidbVersionConstants.java
+++ b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/ApidbVersionConstants.java
@@ -24,11 +24,14 @@ public final class ApidbVersionConstants {
 		"21", "22", "23", "24", "25", "26", "27", "28", "29", "30",
 		"31", "32", "33", "34", "35", "36", "37", "38", "39", "40",
 		"41", "42", "43", "44", "45", "46", "47", "48", "49", "50",
-		"51", "52", "20100513171259", "20100516124737",
-		"20100910084426", "20101114011429", "20110322001319", 
+		"51", "52", "53", "54", "55", "56", "57", "20100513171259", 
+		"20100516124737", "20100910084426", "20101114011429", 
+		"20110322001319", "20110508145337", "20110521142405",
 		"20110925112722", "20111116184519", "20111212183945",
-		"20120208122334", "20120208194454", "20120123184321",
-		"20120219161649", "20120214210114", "20120328090602",
-		"20120404205604", "20120318201948", "20120808231205"
+		"20120123184321", "20120208122334", "20120208194454",
+		"20120214210114", "20120219161649", "20120318201948",
+		"20120328090602", "20120404205604", "20120808231205",
+		"20121005195010", "20121012044047", "20121119165817",
+		"20121202155309", "20121203124841", "20130328184137"
 	};
 }
diff --git a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/ApidbWriter.java b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/ApidbWriter.java
index 2cae012..ae651f9 100644
--- a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/ApidbWriter.java
+++ b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/ApidbWriter.java
@@ -216,8 +216,11 @@ public class ApidbWriter implements Sink, EntityProcessor {
     private final List<DbFeatureHistory<DbFeature<Tag>>> relationTagBuffer;
     private final List<DbFeatureHistory<DbOrderedFeature<RelationMember>>> relationMemberBuffer;
     private long maxNodeId;
+    private long minNodeId;
     private long maxWayId;
+    private long minWayId;
     private long maxRelationId;
+    private long minRelationId;
     private final TileCalculator tileCalculator;
     private final MemberTypeRenderer memberTypeRenderer;
     private boolean initialized;
@@ -276,9 +279,12 @@ public class ApidbWriter implements Sink, EntityProcessor {
         relationTagBuffer = new ArrayList<DbFeatureHistory<DbFeature<Tag>>>();
         relationMemberBuffer = new ArrayList<DbFeatureHistory<DbOrderedFeature<RelationMember>>>();
 
-        maxNodeId = 0;
-        maxWayId = 0;
-        maxRelationId = 0;
+        maxNodeId = Long.MIN_VALUE;
+        minNodeId = Long.MAX_VALUE;
+        maxWayId = Long.MIN_VALUE;
+        minWayId = Long.MAX_VALUE;
+        maxRelationId = Long.MIN_VALUE;
+        minRelationId = Long.MAX_VALUE;
 
         tileCalculator = new TileCalculator();
         memberTypeRenderer = new MemberTypeRenderer();
@@ -917,7 +923,7 @@ public class ApidbWriter implements Sink, EntityProcessor {
     
     private void populateCurrentNodes() {
         // Copy data into the current node tables.
-        for (long i = 0; i < maxNodeId; i += LOAD_CURRENT_NODE_ROW_COUNT) {
+        for (long i = minNodeId; i < maxNodeId; i += LOAD_CURRENT_NODE_ROW_COUNT) {
             // Node
             try {
                 loadCurrentNodesStatement.setLong(1, i);
@@ -946,7 +952,7 @@ public class ApidbWriter implements Sink, EntityProcessor {
     
     
     private void populateCurrentWays() {
-        for (long i = 0; i < maxWayId; i += LOAD_CURRENT_WAY_ROW_COUNT) {
+        for (long i = minWayId; i < maxWayId; i += LOAD_CURRENT_WAY_ROW_COUNT) {
             // Way
             try {
                 loadCurrentWaysStatement.setLong(1, i);
@@ -986,7 +992,7 @@ public class ApidbWriter implements Sink, EntityProcessor {
     
     
     private void populateCurrentRelations() {
-        for (long i = 0; i < maxRelationId; i += LOAD_CURRENT_RELATION_ROW_COUNT) {
+        for (long i = minRelationId; i < maxRelationId; i += LOAD_CURRENT_RELATION_ROW_COUNT) {
             // Way
             try {
                 loadCurrentRelationsStatement.setLong(1, i);
@@ -1115,6 +1121,9 @@ public class ApidbWriter implements Sink, EntityProcessor {
         if (nodeId >= maxNodeId) {
             maxNodeId = nodeId + 1;
         }
+        if (nodeId < minNodeId) {
+          minNodeId = nodeId;
+        }
 
         nodeBuffer.add(node);
 
@@ -1150,7 +1159,9 @@ public class ApidbWriter implements Sink, EntityProcessor {
         if (wayId >= maxWayId) {
             maxWayId = wayId + 1;
         }
-
+        if (wayId < minWayId) {
+          minWayId = wayId;
+        }
         wayBuffer.add(way);
 
         flushWays(false);
@@ -1203,7 +1214,9 @@ public class ApidbWriter implements Sink, EntityProcessor {
         if (relationId >= maxRelationId) {
             maxRelationId = relationId + 1;
         }
-
+        if (relationId < minRelationId) {
+          minRelationId = relationId;
+        }
         relationBuffer.add(relation);
 
         flushRelations(false);
diff --git a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/impl/EntityDao.java b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/impl/EntityDao.java
index 6610303..a008d0e 100644
--- a/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/impl/EntityDao.java
+++ b/osmosis-apidb/src/main/java/org/openstreetmap/osmosis/apidb/v0_6/impl/EntityDao.java
@@ -460,8 +460,8 @@ public abstract class EntityDao<T extends Entity> {
 		
 		if (LOG.isLoggable(Level.FINER)) {
 			LOG.log(Level.FINER,
-					jdbcTemplate.queryForInt("SELECT Count(" + entityName + "_id) FROM " + selectedEntityTableName)
-					+ " " + entityName + " records located.");
+					jdbcTemplate.queryForObject("SELECT Count(" + entityName + "_id) FROM " + selectedEntityTableName,
+							Integer.class) + " " + entityName + " records located.");
 		}
 		
 		// Extract the data and obtain an iterator for the results.
diff --git a/osmosis-areafilter/src/main/java/org/openstreetmap/osmosis/areafilter/common/PolygonFileReader.java b/osmosis-areafilter/src/main/java/org/openstreetmap/osmosis/areafilter/common/PolygonFileReader.java
index ad6a33f..bc2a783 100644
--- a/osmosis-areafilter/src/main/java/org/openstreetmap/osmosis/areafilter/common/PolygonFileReader.java
+++ b/osmosis-areafilter/src/main/java/org/openstreetmap/osmosis/areafilter/common/PolygonFileReader.java
@@ -24,37 +24,36 @@ import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
  * contains the name of an individual polygon and if it is prefixed with ! it
  * means it is a negative polygon to be subtracted from the resultant extraction
  * polygon.
- * <p>
- * <code>
- * australia_v<br/>
- * 1<br/>
- *      0.1446763E+03    -0.3825659E+02<br/>
- *      0.1446693E+03    -0.3826255E+02<br/>
- *      0.1446627E+03    -0.3825661E+02<br/>
- *      0.1446763E+03    -0.3824465E+02<br/>
- *      0.1446813E+03    -0.3824343E+02<br/>
- *      0.1446824E+03    -0.3824484E+02<br/>
- *      0.1446826E+03    -0.3825356E+02<br/>
- *      0.1446876E+03    -0.3825210E+02<br/>
- *      0.1446919E+03    -0.3824719E+02<br/>
- *      0.1447006E+03    -0.3824723E+02<br/>
- *      0.1447042E+03    -0.3825078E+02<br/>
- *      0.1446758E+03    -0.3826229E+02<br/>
- *      0.1446693E+03    -0.3826255E+02<br/>
- * END<br/>
- * !2<br/>
- *      0.1422483E+03    -0.3839481E+02<br/>
- *      0.1422436E+03    -0.3839315E+02<br/>
- *      0.1422496E+03    -0.3839070E+02<br/>
- *      0.1422543E+03    -0.3839025E+02<br/>
- *      0.1422574E+03    -0.3839155E+02<br/>
- *      0.1422467E+03    -0.3840065E+02<br/>
- *      0.1422433E+03    -0.3840048E+02<br/>
- *      0.1422420E+03    -0.3839857E+02<br/>
- *      0.1422436E+03    -0.3839315E+02<br/>
- * END<br/>
- * END<br/>
- * </code>
+ * <pre>
+ * australia_v
+ * 1
+ *      0.1446763E+03    -0.3825659E+02
+ *      0.1446693E+03    -0.3826255E+02
+ *      0.1446627E+03    -0.3825661E+02
+ *      0.1446763E+03    -0.3824465E+02
+ *      0.1446813E+03    -0.3824343E+02
+ *      0.1446824E+03    -0.3824484E+02
+ *      0.1446826E+03    -0.3825356E+02
+ *      0.1446876E+03    -0.3825210E+02
+ *      0.1446919E+03    -0.3824719E+02
+ *      0.1447006E+03    -0.3824723E+02
+ *      0.1447042E+03    -0.3825078E+02
+ *      0.1446758E+03    -0.3826229E+02
+ *      0.1446693E+03    -0.3826255E+02
+ * END
+ * !2
+ *      0.1422483E+03    -0.3839481E+02
+ *      0.1422436E+03    -0.3839315E+02
+ *      0.1422496E+03    -0.3839070E+02
+ *      0.1422543E+03    -0.3839025E+02
+ *      0.1422574E+03    -0.3839155E+02
+ *      0.1422467E+03    -0.3840065E+02
+ *      0.1422433E+03    -0.3840048E+02
+ *      0.1422420E+03    -0.3839857E+02
+ *      0.1422436E+03    -0.3839315E+02
+ * END
+ * END
+ * </pre>
  * 
  * @author Brett Henderson
  */
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/database/FeaturePopulator.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/database/FeaturePopulator.java
index b7fa519..cbc40a8 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/database/FeaturePopulator.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/database/FeaturePopulator.java
@@ -8,9 +8,10 @@ import org.openstreetmap.osmosis.core.lifecycle.Releasable;
  * Populates an entity with its features.
  * 
  * @param <T>
+ *            The type of entity to be populated.
  */
 public interface FeaturePopulator<T> extends Releasable {
-	
+
 	/**
 	 * Populates the specified entity.
 	 * 
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Bound.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Bound.java
index e5255b7..16c4740 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Bound.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Bound.java
@@ -399,13 +399,14 @@ public class Bound extends Entity implements Comparable<Bound> {
 
 
 	/**
-	 * Compares this bound to the specified bound. The bound comparison is based on a comparison
-	 * of area, latitude, and longitude in that order.
+	 * Compares this bound to the specified bound. The bound comparison is based
+	 * on a comparison of area, latitude, and longitude in that order.
 	 * 
 	 * @param comparisonBound
 	 *            The bound to compare to.
-	 * @return 0 if equal, < 0 if this sorts before comparison (this is "smaller"), and > 0 if this
-	 *         sorts before comparison (this is "bigger")
+	 * @return 0 if equal, < 0 if this sorts before comparison (this is
+	 *         "smaller"), and > 0 if this sorts before comparison (this is
+	 *         "bigger")
 	 */
 	public int compareTo(Bound comparisonBound) {
 		double areaT = 0.0, areaC = 0.0;
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/CommonEntityData.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/CommonEntityData.java
index 9944d55..a7f8718 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/CommonEntityData.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/CommonEntityData.java
@@ -243,7 +243,7 @@ public class CommonEntityData implements Storeable {
 	 * 
 	 * @param comparisonTags
 	 *            The tags to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
 	 *         "bigger".
 	 */
 	protected int compareTags(Collection<Tag> comparisonTags) {
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Entity.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Entity.java
index 4dd83ba..25d80f3 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Entity.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Entity.java
@@ -161,7 +161,7 @@ public abstract class Entity implements Storeable {
 	 * 
 	 * @param comparisonTags
 	 *            The tags to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
 	 *         "bigger".
 	 */
 	protected int compareTags(Collection<Tag> comparisonTags) {
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Node.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Node.java
index b6c6e86..a610c96 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Node.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Node.java
@@ -242,12 +242,14 @@ public class Node extends Entity implements Comparable<Node> {
 
 
 	/**
-	 * Compares this node to the specified node. The node comparison is based on a comparison of id,
-	 * version, latitude, longitude, timestamp and tags in that order.
+	 * Compares this node to the specified node. The node comparison is based on
+	 * a comparison of id, version, latitude, longitude, timestamp and tags in
+	 * that order.
 	 * 
 	 * @param comparisonNode
 	 *            The node to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered "bigger".
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if
+	 *         considered "bigger".
 	 */
 	public int compareTo(Node comparisonNode) {
 		if (this.getId() < comparisonNode.getId()) {
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Relation.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Relation.java
index dcc894e..e323175 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Relation.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Relation.java
@@ -247,8 +247,8 @@ public class Relation extends Entity implements Comparable<Relation> {
 	 * 
 	 * @param comparisonMemberList
 	 *            The member list to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
-	 *         "bigger".
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if
+	 *         considered "bigger".
 	 */
 	protected int compareMemberList(Collection<RelationMember> comparisonMemberList) {
 		Iterator<RelationMember> i;
@@ -277,12 +277,13 @@ public class Relation extends Entity implements Comparable<Relation> {
 
 	/**
 	 * Compares this relation to the specified relation. The relation comparison
-	 * is based on a comparison of id, version, timestamp, and tags in that order.
+	 * is based on a comparison of id, version, timestamp, and tags in that
+	 * order.
 	 * 
 	 * @param comparisonRelation
 	 *            The relation to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
-	 *         "bigger".
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if
+	 *         considered "bigger".
 	 */
 	public int compareTo(Relation comparisonRelation) {
 		int memberListResult;
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/RelationMember.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/RelationMember.java
index 0fac5e8..6b36da8 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/RelationMember.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/RelationMember.java
@@ -77,8 +77,8 @@ public class RelationMember implements Comparable<RelationMember>, Storeable {
 	 * 
 	 * @param relationMember
 	 *            The relation member to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
-	 *         "bigger".
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if
+	 *         considered "bigger".
 	 */
 	public int compareTo(RelationMember relationMember) {
 		long result;
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Tag.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Tag.java
index 71d20cd..7a7dc71 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Tag.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Tag.java
@@ -62,13 +62,13 @@ public class Tag implements Comparable<Tag>, Storeable {
 	
 	
 	/**
-	 * Compares this tag to the specified tag. The tag comparison is based on
-	 * a comparison of key and value in that order.
+	 * Compares this tag to the specified tag. The tag comparison is based on a
+	 * comparison of key and value in that order.
 	 * 
 	 * @param tag
 	 *            The tag to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
-	 *         "bigger".
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if
+	 *         considered "bigger".
 	 */
 	public int compareTo(Tag tag) {
 		int keyResult;
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Way.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Way.java
index 4140caf..b946e20 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Way.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/Way.java
@@ -13,7 +13,6 @@ import org.openstreetmap.osmosis.core.domain.common.TimestampContainer;
 import org.openstreetmap.osmosis.core.store.StoreClassRegister;
 import org.openstreetmap.osmosis.core.store.StoreReader;
 import org.openstreetmap.osmosis.core.store.StoreWriter;
-import org.openstreetmap.osmosis.core.util.IntAsChar;
 
 
 /**
@@ -181,7 +180,7 @@ public class Way extends Entity implements Comparable<Way> {
 		
 		int featureCount;
 		
-		featureCount = sr.readCharacter();
+		featureCount = sr.readInteger();
 		
 		wayNodes = new ArrayList<WayNode>();
 		for (int i = 0; i < featureCount; i++) {
@@ -197,7 +196,7 @@ public class Way extends Entity implements Comparable<Way> {
 	public void store(StoreWriter sw, StoreClassRegister scr) {
 		super.store(sw, scr);
 		
-		sw.writeCharacter(IntAsChar.intToChar(wayNodes.size()));
+		sw.writeInteger(wayNodes.size());
 		for (WayNode wayNode : wayNodes) {
 			wayNode.store(sw, scr);
 		}
@@ -247,8 +246,8 @@ public class Way extends Entity implements Comparable<Way> {
 	 * 
 	 * @param comparisonWayNodes
 	 *            The node list to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
-	 *         "bigger".
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if
+	 *         considered "bigger".
 	 */
 	protected int compareWayNodes(List<WayNode> comparisonWayNodes) {
 		Iterator<WayNode> i;
@@ -281,8 +280,8 @@ public class Way extends Entity implements Comparable<Way> {
 	 * 
 	 * @param comparisonWay
 	 *            The way to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
-	 *         "bigger".
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if
+	 *         considered "bigger".
 	 */
 	public int compareTo(Way comparisonWay) {
 		int wayNodeListResult;
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/WayNode.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/WayNode.java
index 9a1413b..50dea12 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/WayNode.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/domain/v0_6/WayNode.java
@@ -56,8 +56,8 @@ public class WayNode implements Comparable<WayNode>, Storeable {
 	 * 
 	 * @param wayNode
 	 *            The way node to compare to.
-	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if considered
-	 *         "bigger".
+	 * @return 0 if equal, < 0 if considered "smaller", and > 0 if
+	 *         considered "bigger".
 	 */
 	public int compareTo(WayNode wayNode) {
 		long result;
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/report/v0_6/IntegrityReporter.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/report/v0_6/IntegrityReporter.java
index 6f932b3..d83a3b9 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/report/v0_6/IntegrityReporter.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/report/v0_6/IntegrityReporter.java
@@ -23,7 +23,7 @@ import org.openstreetmap.osmosis.core.domain.v0_6.Relation;
 import org.openstreetmap.osmosis.core.domain.v0_6.RelationMember;
 import org.openstreetmap.osmosis.core.domain.v0_6.Way;
 import org.openstreetmap.osmosis.core.domain.v0_6.WayNode;
-import org.openstreetmap.osmosis.core.filter.common.BitSetIdTracker;
+import org.openstreetmap.osmosis.core.filter.common.DynamicIdTracker;
 import org.openstreetmap.osmosis.core.filter.common.IdTracker;
 import org.openstreetmap.osmosis.core.task.v0_6.Sink;
 
@@ -55,8 +55,8 @@ public class IntegrityReporter implements Sink, EntityProcessor {
 		this.file = file;
 		
 		initialized = false;
-		nodeBitSet = new BitSetIdTracker();
-		wayBitSet = new BitSetIdTracker();
+		nodeBitSet = new DynamicIdTracker();
+		wayBitSet = new DynamicIdTracker();
 	}
 	
 	
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/store/DataPostbox.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/store/DataPostbox.java
index 86c1670..b0c4795 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/store/DataPostbox.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/store/DataPostbox.java
@@ -20,9 +20,9 @@ import org.openstreetmap.osmosis.core.task.v0_6.Initializable;
  * Both threads will block until the other is ready. It supports a single
  * writing thread, and a single reading thread. Multiple reading or writing
  * threads are NOT supported.
- * </p>
  * <p>
  * The input thread must call methods in the following sequence:
+ * </p>
  * <ul>
  * <li>initialize - Called during successful startup, can be skipped in failure
  * condition</li>
@@ -31,7 +31,9 @@ import org.openstreetmap.osmosis.core.task.v0_6.Initializable;
  * <li>release - Called once at the end of processing regardless of success or
  * failure</li>
  * </ul>
+ * <p>
  * The output thread must call methods in the following sequence:
+ * </p>
  * <ul>
  * <li>outputInitialize - Called during successful startup, can be skipped in
  * failure condition</li>
@@ -41,9 +43,9 @@ import org.openstreetmap.osmosis.core.task.v0_6.Initializable;
  * <li>outputRelease - Called once at the end of processing regardless of
  * success or failure</li>
  * </ul>
- * </p>
  * <p>
  * The input thread will block in the following situations:
+ * </p>
  * <ul>
  * <li>initialize has been called, but outputInitialize has not yet been called</li>
  * <li>put has been called, and the buffer is full</li>
@@ -53,7 +55,9 @@ import org.openstreetmap.osmosis.core.task.v0_6.Initializable;
  * called. This wait must occur to support the scenario where both threads
  * subsequently wish to initialize again.</li>
  * </ul>
+ * <p>
  * The output thread will block in the following situations:
+ * </p>
  * <ul>
  * <li>The outputInitialize method has been called, and initialize has not yet
  * been called</li>
@@ -65,13 +69,11 @@ import org.openstreetmap.osmosis.core.task.v0_6.Initializable;
  * <li>The outputRelease method has been called, but release has not yet been
  * called.</li>
  * </ul>
- * </p>
  * <p>
  * This class may be re-used multiple times. For this to work, both input and
  * output methods must be called an equal number of times or deadlock will
  * occur. Re-use may occur after input or output threads fail, however in all
  * cases calls to release and outputRelease must be matched.
- * </p>
  * 
  * @param <T>
  *            The type of data held in the postbox.
diff --git a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/util/TileCalculator.java b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/util/TileCalculator.java
index 4270d36..3709441 100644
--- a/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/util/TileCalculator.java
+++ b/osmosis-core/src/main/java/org/openstreetmap/osmosis/core/util/TileCalculator.java
@@ -10,7 +10,7 @@ package org.openstreetmap.osmosis.core.util;
  * <p>
  * The result can be cast directly to an int, but converting back to an unsigned
  * long value must be performed like: <code>
- * long tile = intTile & 0xFFFFFFFFl;
+ * long tile = intTile & 0xFFFFFFFFl;
  * </code>
  * 
  * @author Brett Henderson
diff --git a/osmosis-core/src/test/java/org/openstreetmap/osmosis/core/bound/v0_6/BoundComputerTest.java b/osmosis-core/src/test/java/org/openstreetmap/osmosis/core/bound/v0_6/BoundComputerTest.java
index 91887e8..c5e7bfb 100644
--- a/osmosis-core/src/test/java/org/openstreetmap/osmosis/core/bound/v0_6/BoundComputerTest.java
+++ b/osmosis-core/src/test/java/org/openstreetmap/osmosis/core/bound/v0_6/BoundComputerTest.java
@@ -4,8 +4,7 @@ package org.openstreetmap.osmosis.core.bound.v0_6;
 import java.util.Date;
 import java.util.Iterator;
 
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Test;
 import org.openstreetmap.osmosis.core.container.v0_6.BoundContainer;
 import org.openstreetmap.osmosis.core.container.v0_6.EntityContainer;
diff --git a/osmosis-core/src/test/java/org/openstreetmap/osmosis/core/bound/v0_6/BoundSetterTest.java b/osmosis-core/src/test/java/org/openstreetmap/osmosis/core/bound/v0_6/BoundSetterTest.java
index ba7f13a..3cbd1d2 100644
--- a/osmosis-core/src/test/java/org/openstreetmap/osmosis/core/bound/v0_6/BoundSetterTest.java
+++ b/osmosis-core/src/test/java/org/openstreetmap/osmosis/core/bound/v0_6/BoundSetterTest.java
@@ -4,8 +4,7 @@ package org.openstreetmap.osmosis.core.bound.v0_6;
 import java.util.Date;
 import java.util.Iterator;
 
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Test;
 import org.openstreetmap.osmosis.core.container.v0_6.BoundContainer;
 import org.openstreetmap.osmosis.core.container.v0_6.EntityContainer;
diff --git a/osmosis-dataset/src/main/java/org/openstreetmap/osmosis/dataset/v0_6/impl/BoundingBoxContext.java b/osmosis-dataset/src/main/java/org/openstreetmap/osmosis/dataset/v0_6/impl/BoundingBoxContext.java
index 3796f9c..2afd6ae 100644
--- a/osmosis-dataset/src/main/java/org/openstreetmap/osmosis/dataset/v0_6/impl/BoundingBoxContext.java
+++ b/osmosis-dataset/src/main/java/org/openstreetmap/osmosis/dataset/v0_6/impl/BoundingBoxContext.java
@@ -4,7 +4,7 @@ package org.openstreetmap.osmosis.dataset.v0_6.impl;
 import java.awt.geom.Rectangle2D;
 import java.util.Comparator;
 
-import org.openstreetmap.osmosis.core.filter.common.BitSetIdTracker;
+import org.openstreetmap.osmosis.core.filter.common.DynamicIdTracker;
 import org.openstreetmap.osmosis.core.filter.common.IdTracker;
 import org.openstreetmap.osmosis.core.store.UnsignedIntegerComparator;
 import org.openstreetmap.osmosis.core.util.TileCalculator;
@@ -117,9 +117,9 @@ public class BoundingBoxContext {
 		minimumTile = tmpMinimumTile;
 		
 		// Create the id trackers.
-		nodeIdTracker = new BitSetIdTracker();
-		wayIdTracker = new BitSetIdTracker();
-		relationIdTracker = new BitSetIdTracker();
-		externalNodeIdTracker = new BitSetIdTracker();
+		nodeIdTracker = new DynamicIdTracker();
+		wayIdTracker = new DynamicIdTracker();
+		relationIdTracker = new DynamicIdTracker();
+		externalNodeIdTracker = new DynamicIdTracker();
 	}
 }
diff --git a/osmosis-dataset/src/main/java/org/openstreetmap/osmosis/dataset/v0_6/impl/DatasetStoreReader.java b/osmosis-dataset/src/main/java/org/openstreetmap/osmosis/dataset/v0_6/impl/DatasetStoreReader.java
index ec42752..f5d19a1 100644
--- a/osmosis-dataset/src/main/java/org/openstreetmap/osmosis/dataset/v0_6/impl/DatasetStoreReader.java
+++ b/osmosis-dataset/src/main/java/org/openstreetmap/osmosis/dataset/v0_6/impl/DatasetStoreReader.java
@@ -22,7 +22,7 @@ import org.openstreetmap.osmosis.core.domain.v0_6.Node;
 import org.openstreetmap.osmosis.core.domain.v0_6.Relation;
 import org.openstreetmap.osmosis.core.domain.v0_6.Way;
 import org.openstreetmap.osmosis.core.domain.v0_6.WayNode;
-import org.openstreetmap.osmosis.core.filter.common.BitSetIdTracker;
+import org.openstreetmap.osmosis.core.filter.common.DynamicIdTracker;
 import org.openstreetmap.osmosis.core.filter.common.IdTracker;
 import org.openstreetmap.osmosis.core.lifecycle.ReleasableIterator;
 import org.openstreetmap.osmosis.core.store.EmptyIterator;
@@ -287,7 +287,7 @@ public class DatasetStoreReader implements DatasetContext {
 		ReleasableIterator<Long> nodeIdsForTileset;
 		IdTracker idTracker;
 		
-		idTracker = new BitSetIdTracker();
+		idTracker = new DynamicIdTracker();
 		
 		// Search through all nodes in the tile range and add them to a
 		// temporary id tracker. This temporary id tracker allows all node ids
diff --git a/osmosis-hstore-jdbc/build.gradle b/osmosis-hstore-jdbc/build.gradle
index c8f234b..3126d9a 100644
--- a/osmosis-hstore-jdbc/build.gradle
+++ b/osmosis-hstore-jdbc/build.gradle
@@ -1,5 +1,5 @@
 dependencies {
-    compile group: 'postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
+    compile group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
 }
 
 // Disable checkstyle because this is external code.
diff --git a/osmosis-hstore-jdbc/src/main/resources/org/postgresql/driverconfig.properties b/osmosis-hstore-jdbc/src/main/resources/org/postgresql/driverconfig.properties
deleted file mode 100644
index 51f927d..0000000
--- a/osmosis-hstore-jdbc/src/main/resources/org/postgresql/driverconfig.properties
+++ /dev/null
@@ -1 +0,0 @@
-datatype.hstore=org.openstreetmap.osmosis.hstore.PGHStore
\ No newline at end of file
diff --git a/osmosis-osm-binary/ReleaseNotes.txt b/osmosis-osm-binary/ReleaseNotes.txt
index 59ae489..2ba9330 100644
--- a/osmosis-osm-binary/ReleaseNotes.txt
+++ b/osmosis-osm-binary/ReleaseNotes.txt
@@ -1,4 +1,25 @@
 ----------------------------------------
+Release notes for 1.3.3  -- 2014-03-15
+----------------------------------------
+
+Fixed ant build file.
+
+----------------------------------------
+Release notes for 1.3.2  -- 2014-03-12
+----------------------------------------
+
+Small bugfixes and build enhancements.
+Improved Debian build in coordination with Debian maintainers.
+
+
+----------------------------------------
+Release notes for 1.3.1  -- 2013-12-11
+----------------------------------------
+
+Several building fixes and enhancements.
+
+
+----------------------------------------
 Release notes for 1.3.0  -- 2012-12-04
 ----------------------------------------
 
diff --git a/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java b/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java
index 8ce1359..1e26d53 100644
--- a/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java
+++ b/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Fileformat.java
@@ -8,98 +8,319 @@ public final class Fileformat {
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistryLite registry) {
   }
-  public interface BlobOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // optional bytes raw = 1;
+  public interface BlobOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.Blob)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>optional bytes raw = 1;</code>
+     *
+     * <pre>
+     * No compression
+     * </pre>
+     */
     boolean hasRaw();
+    /**
+     * <code>optional bytes raw = 1;</code>
+     *
+     * <pre>
+     * No compression
+     * </pre>
+     */
     com.google.protobuf.ByteString getRaw();
-    
-    // optional int32 raw_size = 2;
+
+    /**
+     * <code>optional int32 raw_size = 2;</code>
+     *
+     * <pre>
+     * When compressed, the uncompressed size
+     * </pre>
+     */
     boolean hasRawSize();
+    /**
+     * <code>optional int32 raw_size = 2;</code>
+     *
+     * <pre>
+     * When compressed, the uncompressed size
+     * </pre>
+     */
     int getRawSize();
-    
-    // optional bytes zlib_data = 3;
+
+    /**
+     * <code>optional bytes zlib_data = 3;</code>
+     *
+     * <pre>
+     * Possible compressed versions of the data.
+     * </pre>
+     */
     boolean hasZlibData();
+    /**
+     * <code>optional bytes zlib_data = 3;</code>
+     *
+     * <pre>
+     * Possible compressed versions of the data.
+     * </pre>
+     */
     com.google.protobuf.ByteString getZlibData();
-    
-    // optional bytes lzma_data = 4;
+
+    /**
+     * <code>optional bytes lzma_data = 4;</code>
+     *
+     * <pre>
+     * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+     * </pre>
+     */
     boolean hasLzmaData();
+    /**
+     * <code>optional bytes lzma_data = 4;</code>
+     *
+     * <pre>
+     * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+     * </pre>
+     */
     com.google.protobuf.ByteString getLzmaData();
-    
-    // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
+
+    /**
+     * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+     *
+     * <pre>
+     * Formerly used for bzip2 compressed data. Depreciated in 2010.
+     * </pre>
+     */
     @java.lang.Deprecated boolean hasOBSOLETEBzip2Data();
+    /**
+     * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+     *
+     * <pre>
+     * Formerly used for bzip2 compressed data. Depreciated in 2010.
+     * </pre>
+     */
     @java.lang.Deprecated com.google.protobuf.ByteString getOBSOLETEBzip2Data();
   }
+  /**
+   * Protobuf type {@code OSMPBF.Blob}
+   */
   public static final class Blob extends
-      com.google.protobuf.GeneratedMessageLite
-      implements BlobOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.Blob)
+      BlobOrBuilder {
     // Use Blob.newBuilder() to construct.
-    private Blob(Builder builder) {
+    private Blob(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private Blob(boolean noInit) {}
-    
+    private Blob(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final Blob defaultInstance;
     public static Blob getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public Blob getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private Blob(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              bitField0_ |= 0x00000001;
+              raw_ = input.readBytes();
+              break;
+            }
+            case 16: {
+              bitField0_ |= 0x00000002;
+              rawSize_ = input.readInt32();
+              break;
+            }
+            case 26: {
+              bitField0_ |= 0x00000004;
+              zlibData_ = input.readBytes();
+              break;
+            }
+            case 34: {
+              bitField0_ |= 0x00000008;
+              lzmaData_ = input.readBytes();
+              break;
+            }
+            case 42: {
+              bitField0_ |= 0x00000010;
+              oBSOLETEBzip2Data_ = input.readBytes();
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<Blob> PARSER =
+        new com.google.protobuf.AbstractParser<Blob>() {
+      public Blob parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Blob(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Blob> getParserForType() {
+      return PARSER;
+    }
+
     private int bitField0_;
-    // optional bytes raw = 1;
     public static final int RAW_FIELD_NUMBER = 1;
     private com.google.protobuf.ByteString raw_;
+    /**
+     * <code>optional bytes raw = 1;</code>
+     *
+     * <pre>
+     * No compression
+     * </pre>
+     */
     public boolean hasRaw() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>optional bytes raw = 1;</code>
+     *
+     * <pre>
+     * No compression
+     * </pre>
+     */
     public com.google.protobuf.ByteString getRaw() {
       return raw_;
     }
-    
-    // optional int32 raw_size = 2;
+
     public static final int RAW_SIZE_FIELD_NUMBER = 2;
     private int rawSize_;
+    /**
+     * <code>optional int32 raw_size = 2;</code>
+     *
+     * <pre>
+     * When compressed, the uncompressed size
+     * </pre>
+     */
     public boolean hasRawSize() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>optional int32 raw_size = 2;</code>
+     *
+     * <pre>
+     * When compressed, the uncompressed size
+     * </pre>
+     */
     public int getRawSize() {
       return rawSize_;
     }
-    
-    // optional bytes zlib_data = 3;
+
     public static final int ZLIB_DATA_FIELD_NUMBER = 3;
     private com.google.protobuf.ByteString zlibData_;
+    /**
+     * <code>optional bytes zlib_data = 3;</code>
+     *
+     * <pre>
+     * Possible compressed versions of the data.
+     * </pre>
+     */
     public boolean hasZlibData() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
+    /**
+     * <code>optional bytes zlib_data = 3;</code>
+     *
+     * <pre>
+     * Possible compressed versions of the data.
+     * </pre>
+     */
     public com.google.protobuf.ByteString getZlibData() {
       return zlibData_;
     }
-    
-    // optional bytes lzma_data = 4;
+
     public static final int LZMA_DATA_FIELD_NUMBER = 4;
     private com.google.protobuf.ByteString lzmaData_;
+    /**
+     * <code>optional bytes lzma_data = 4;</code>
+     *
+     * <pre>
+     * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+     * </pre>
+     */
     public boolean hasLzmaData() {
       return ((bitField0_ & 0x00000008) == 0x00000008);
     }
+    /**
+     * <code>optional bytes lzma_data = 4;</code>
+     *
+     * <pre>
+     * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+     * </pre>
+     */
     public com.google.protobuf.ByteString getLzmaData() {
       return lzmaData_;
     }
-    
-    // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
+
     public static final int OBSOLETE_BZIP2_DATA_FIELD_NUMBER = 5;
     private com.google.protobuf.ByteString oBSOLETEBzip2Data_;
+    /**
+     * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+     *
+     * <pre>
+     * Formerly used for bzip2 compressed data. Depreciated in 2010.
+     * </pre>
+     */
     @java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() {
       return ((bitField0_ & 0x00000010) == 0x00000010);
     }
+    /**
+     * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+     *
+     * <pre>
+     * Formerly used for bzip2 compressed data. Depreciated in 2010.
+     * </pre>
+     */
     @java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() {
       return oBSOLETEBzip2Data_;
     }
-    
+
     private void initFields() {
       raw_ = com.google.protobuf.ByteString.EMPTY;
       rawSize_ = 0;
@@ -110,12 +331,13 @@ public final class Fileformat {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -134,13 +356,14 @@ public final class Fileformat {
       if (((bitField0_ & 0x00000010) == 0x00000010)) {
         output.writeBytes(5, oBSOLETEBzip2Data_);
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
@@ -162,106 +385,98 @@ public final class Fileformat {
         size += com.google.protobuf.CodedOutputStream
           .computeBytesSize(5, oBSOLETEBzip2Data_);
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Fileformat.Blob prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.Blob}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Fileformat.Blob, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Fileformat.BlobOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.Blob)
+        org.openstreetmap.osmosis.osmbinary.Fileformat.BlobOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         raw_ = com.google.protobuf.ByteString.EMPTY;
@@ -276,15 +491,15 @@ public final class Fileformat {
         bitField0_ = (bitField0_ & ~0x00000010);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Fileformat.Blob getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Fileformat.Blob build() {
         org.openstreetmap.osmosis.osmbinary.Fileformat.Blob result = buildPartial();
         if (!result.isInitialized()) {
@@ -292,17 +507,7 @@ public final class Fileformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Fileformat.Blob buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Fileformat.Blob result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Fileformat.Blob buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Fileformat.Blob result = new org.openstreetmap.osmosis.osmbinary.Fileformat.Blob(this);
         int from_bitField0_ = bitField0_;
@@ -330,7 +535,7 @@ public final class Fileformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Fileformat.Blob other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Fileformat.Blob.getDefaultInstance()) return this;
         if (other.hasRaw()) {
@@ -348,69 +553,62 @@ public final class Fileformat {
         if (other.hasOBSOLETEBzip2Data()) {
           setOBSOLETEBzip2Data(other.getOBSOLETEBzip2Data());
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 10: {
-              bitField0_ |= 0x00000001;
-              raw_ = input.readBytes();
-              break;
-            }
-            case 16: {
-              bitField0_ |= 0x00000002;
-              rawSize_ = input.readInt32();
-              break;
-            }
-            case 26: {
-              bitField0_ |= 0x00000004;
-              zlibData_ = input.readBytes();
-              break;
-            }
-            case 34: {
-              bitField0_ |= 0x00000008;
-              lzmaData_ = input.readBytes();
-              break;
-            }
-            case 42: {
-              bitField0_ |= 0x00000010;
-              oBSOLETEBzip2Data_ = input.readBytes();
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Fileformat.Blob parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Fileformat.Blob) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // optional bytes raw = 1;
+
       private com.google.protobuf.ByteString raw_ = com.google.protobuf.ByteString.EMPTY;
+      /**
+       * <code>optional bytes raw = 1;</code>
+       *
+       * <pre>
+       * No compression
+       * </pre>
+       */
       public boolean hasRaw() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>optional bytes raw = 1;</code>
+       *
+       * <pre>
+       * No compression
+       * </pre>
+       */
       public com.google.protobuf.ByteString getRaw() {
         return raw_;
       }
+      /**
+       * <code>optional bytes raw = 1;</code>
+       *
+       * <pre>
+       * No compression
+       * </pre>
+       */
       public Builder setRaw(com.google.protobuf.ByteString value) {
         if (value == null) {
     throw new NullPointerException();
@@ -420,42 +618,96 @@ public final class Fileformat {
         
         return this;
       }
+      /**
+       * <code>optional bytes raw = 1;</code>
+       *
+       * <pre>
+       * No compression
+       * </pre>
+       */
       public Builder clearRaw() {
         bitField0_ = (bitField0_ & ~0x00000001);
         raw_ = getDefaultInstance().getRaw();
         
         return this;
       }
-      
-      // optional int32 raw_size = 2;
+
       private int rawSize_ ;
+      /**
+       * <code>optional int32 raw_size = 2;</code>
+       *
+       * <pre>
+       * When compressed, the uncompressed size
+       * </pre>
+       */
       public boolean hasRawSize() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
+      /**
+       * <code>optional int32 raw_size = 2;</code>
+       *
+       * <pre>
+       * When compressed, the uncompressed size
+       * </pre>
+       */
       public int getRawSize() {
         return rawSize_;
       }
+      /**
+       * <code>optional int32 raw_size = 2;</code>
+       *
+       * <pre>
+       * When compressed, the uncompressed size
+       * </pre>
+       */
       public Builder setRawSize(int value) {
         bitField0_ |= 0x00000002;
         rawSize_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int32 raw_size = 2;</code>
+       *
+       * <pre>
+       * When compressed, the uncompressed size
+       * </pre>
+       */
       public Builder clearRawSize() {
         bitField0_ = (bitField0_ & ~0x00000002);
         rawSize_ = 0;
         
         return this;
       }
-      
-      // optional bytes zlib_data = 3;
+
       private com.google.protobuf.ByteString zlibData_ = com.google.protobuf.ByteString.EMPTY;
+      /**
+       * <code>optional bytes zlib_data = 3;</code>
+       *
+       * <pre>
+       * Possible compressed versions of the data.
+       * </pre>
+       */
       public boolean hasZlibData() {
         return ((bitField0_ & 0x00000004) == 0x00000004);
       }
+      /**
+       * <code>optional bytes zlib_data = 3;</code>
+       *
+       * <pre>
+       * Possible compressed versions of the data.
+       * </pre>
+       */
       public com.google.protobuf.ByteString getZlibData() {
         return zlibData_;
       }
+      /**
+       * <code>optional bytes zlib_data = 3;</code>
+       *
+       * <pre>
+       * Possible compressed versions of the data.
+       * </pre>
+       */
       public Builder setZlibData(com.google.protobuf.ByteString value) {
         if (value == null) {
     throw new NullPointerException();
@@ -465,21 +717,48 @@ public final class Fileformat {
         
         return this;
       }
+      /**
+       * <code>optional bytes zlib_data = 3;</code>
+       *
+       * <pre>
+       * Possible compressed versions of the data.
+       * </pre>
+       */
       public Builder clearZlibData() {
         bitField0_ = (bitField0_ & ~0x00000004);
         zlibData_ = getDefaultInstance().getZlibData();
         
         return this;
       }
-      
-      // optional bytes lzma_data = 4;
+
       private com.google.protobuf.ByteString lzmaData_ = com.google.protobuf.ByteString.EMPTY;
+      /**
+       * <code>optional bytes lzma_data = 4;</code>
+       *
+       * <pre>
+       * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+       * </pre>
+       */
       public boolean hasLzmaData() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
+      /**
+       * <code>optional bytes lzma_data = 4;</code>
+       *
+       * <pre>
+       * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+       * </pre>
+       */
       public com.google.protobuf.ByteString getLzmaData() {
         return lzmaData_;
       }
+      /**
+       * <code>optional bytes lzma_data = 4;</code>
+       *
+       * <pre>
+       * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+       * </pre>
+       */
       public Builder setLzmaData(com.google.protobuf.ByteString value) {
         if (value == null) {
     throw new NullPointerException();
@@ -489,21 +768,48 @@ public final class Fileformat {
         
         return this;
       }
+      /**
+       * <code>optional bytes lzma_data = 4;</code>
+       *
+       * <pre>
+       * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+       * </pre>
+       */
       public Builder clearLzmaData() {
         bitField0_ = (bitField0_ & ~0x00000008);
         lzmaData_ = getDefaultInstance().getLzmaData();
         
         return this;
       }
-      
-      // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
+
       private com.google.protobuf.ByteString oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY;
+      /**
+       * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+       *
+       * <pre>
+       * Formerly used for bzip2 compressed data. Depreciated in 2010.
+       * </pre>
+       */
       @java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() {
         return ((bitField0_ & 0x00000010) == 0x00000010);
       }
+      /**
+       * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+       *
+       * <pre>
+       * Formerly used for bzip2 compressed data. Depreciated in 2010.
+       * </pre>
+       */
       @java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() {
         return oBSOLETEBzip2Data_;
       }
+      /**
+       * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+       *
+       * <pre>
+       * Formerly used for bzip2 compressed data. Depreciated in 2010.
+       * </pre>
+       */
       @java.lang.Deprecated public Builder setOBSOLETEBzip2Data(com.google.protobuf.ByteString value) {
         if (value == null) {
     throw new NullPointerException();
@@ -513,110 +819,239 @@ public final class Fileformat {
         
         return this;
       }
+      /**
+       * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+       *
+       * <pre>
+       * Formerly used for bzip2 compressed data. Depreciated in 2010.
+       * </pre>
+       */
       @java.lang.Deprecated public Builder clearOBSOLETEBzip2Data() {
         bitField0_ = (bitField0_ & ~0x00000010);
         oBSOLETEBzip2Data_ = getDefaultInstance().getOBSOLETEBzip2Data();
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.Blob)
     }
-    
+
     static {
       defaultInstance = new Blob(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.Blob)
   }
-  
-  public interface BlobHeaderOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // required string type = 1;
+
+  public interface BlobHeaderOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.BlobHeader)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>required string type = 1;</code>
+     */
     boolean hasType();
-    String getType();
-    
-    // optional bytes indexdata = 2;
+    /**
+     * <code>required string type = 1;</code>
+     */
+    java.lang.String getType();
+    /**
+     * <code>required string type = 1;</code>
+     */
+    com.google.protobuf.ByteString
+        getTypeBytes();
+
+    /**
+     * <code>optional bytes indexdata = 2;</code>
+     */
     boolean hasIndexdata();
+    /**
+     * <code>optional bytes indexdata = 2;</code>
+     */
     com.google.protobuf.ByteString getIndexdata();
-    
-    // required int32 datasize = 3;
+
+    /**
+     * <code>required int32 datasize = 3;</code>
+     */
     boolean hasDatasize();
+    /**
+     * <code>required int32 datasize = 3;</code>
+     */
     int getDatasize();
   }
+  /**
+   * Protobuf type {@code OSMPBF.BlobHeader}
+   */
   public static final class BlobHeader extends
-      com.google.protobuf.GeneratedMessageLite
-      implements BlobHeaderOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.BlobHeader)
+      BlobHeaderOrBuilder {
     // Use BlobHeader.newBuilder() to construct.
-    private BlobHeader(Builder builder) {
+    private BlobHeader(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private BlobHeader(boolean noInit) {}
-    
+    private BlobHeader(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final BlobHeader defaultInstance;
     public static BlobHeader getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public BlobHeader getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private BlobHeader(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              bitField0_ |= 0x00000001;
+              type_ = bs;
+              break;
+            }
+            case 18: {
+              bitField0_ |= 0x00000002;
+              indexdata_ = input.readBytes();
+              break;
+            }
+            case 24: {
+              bitField0_ |= 0x00000004;
+              datasize_ = input.readInt32();
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<BlobHeader> PARSER =
+        new com.google.protobuf.AbstractParser<BlobHeader>() {
+      public BlobHeader parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new BlobHeader(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<BlobHeader> getParserForType() {
+      return PARSER;
+    }
+
     private int bitField0_;
-    // required string type = 1;
     public static final int TYPE_FIELD_NUMBER = 1;
     private java.lang.Object type_;
+    /**
+     * <code>required string type = 1;</code>
+     */
     public boolean hasType() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
-    public String getType() {
+    /**
+     * <code>required string type = 1;</code>
+     */
+    public java.lang.String getType() {
       java.lang.Object ref = type_;
-      if (ref instanceof String) {
-        return (String) ref;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
           type_ = s;
         }
         return s;
       }
     }
-    private com.google.protobuf.ByteString getTypeBytes() {
+    /**
+     * <code>required string type = 1;</code>
+     */
+    public com.google.protobuf.ByteString
+        getTypeBytes() {
       java.lang.Object ref = type_;
-      if (ref instanceof String) {
+      if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         type_ = b;
         return b;
       } else {
         return (com.google.protobuf.ByteString) ref;
       }
     }
-    
-    // optional bytes indexdata = 2;
+
     public static final int INDEXDATA_FIELD_NUMBER = 2;
     private com.google.protobuf.ByteString indexdata_;
+    /**
+     * <code>optional bytes indexdata = 2;</code>
+     */
     public boolean hasIndexdata() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>optional bytes indexdata = 2;</code>
+     */
     public com.google.protobuf.ByteString getIndexdata() {
       return indexdata_;
     }
-    
-    // required int32 datasize = 3;
+
     public static final int DATASIZE_FIELD_NUMBER = 3;
     private int datasize_;
+    /**
+     * <code>required int32 datasize = 3;</code>
+     */
     public boolean hasDatasize() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
+    /**
+     * <code>required int32 datasize = 3;</code>
+     */
     public int getDatasize() {
       return datasize_;
     }
-    
+
     private void initFields() {
       type_ = "";
       indexdata_ = com.google.protobuf.ByteString.EMPTY;
@@ -625,8 +1060,9 @@ public final class Fileformat {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (!hasType()) {
         memoizedIsInitialized = 0;
         return false;
@@ -638,7 +1074,7 @@ public final class Fileformat {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -651,13 +1087,14 @@ public final class Fileformat {
       if (((bitField0_ & 0x00000004) == 0x00000004)) {
         output.writeInt32(3, datasize_);
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
@@ -671,106 +1108,98 @@ public final class Fileformat {
         size += com.google.protobuf.CodedOutputStream
           .computeInt32Size(3, datasize_);
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.BlobHeader}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeaderOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.BlobHeader)
+        org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeaderOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         type_ = "";
@@ -781,15 +1210,15 @@ public final class Fileformat {
         bitField0_ = (bitField0_ & ~0x00000004);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader build() {
         org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader result = buildPartial();
         if (!result.isInitialized()) {
@@ -797,17 +1226,7 @@ public final class Fileformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader result = new org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader(this);
         int from_bitField0_ = bitField0_;
@@ -827,11 +1246,13 @@ public final class Fileformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader.getDefaultInstance()) return this;
         if (other.hasType()) {
-          setType(other.getType());
+          bitField0_ |= 0x00000001;
+          type_ = other.type_;
+          
         }
         if (other.hasIndexdata()) {
           setIndexdata(other.getIndexdata());
@@ -839,9 +1260,11 @@ public final class Fileformat {
         if (other.hasDatasize()) {
           setDatasize(other.getDatasize());
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (!hasType()) {
           
@@ -853,61 +1276,71 @@ public final class Fileformat {
         }
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 10: {
-              bitField0_ |= 0x00000001;
-              type_ = input.readBytes();
-              break;
-            }
-            case 18: {
-              bitField0_ |= 0x00000002;
-              indexdata_ = input.readBytes();
-              break;
-            }
-            case 24: {
-              bitField0_ |= 0x00000004;
-              datasize_ = input.readInt32();
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Fileformat.BlobHeader) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // required string type = 1;
+
       private java.lang.Object type_ = "";
+      /**
+       * <code>required string type = 1;</code>
+       */
       public boolean hasType() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
-      public String getType() {
+      /**
+       * <code>required string type = 1;</code>
+       */
+      public java.lang.String getType() {
         java.lang.Object ref = type_;
-        if (!(ref instanceof String)) {
-          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
-          type_ = s;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            type_ = s;
+          }
           return s;
         } else {
-          return (String) ref;
+          return (java.lang.String) ref;
         }
       }
-      public Builder setType(String value) {
+      /**
+       * <code>required string type = 1;</code>
+       */
+      public com.google.protobuf.ByteString
+          getTypeBytes() {
+        java.lang.Object ref = type_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          type_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>required string type = 1;</code>
+       */
+      public Builder setType(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -916,26 +1349,45 @@ public final class Fileformat {
         
         return this;
       }
+      /**
+       * <code>required string type = 1;</code>
+       */
       public Builder clearType() {
         bitField0_ = (bitField0_ & ~0x00000001);
         type_ = getDefaultInstance().getType();
         
         return this;
       }
-      void setType(com.google.protobuf.ByteString value) {
-        bitField0_ |= 0x00000001;
+      /**
+       * <code>required string type = 1;</code>
+       */
+      public Builder setTypeBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
         type_ = value;
         
+        return this;
       }
-      
-      // optional bytes indexdata = 2;
+
       private com.google.protobuf.ByteString indexdata_ = com.google.protobuf.ByteString.EMPTY;
+      /**
+       * <code>optional bytes indexdata = 2;</code>
+       */
       public boolean hasIndexdata() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
+      /**
+       * <code>optional bytes indexdata = 2;</code>
+       */
       public com.google.protobuf.ByteString getIndexdata() {
         return indexdata_;
       }
+      /**
+       * <code>optional bytes indexdata = 2;</code>
+       */
       public Builder setIndexdata(com.google.protobuf.ByteString value) {
         if (value == null) {
     throw new NullPointerException();
@@ -945,48 +1397,62 @@ public final class Fileformat {
         
         return this;
       }
+      /**
+       * <code>optional bytes indexdata = 2;</code>
+       */
       public Builder clearIndexdata() {
         bitField0_ = (bitField0_ & ~0x00000002);
         indexdata_ = getDefaultInstance().getIndexdata();
         
         return this;
       }
-      
-      // required int32 datasize = 3;
+
       private int datasize_ ;
+      /**
+       * <code>required int32 datasize = 3;</code>
+       */
       public boolean hasDatasize() {
         return ((bitField0_ & 0x00000004) == 0x00000004);
       }
+      /**
+       * <code>required int32 datasize = 3;</code>
+       */
       public int getDatasize() {
         return datasize_;
       }
+      /**
+       * <code>required int32 datasize = 3;</code>
+       */
       public Builder setDatasize(int value) {
         bitField0_ |= 0x00000004;
         datasize_ = value;
         
         return this;
       }
+      /**
+       * <code>required int32 datasize = 3;</code>
+       */
       public Builder clearDatasize() {
         bitField0_ = (bitField0_ & ~0x00000004);
         datasize_ = 0;
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.BlobHeader)
     }
-    
+
     static {
       defaultInstance = new BlobHeader(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.BlobHeader)
   }
-  
-  
+
+
   static {
   }
-  
+
   // @@protoc_insertion_point(outer_class_scope)
 }
diff --git a/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java b/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java
index 2e461de..1e09a06 100644
--- a/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java
+++ b/osmosis-osm-binary/gen-src/main/java/org/openstreetmap/osmosis/osmbinary/Osmformat.java
@@ -8,216 +8,615 @@ public final class Osmformat {
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistryLite registry) {
   }
-  public interface HeaderBlockOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // optional .OSMPBF.HeaderBBox bbox = 1;
+  public interface HeaderBlockOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.HeaderBlock)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+     */
     boolean hasBbox();
+    /**
+     * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getBbox();
-    
-    // repeated string required_features = 4;
-    java.util.List<String> getRequiredFeaturesList();
+
+    /**
+     * <code>repeated string required_features = 4;</code>
+     *
+     * <pre>
+     * Additional tags to aid in parsing this dataset 
+     * </pre>
+     */
+    com.google.protobuf.ProtocolStringList
+        getRequiredFeaturesList();
+    /**
+     * <code>repeated string required_features = 4;</code>
+     *
+     * <pre>
+     * Additional tags to aid in parsing this dataset 
+     * </pre>
+     */
     int getRequiredFeaturesCount();
-    String getRequiredFeatures(int index);
-    
-    // repeated string optional_features = 5;
-    java.util.List<String> getOptionalFeaturesList();
+    /**
+     * <code>repeated string required_features = 4;</code>
+     *
+     * <pre>
+     * Additional tags to aid in parsing this dataset 
+     * </pre>
+     */
+    java.lang.String getRequiredFeatures(int index);
+    /**
+     * <code>repeated string required_features = 4;</code>
+     *
+     * <pre>
+     * Additional tags to aid in parsing this dataset 
+     * </pre>
+     */
+    com.google.protobuf.ByteString
+        getRequiredFeaturesBytes(int index);
+
+    /**
+     * <code>repeated string optional_features = 5;</code>
+     */
+    com.google.protobuf.ProtocolStringList
+        getOptionalFeaturesList();
+    /**
+     * <code>repeated string optional_features = 5;</code>
+     */
     int getOptionalFeaturesCount();
-    String getOptionalFeatures(int index);
-    
-    // optional string writingprogram = 16;
+    /**
+     * <code>repeated string optional_features = 5;</code>
+     */
+    java.lang.String getOptionalFeatures(int index);
+    /**
+     * <code>repeated string optional_features = 5;</code>
+     */
+    com.google.protobuf.ByteString
+        getOptionalFeaturesBytes(int index);
+
+    /**
+     * <code>optional string writingprogram = 16;</code>
+     */
     boolean hasWritingprogram();
-    String getWritingprogram();
-    
-    // optional string source = 17;
+    /**
+     * <code>optional string writingprogram = 16;</code>
+     */
+    java.lang.String getWritingprogram();
+    /**
+     * <code>optional string writingprogram = 16;</code>
+     */
+    com.google.protobuf.ByteString
+        getWritingprogramBytes();
+
+    /**
+     * <code>optional string source = 17;</code>
+     *
+     * <pre>
+     * From the bbox field.
+     * </pre>
+     */
     boolean hasSource();
-    String getSource();
-    
-    // optional int64 osmosis_replication_timestamp = 32;
+    /**
+     * <code>optional string source = 17;</code>
+     *
+     * <pre>
+     * From the bbox field.
+     * </pre>
+     */
+    java.lang.String getSource();
+    /**
+     * <code>optional string source = 17;</code>
+     *
+     * <pre>
+     * From the bbox field.
+     * </pre>
+     */
+    com.google.protobuf.ByteString
+        getSourceBytes();
+
+    /**
+     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
+     *
+     * <pre>
+     * replication timestamp, expressed in seconds since the epoch, 
+     * otherwise the same value as in the "timestamp=..." field
+     * in the state.txt file used by Osmosis
+     * </pre>
+     */
     boolean hasOsmosisReplicationTimestamp();
+    /**
+     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
+     *
+     * <pre>
+     * replication timestamp, expressed in seconds since the epoch, 
+     * otherwise the same value as in the "timestamp=..." field
+     * in the state.txt file used by Osmosis
+     * </pre>
+     */
     long getOsmosisReplicationTimestamp();
-    
-    // optional int64 osmosis_replication_sequence_number = 33;
+
+    /**
+     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+     *
+     * <pre>
+     * replication sequence number (sequenceNumber in state.txt)
+     * </pre>
+     */
     boolean hasOsmosisReplicationSequenceNumber();
+    /**
+     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+     *
+     * <pre>
+     * replication sequence number (sequenceNumber in state.txt)
+     * </pre>
+     */
     long getOsmosisReplicationSequenceNumber();
-    
-    // optional string osmosis_replication_base_url = 34;
+
+    /**
+     * <code>optional string osmosis_replication_base_url = 34;</code>
+     *
+     * <pre>
+     * replication base URL (from Osmosis' configuration.txt file)
+     * </pre>
+     */
     boolean hasOsmosisReplicationBaseUrl();
-    String getOsmosisReplicationBaseUrl();
+    /**
+     * <code>optional string osmosis_replication_base_url = 34;</code>
+     *
+     * <pre>
+     * replication base URL (from Osmosis' configuration.txt file)
+     * </pre>
+     */
+    java.lang.String getOsmosisReplicationBaseUrl();
+    /**
+     * <code>optional string osmosis_replication_base_url = 34;</code>
+     *
+     * <pre>
+     * replication base URL (from Osmosis' configuration.txt file)
+     * </pre>
+     */
+    com.google.protobuf.ByteString
+        getOsmosisReplicationBaseUrlBytes();
   }
+  /**
+   * Protobuf type {@code OSMPBF.HeaderBlock}
+   */
   public static final class HeaderBlock extends
-      com.google.protobuf.GeneratedMessageLite
-      implements HeaderBlockOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBlock)
+      HeaderBlockOrBuilder {
     // Use HeaderBlock.newBuilder() to construct.
-    private HeaderBlock(Builder builder) {
+    private HeaderBlock(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private HeaderBlock(boolean noInit) {}
-    
+    private HeaderBlock(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final HeaderBlock defaultInstance;
     public static HeaderBlock getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public HeaderBlock getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private HeaderBlock(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000001) == 0x00000001)) {
+                subBuilder = bbox_.toBuilder();
+              }
+              bbox_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(bbox_);
+                bbox_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000001;
+              break;
+            }
+            case 34: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+                requiredFeatures_ = new com.google.protobuf.LazyStringArrayList();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              requiredFeatures_.add(bs);
+              break;
+            }
+            case 42: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+                optionalFeatures_ = new com.google.protobuf.LazyStringArrayList();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              optionalFeatures_.add(bs);
+              break;
+            }
+            case 130: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              bitField0_ |= 0x00000002;
+              writingprogram_ = bs;
+              break;
+            }
+            case 138: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              bitField0_ |= 0x00000004;
+              source_ = bs;
+              break;
+            }
+            case 256: {
+              bitField0_ |= 0x00000008;
+              osmosisReplicationTimestamp_ = input.readInt64();
+              break;
+            }
+            case 264: {
+              bitField0_ |= 0x00000010;
+              osmosisReplicationSequenceNumber_ = input.readInt64();
+              break;
+            }
+            case 274: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              bitField0_ |= 0x00000020;
+              osmosisReplicationBaseUrl_ = bs;
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+          requiredFeatures_ = requiredFeatures_.getUnmodifiableView();
+        }
+        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+          optionalFeatures_ = optionalFeatures_.getUnmodifiableView();
+        }
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<HeaderBlock> PARSER =
+        new com.google.protobuf.AbstractParser<HeaderBlock>() {
+      public HeaderBlock parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new HeaderBlock(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<HeaderBlock> getParserForType() {
+      return PARSER;
+    }
+
     private int bitField0_;
-    // optional .OSMPBF.HeaderBBox bbox = 1;
     public static final int BBOX_FIELD_NUMBER = 1;
     private org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox bbox_;
+    /**
+     * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+     */
     public boolean hasBbox() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getBbox() {
       return bbox_;
     }
-    
-    // repeated string required_features = 4;
+
     public static final int REQUIRED_FEATURES_FIELD_NUMBER = 4;
     private com.google.protobuf.LazyStringList requiredFeatures_;
-    public java.util.List<String>
+    /**
+     * <code>repeated string required_features = 4;</code>
+     *
+     * <pre>
+     * Additional tags to aid in parsing this dataset 
+     * </pre>
+     */
+    public com.google.protobuf.ProtocolStringList
         getRequiredFeaturesList() {
       return requiredFeatures_;
     }
+    /**
+     * <code>repeated string required_features = 4;</code>
+     *
+     * <pre>
+     * Additional tags to aid in parsing this dataset 
+     * </pre>
+     */
     public int getRequiredFeaturesCount() {
       return requiredFeatures_.size();
     }
-    public String getRequiredFeatures(int index) {
+    /**
+     * <code>repeated string required_features = 4;</code>
+     *
+     * <pre>
+     * Additional tags to aid in parsing this dataset 
+     * </pre>
+     */
+    public java.lang.String getRequiredFeatures(int index) {
       return requiredFeatures_.get(index);
     }
-    
-    // repeated string optional_features = 5;
+    /**
+     * <code>repeated string required_features = 4;</code>
+     *
+     * <pre>
+     * Additional tags to aid in parsing this dataset 
+     * </pre>
+     */
+    public com.google.protobuf.ByteString
+        getRequiredFeaturesBytes(int index) {
+      return requiredFeatures_.getByteString(index);
+    }
+
     public static final int OPTIONAL_FEATURES_FIELD_NUMBER = 5;
     private com.google.protobuf.LazyStringList optionalFeatures_;
-    public java.util.List<String>
+    /**
+     * <code>repeated string optional_features = 5;</code>
+     */
+    public com.google.protobuf.ProtocolStringList
         getOptionalFeaturesList() {
       return optionalFeatures_;
     }
+    /**
+     * <code>repeated string optional_features = 5;</code>
+     */
     public int getOptionalFeaturesCount() {
       return optionalFeatures_.size();
     }
-    public String getOptionalFeatures(int index) {
+    /**
+     * <code>repeated string optional_features = 5;</code>
+     */
+    public java.lang.String getOptionalFeatures(int index) {
       return optionalFeatures_.get(index);
     }
-    
-    // optional string writingprogram = 16;
+    /**
+     * <code>repeated string optional_features = 5;</code>
+     */
+    public com.google.protobuf.ByteString
+        getOptionalFeaturesBytes(int index) {
+      return optionalFeatures_.getByteString(index);
+    }
+
     public static final int WRITINGPROGRAM_FIELD_NUMBER = 16;
     private java.lang.Object writingprogram_;
+    /**
+     * <code>optional string writingprogram = 16;</code>
+     */
     public boolean hasWritingprogram() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
-    public String getWritingprogram() {
+    /**
+     * <code>optional string writingprogram = 16;</code>
+     */
+    public java.lang.String getWritingprogram() {
       java.lang.Object ref = writingprogram_;
-      if (ref instanceof String) {
-        return (String) ref;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
           writingprogram_ = s;
         }
         return s;
       }
     }
-    private com.google.protobuf.ByteString getWritingprogramBytes() {
+    /**
+     * <code>optional string writingprogram = 16;</code>
+     */
+    public com.google.protobuf.ByteString
+        getWritingprogramBytes() {
       java.lang.Object ref = writingprogram_;
-      if (ref instanceof String) {
+      if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         writingprogram_ = b;
         return b;
       } else {
         return (com.google.protobuf.ByteString) ref;
       }
     }
-    
-    // optional string source = 17;
+
     public static final int SOURCE_FIELD_NUMBER = 17;
     private java.lang.Object source_;
+    /**
+     * <code>optional string source = 17;</code>
+     *
+     * <pre>
+     * From the bbox field.
+     * </pre>
+     */
     public boolean hasSource() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
-    public String getSource() {
+    /**
+     * <code>optional string source = 17;</code>
+     *
+     * <pre>
+     * From the bbox field.
+     * </pre>
+     */
+    public java.lang.String getSource() {
       java.lang.Object ref = source_;
-      if (ref instanceof String) {
-        return (String) ref;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
           source_ = s;
         }
         return s;
       }
     }
-    private com.google.protobuf.ByteString getSourceBytes() {
+    /**
+     * <code>optional string source = 17;</code>
+     *
+     * <pre>
+     * From the bbox field.
+     * </pre>
+     */
+    public com.google.protobuf.ByteString
+        getSourceBytes() {
       java.lang.Object ref = source_;
-      if (ref instanceof String) {
+      if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         source_ = b;
         return b;
       } else {
         return (com.google.protobuf.ByteString) ref;
       }
     }
-    
-    // optional int64 osmosis_replication_timestamp = 32;
+
     public static final int OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER = 32;
     private long osmosisReplicationTimestamp_;
+    /**
+     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
+     *
+     * <pre>
+     * replication timestamp, expressed in seconds since the epoch, 
+     * otherwise the same value as in the "timestamp=..." field
+     * in the state.txt file used by Osmosis
+     * </pre>
+     */
     public boolean hasOsmosisReplicationTimestamp() {
       return ((bitField0_ & 0x00000008) == 0x00000008);
     }
+    /**
+     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
+     *
+     * <pre>
+     * replication timestamp, expressed in seconds since the epoch, 
+     * otherwise the same value as in the "timestamp=..." field
+     * in the state.txt file used by Osmosis
+     * </pre>
+     */
     public long getOsmosisReplicationTimestamp() {
       return osmosisReplicationTimestamp_;
     }
-    
-    // optional int64 osmosis_replication_sequence_number = 33;
+
     public static final int OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER = 33;
     private long osmosisReplicationSequenceNumber_;
+    /**
+     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+     *
+     * <pre>
+     * replication sequence number (sequenceNumber in state.txt)
+     * </pre>
+     */
     public boolean hasOsmosisReplicationSequenceNumber() {
       return ((bitField0_ & 0x00000010) == 0x00000010);
     }
+    /**
+     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+     *
+     * <pre>
+     * replication sequence number (sequenceNumber in state.txt)
+     * </pre>
+     */
     public long getOsmosisReplicationSequenceNumber() {
       return osmosisReplicationSequenceNumber_;
     }
-    
-    // optional string osmosis_replication_base_url = 34;
+
     public static final int OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER = 34;
     private java.lang.Object osmosisReplicationBaseUrl_;
+    /**
+     * <code>optional string osmosis_replication_base_url = 34;</code>
+     *
+     * <pre>
+     * replication base URL (from Osmosis' configuration.txt file)
+     * </pre>
+     */
     public boolean hasOsmosisReplicationBaseUrl() {
       return ((bitField0_ & 0x00000020) == 0x00000020);
     }
-    public String getOsmosisReplicationBaseUrl() {
+    /**
+     * <code>optional string osmosis_replication_base_url = 34;</code>
+     *
+     * <pre>
+     * replication base URL (from Osmosis' configuration.txt file)
+     * </pre>
+     */
+    public java.lang.String getOsmosisReplicationBaseUrl() {
       java.lang.Object ref = osmosisReplicationBaseUrl_;
-      if (ref instanceof String) {
-        return (String) ref;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
       } else {
         com.google.protobuf.ByteString bs = 
             (com.google.protobuf.ByteString) ref;
-        String s = bs.toStringUtf8();
-        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
           osmosisReplicationBaseUrl_ = s;
         }
         return s;
       }
     }
-    private com.google.protobuf.ByteString getOsmosisReplicationBaseUrlBytes() {
+    /**
+     * <code>optional string osmosis_replication_base_url = 34;</code>
+     *
+     * <pre>
+     * replication base URL (from Osmosis' configuration.txt file)
+     * </pre>
+     */
+    public com.google.protobuf.ByteString
+        getOsmosisReplicationBaseUrlBytes() {
       java.lang.Object ref = osmosisReplicationBaseUrl_;
-      if (ref instanceof String) {
+      if (ref instanceof java.lang.String) {
         com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
         osmosisReplicationBaseUrl_ = b;
         return b;
       } else {
         return (com.google.protobuf.ByteString) ref;
       }
     }
-    
+
     private void initFields() {
       bbox_ = org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance();
       requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
@@ -231,8 +630,9 @@ public final class Osmformat {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (hasBbox()) {
         if (!getBbox().isInitialized()) {
           memoizedIsInitialized = 0;
@@ -242,7 +642,7 @@ public final class Osmformat {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -270,13 +670,14 @@ public final class Osmformat {
       if (((bitField0_ & 0x00000020) == 0x00000020)) {
         output.writeBytes(34, getOsmosisReplicationBaseUrlBytes());
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
@@ -320,106 +721,98 @@ public final class Osmformat {
         size += com.google.protobuf.CodedOutputStream
           .computeBytesSize(34, getOsmosisReplicationBaseUrlBytes());
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.HeaderBlock}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlockOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBlock)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlockOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         bbox_ = org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance();
@@ -440,15 +833,15 @@ public final class Osmformat {
         bitField0_ = (bitField0_ & ~0x00000080);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock result = buildPartial();
         if (!result.isInitialized()) {
@@ -456,17 +849,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock result = new org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock(this);
         int from_bitField0_ = bitField0_;
@@ -476,14 +859,12 @@ public final class Osmformat {
         }
         result.bbox_ = bbox_;
         if (((bitField0_ & 0x00000002) == 0x00000002)) {
-          requiredFeatures_ = new com.google.protobuf.UnmodifiableLazyStringList(
-              requiredFeatures_);
+          requiredFeatures_ = requiredFeatures_.getUnmodifiableView();
           bitField0_ = (bitField0_ & ~0x00000002);
         }
         result.requiredFeatures_ = requiredFeatures_;
         if (((bitField0_ & 0x00000004) == 0x00000004)) {
-          optionalFeatures_ = new com.google.protobuf.UnmodifiableLazyStringList(
-              optionalFeatures_);
+          optionalFeatures_ = optionalFeatures_.getUnmodifiableView();
           bitField0_ = (bitField0_ & ~0x00000004);
         }
         result.optionalFeatures_ = optionalFeatures_;
@@ -510,7 +891,7 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock.getDefaultInstance()) return this;
         if (other.hasBbox()) {
@@ -537,10 +918,14 @@ public final class Osmformat {
           
         }
         if (other.hasWritingprogram()) {
-          setWritingprogram(other.getWritingprogram());
+          bitField0_ |= 0x00000008;
+          writingprogram_ = other.writingprogram_;
+          
         }
         if (other.hasSource()) {
-          setSource(other.getSource());
+          bitField0_ |= 0x00000010;
+          source_ = other.source_;
+          
         }
         if (other.hasOsmosisReplicationTimestamp()) {
           setOsmosisReplicationTimestamp(other.getOsmosisReplicationTimestamp());
@@ -549,11 +934,15 @@ public final class Osmformat {
           setOsmosisReplicationSequenceNumber(other.getOsmosisReplicationSequenceNumber());
         }
         if (other.hasOsmosisReplicationBaseUrl()) {
-          setOsmosisReplicationBaseUrl(other.getOsmosisReplicationBaseUrl());
+          bitField0_ |= 0x00000080;
+          osmosisReplicationBaseUrl_ = other.osmosisReplicationBaseUrl_;
+          
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (hasBbox()) {
           if (!getBbox().isInitialized()) {
@@ -563,98 +952,64 @@ public final class Osmformat {
         }
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 10: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.newBuilder();
-              if (hasBbox()) {
-                subBuilder.mergeFrom(getBbox());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setBbox(subBuilder.buildPartial());
-              break;
-            }
-            case 34: {
-              ensureRequiredFeaturesIsMutable();
-              requiredFeatures_.add(input.readBytes());
-              break;
-            }
-            case 42: {
-              ensureOptionalFeaturesIsMutable();
-              optionalFeatures_.add(input.readBytes());
-              break;
-            }
-            case 130: {
-              bitField0_ |= 0x00000008;
-              writingprogram_ = input.readBytes();
-              break;
-            }
-            case 138: {
-              bitField0_ |= 0x00000010;
-              source_ = input.readBytes();
-              break;
-            }
-            case 256: {
-              bitField0_ |= 0x00000020;
-              osmosisReplicationTimestamp_ = input.readInt64();
-              break;
-            }
-            case 264: {
-              bitField0_ |= 0x00000040;
-              osmosisReplicationSequenceNumber_ = input.readInt64();
-              break;
-            }
-            case 274: {
-              bitField0_ |= 0x00000080;
-              osmosisReplicationBaseUrl_ = input.readBytes();
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBlock) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // optional .OSMPBF.HeaderBBox bbox = 1;
+
       private org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox bbox_ = org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance();
+      /**
+       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+       */
       public boolean hasBbox() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getBbox() {
         return bbox_;
       }
+      /**
+       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+       */
       public Builder setBbox(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox value) {
         if (value == null) {
           throw new NullPointerException();
         }
         bbox_ = value;
-        
+
         bitField0_ |= 0x00000001;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+       */
       public Builder setBbox(
           org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.Builder builderForValue) {
         bbox_ = builderForValue.build();
-        
+
         bitField0_ |= 0x00000001;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+       */
       public Builder mergeBbox(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox value) {
         if (((bitField0_ & 0x00000001) == 0x00000001) &&
             bbox_ != org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance()) {
@@ -663,18 +1018,20 @@ public final class Osmformat {
         } else {
           bbox_ = value;
         }
-        
+
         bitField0_ |= 0x00000001;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
+       */
       public Builder clearBbox() {
         bbox_ = org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance();
-        
+
         bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
-      
-      // repeated string required_features = 4;
+
       private com.google.protobuf.LazyStringList requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
       private void ensureRequiredFeaturesIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
@@ -682,18 +1039,57 @@ public final class Osmformat {
           bitField0_ |= 0x00000002;
          }
       }
-      public java.util.List<String>
+      /**
+       * <code>repeated string required_features = 4;</code>
+       *
+       * <pre>
+       * Additional tags to aid in parsing this dataset 
+       * </pre>
+       */
+      public com.google.protobuf.ProtocolStringList
           getRequiredFeaturesList() {
-        return java.util.Collections.unmodifiableList(requiredFeatures_);
-      }
+        return requiredFeatures_.getUnmodifiableView();
+      }
+      /**
+       * <code>repeated string required_features = 4;</code>
+       *
+       * <pre>
+       * Additional tags to aid in parsing this dataset 
+       * </pre>
+       */
       public int getRequiredFeaturesCount() {
         return requiredFeatures_.size();
       }
-      public String getRequiredFeatures(int index) {
+      /**
+       * <code>repeated string required_features = 4;</code>
+       *
+       * <pre>
+       * Additional tags to aid in parsing this dataset 
+       * </pre>
+       */
+      public java.lang.String getRequiredFeatures(int index) {
         return requiredFeatures_.get(index);
       }
+      /**
+       * <code>repeated string required_features = 4;</code>
+       *
+       * <pre>
+       * Additional tags to aid in parsing this dataset 
+       * </pre>
+       */
+      public com.google.protobuf.ByteString
+          getRequiredFeaturesBytes(int index) {
+        return requiredFeatures_.getByteString(index);
+      }
+      /**
+       * <code>repeated string required_features = 4;</code>
+       *
+       * <pre>
+       * Additional tags to aid in parsing this dataset 
+       * </pre>
+       */
       public Builder setRequiredFeatures(
-          int index, String value) {
+          int index, java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -702,7 +1098,15 @@ public final class Osmformat {
         
         return this;
       }
-      public Builder addRequiredFeatures(String value) {
+      /**
+       * <code>repeated string required_features = 4;</code>
+       *
+       * <pre>
+       * Additional tags to aid in parsing this dataset 
+       * </pre>
+       */
+      public Builder addRequiredFeatures(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -711,26 +1115,52 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated string required_features = 4;</code>
+       *
+       * <pre>
+       * Additional tags to aid in parsing this dataset 
+       * </pre>
+       */
       public Builder addAllRequiredFeatures(
-          java.lang.Iterable<String> values) {
+          java.lang.Iterable<java.lang.String> values) {
         ensureRequiredFeaturesIsMutable();
-        super.addAll(values, requiredFeatures_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, requiredFeatures_);
         
         return this;
       }
+      /**
+       * <code>repeated string required_features = 4;</code>
+       *
+       * <pre>
+       * Additional tags to aid in parsing this dataset 
+       * </pre>
+       */
       public Builder clearRequiredFeatures() {
         requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
         bitField0_ = (bitField0_ & ~0x00000002);
         
         return this;
       }
-      void addRequiredFeatures(com.google.protobuf.ByteString value) {
-        ensureRequiredFeaturesIsMutable();
+      /**
+       * <code>repeated string required_features = 4;</code>
+       *
+       * <pre>
+       * Additional tags to aid in parsing this dataset 
+       * </pre>
+       */
+      public Builder addRequiredFeaturesBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  ensureRequiredFeaturesIsMutable();
         requiredFeatures_.add(value);
         
+        return this;
       }
-      
-      // repeated string optional_features = 5;
+
       private com.google.protobuf.LazyStringList optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
       private void ensureOptionalFeaturesIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
@@ -738,18 +1168,37 @@ public final class Osmformat {
           bitField0_ |= 0x00000004;
          }
       }
-      public java.util.List<String>
+      /**
+       * <code>repeated string optional_features = 5;</code>
+       */
+      public com.google.protobuf.ProtocolStringList
           getOptionalFeaturesList() {
-        return java.util.Collections.unmodifiableList(optionalFeatures_);
+        return optionalFeatures_.getUnmodifiableView();
       }
+      /**
+       * <code>repeated string optional_features = 5;</code>
+       */
       public int getOptionalFeaturesCount() {
         return optionalFeatures_.size();
       }
-      public String getOptionalFeatures(int index) {
+      /**
+       * <code>repeated string optional_features = 5;</code>
+       */
+      public java.lang.String getOptionalFeatures(int index) {
         return optionalFeatures_.get(index);
       }
+      /**
+       * <code>repeated string optional_features = 5;</code>
+       */
+      public com.google.protobuf.ByteString
+          getOptionalFeaturesBytes(int index) {
+        return optionalFeatures_.getByteString(index);
+      }
+      /**
+       * <code>repeated string optional_features = 5;</code>
+       */
       public Builder setOptionalFeatures(
-          int index, String value) {
+          int index, java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -758,7 +1207,11 @@ public final class Osmformat {
         
         return this;
       }
-      public Builder addOptionalFeatures(String value) {
+      /**
+       * <code>repeated string optional_features = 5;</code>
+       */
+      public Builder addOptionalFeatures(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -767,41 +1220,85 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated string optional_features = 5;</code>
+       */
       public Builder addAllOptionalFeatures(
-          java.lang.Iterable<String> values) {
+          java.lang.Iterable<java.lang.String> values) {
         ensureOptionalFeaturesIsMutable();
-        super.addAll(values, optionalFeatures_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, optionalFeatures_);
         
         return this;
       }
+      /**
+       * <code>repeated string optional_features = 5;</code>
+       */
       public Builder clearOptionalFeatures() {
         optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
         bitField0_ = (bitField0_ & ~0x00000004);
         
         return this;
       }
-      void addOptionalFeatures(com.google.protobuf.ByteString value) {
-        ensureOptionalFeaturesIsMutable();
+      /**
+       * <code>repeated string optional_features = 5;</code>
+       */
+      public Builder addOptionalFeaturesBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  ensureOptionalFeaturesIsMutable();
         optionalFeatures_.add(value);
         
+        return this;
       }
-      
-      // optional string writingprogram = 16;
+
       private java.lang.Object writingprogram_ = "";
+      /**
+       * <code>optional string writingprogram = 16;</code>
+       */
       public boolean hasWritingprogram() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
-      public String getWritingprogram() {
+      /**
+       * <code>optional string writingprogram = 16;</code>
+       */
+      public java.lang.String getWritingprogram() {
         java.lang.Object ref = writingprogram_;
-        if (!(ref instanceof String)) {
-          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
-          writingprogram_ = s;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            writingprogram_ = s;
+          }
           return s;
         } else {
-          return (String) ref;
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string writingprogram = 16;</code>
+       */
+      public com.google.protobuf.ByteString
+          getWritingprogramBytes() {
+        java.lang.Object ref = writingprogram_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          writingprogram_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
         }
       }
-      public Builder setWritingprogram(String value) {
+      /**
+       * <code>optional string writingprogram = 16;</code>
+       */
+      public Builder setWritingprogram(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -810,34 +1307,90 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>optional string writingprogram = 16;</code>
+       */
       public Builder clearWritingprogram() {
         bitField0_ = (bitField0_ & ~0x00000008);
         writingprogram_ = getDefaultInstance().getWritingprogram();
         
         return this;
       }
-      void setWritingprogram(com.google.protobuf.ByteString value) {
-        bitField0_ |= 0x00000008;
+      /**
+       * <code>optional string writingprogram = 16;</code>
+       */
+      public Builder setWritingprogramBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000008;
         writingprogram_ = value;
         
+        return this;
       }
-      
-      // optional string source = 17;
+
       private java.lang.Object source_ = "";
+      /**
+       * <code>optional string source = 17;</code>
+       *
+       * <pre>
+       * From the bbox field.
+       * </pre>
+       */
       public boolean hasSource() {
         return ((bitField0_ & 0x00000010) == 0x00000010);
       }
-      public String getSource() {
+      /**
+       * <code>optional string source = 17;</code>
+       *
+       * <pre>
+       * From the bbox field.
+       * </pre>
+       */
+      public java.lang.String getSource() {
         java.lang.Object ref = source_;
-        if (!(ref instanceof String)) {
-          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
-          source_ = s;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            source_ = s;
+          }
           return s;
         } else {
-          return (String) ref;
-        }
-      }
-      public Builder setSource(String value) {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string source = 17;</code>
+       *
+       * <pre>
+       * From the bbox field.
+       * </pre>
+       */
+      public com.google.protobuf.ByteString
+          getSourceBytes() {
+        java.lang.Object ref = source_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          source_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string source = 17;</code>
+       *
+       * <pre>
+       * From the bbox field.
+       * </pre>
+       */
+      public Builder setSource(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -846,76 +1399,202 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>optional string source = 17;</code>
+       *
+       * <pre>
+       * From the bbox field.
+       * </pre>
+       */
       public Builder clearSource() {
         bitField0_ = (bitField0_ & ~0x00000010);
         source_ = getDefaultInstance().getSource();
         
         return this;
       }
-      void setSource(com.google.protobuf.ByteString value) {
-        bitField0_ |= 0x00000010;
+      /**
+       * <code>optional string source = 17;</code>
+       *
+       * <pre>
+       * From the bbox field.
+       * </pre>
+       */
+      public Builder setSourceBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000010;
         source_ = value;
         
+        return this;
       }
-      
-      // optional int64 osmosis_replication_timestamp = 32;
+
       private long osmosisReplicationTimestamp_ ;
+      /**
+       * <code>optional int64 osmosis_replication_timestamp = 32;</code>
+       *
+       * <pre>
+       * replication timestamp, expressed in seconds since the epoch, 
+       * otherwise the same value as in the "timestamp=..." field
+       * in the state.txt file used by Osmosis
+       * </pre>
+       */
       public boolean hasOsmosisReplicationTimestamp() {
         return ((bitField0_ & 0x00000020) == 0x00000020);
       }
+      /**
+       * <code>optional int64 osmosis_replication_timestamp = 32;</code>
+       *
+       * <pre>
+       * replication timestamp, expressed in seconds since the epoch, 
+       * otherwise the same value as in the "timestamp=..." field
+       * in the state.txt file used by Osmosis
+       * </pre>
+       */
       public long getOsmosisReplicationTimestamp() {
         return osmosisReplicationTimestamp_;
       }
+      /**
+       * <code>optional int64 osmosis_replication_timestamp = 32;</code>
+       *
+       * <pre>
+       * replication timestamp, expressed in seconds since the epoch, 
+       * otherwise the same value as in the "timestamp=..." field
+       * in the state.txt file used by Osmosis
+       * </pre>
+       */
       public Builder setOsmosisReplicationTimestamp(long value) {
         bitField0_ |= 0x00000020;
         osmosisReplicationTimestamp_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int64 osmosis_replication_timestamp = 32;</code>
+       *
+       * <pre>
+       * replication timestamp, expressed in seconds since the epoch, 
+       * otherwise the same value as in the "timestamp=..." field
+       * in the state.txt file used by Osmosis
+       * </pre>
+       */
       public Builder clearOsmosisReplicationTimestamp() {
         bitField0_ = (bitField0_ & ~0x00000020);
         osmosisReplicationTimestamp_ = 0L;
         
         return this;
       }
-      
-      // optional int64 osmosis_replication_sequence_number = 33;
+
       private long osmosisReplicationSequenceNumber_ ;
+      /**
+       * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+       *
+       * <pre>
+       * replication sequence number (sequenceNumber in state.txt)
+       * </pre>
+       */
       public boolean hasOsmosisReplicationSequenceNumber() {
         return ((bitField0_ & 0x00000040) == 0x00000040);
       }
+      /**
+       * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+       *
+       * <pre>
+       * replication sequence number (sequenceNumber in state.txt)
+       * </pre>
+       */
       public long getOsmosisReplicationSequenceNumber() {
         return osmosisReplicationSequenceNumber_;
       }
+      /**
+       * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+       *
+       * <pre>
+       * replication sequence number (sequenceNumber in state.txt)
+       * </pre>
+       */
       public Builder setOsmosisReplicationSequenceNumber(long value) {
         bitField0_ |= 0x00000040;
         osmosisReplicationSequenceNumber_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+       *
+       * <pre>
+       * replication sequence number (sequenceNumber in state.txt)
+       * </pre>
+       */
       public Builder clearOsmosisReplicationSequenceNumber() {
         bitField0_ = (bitField0_ & ~0x00000040);
         osmosisReplicationSequenceNumber_ = 0L;
         
         return this;
       }
-      
-      // optional string osmosis_replication_base_url = 34;
+
       private java.lang.Object osmosisReplicationBaseUrl_ = "";
+      /**
+       * <code>optional string osmosis_replication_base_url = 34;</code>
+       *
+       * <pre>
+       * replication base URL (from Osmosis' configuration.txt file)
+       * </pre>
+       */
       public boolean hasOsmosisReplicationBaseUrl() {
         return ((bitField0_ & 0x00000080) == 0x00000080);
       }
-      public String getOsmosisReplicationBaseUrl() {
+      /**
+       * <code>optional string osmosis_replication_base_url = 34;</code>
+       *
+       * <pre>
+       * replication base URL (from Osmosis' configuration.txt file)
+       * </pre>
+       */
+      public java.lang.String getOsmosisReplicationBaseUrl() {
         java.lang.Object ref = osmosisReplicationBaseUrl_;
-        if (!(ref instanceof String)) {
-          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
-          osmosisReplicationBaseUrl_ = s;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            osmosisReplicationBaseUrl_ = s;
+          }
           return s;
         } else {
-          return (String) ref;
-        }
-      }
-      public Builder setOsmosisReplicationBaseUrl(String value) {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string osmosis_replication_base_url = 34;</code>
+       *
+       * <pre>
+       * replication base URL (from Osmosis' configuration.txt file)
+       * </pre>
+       */
+      public com.google.protobuf.ByteString
+          getOsmosisReplicationBaseUrlBytes() {
+        java.lang.Object ref = osmosisReplicationBaseUrl_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          osmosisReplicationBaseUrl_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string osmosis_replication_base_url = 34;</code>
+       *
+       * <pre>
+       * replication base URL (from Osmosis' configuration.txt file)
+       * </pre>
+       */
+      public Builder setOsmosisReplicationBaseUrl(
+          java.lang.String value) {
         if (value == null) {
     throw new NullPointerException();
   }
@@ -924,107 +1603,252 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>optional string osmosis_replication_base_url = 34;</code>
+       *
+       * <pre>
+       * replication base URL (from Osmosis' configuration.txt file)
+       * </pre>
+       */
       public Builder clearOsmosisReplicationBaseUrl() {
         bitField0_ = (bitField0_ & ~0x00000080);
         osmosisReplicationBaseUrl_ = getDefaultInstance().getOsmosisReplicationBaseUrl();
         
         return this;
       }
-      void setOsmosisReplicationBaseUrl(com.google.protobuf.ByteString value) {
-        bitField0_ |= 0x00000080;
+      /**
+       * <code>optional string osmosis_replication_base_url = 34;</code>
+       *
+       * <pre>
+       * replication base URL (from Osmosis' configuration.txt file)
+       * </pre>
+       */
+      public Builder setOsmosisReplicationBaseUrlBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000080;
         osmosisReplicationBaseUrl_ = value;
         
+        return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBlock)
     }
-    
+
     static {
       defaultInstance = new HeaderBlock(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBlock)
   }
-  
-  public interface HeaderBBoxOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // required sint64 left = 1;
+
+  public interface HeaderBBoxOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.HeaderBBox)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>required sint64 left = 1;</code>
+     */
     boolean hasLeft();
+    /**
+     * <code>required sint64 left = 1;</code>
+     */
     long getLeft();
-    
-    // required sint64 right = 2;
+
+    /**
+     * <code>required sint64 right = 2;</code>
+     */
     boolean hasRight();
+    /**
+     * <code>required sint64 right = 2;</code>
+     */
     long getRight();
-    
-    // required sint64 top = 3;
+
+    /**
+     * <code>required sint64 top = 3;</code>
+     */
     boolean hasTop();
+    /**
+     * <code>required sint64 top = 3;</code>
+     */
     long getTop();
-    
-    // required sint64 bottom = 4;
+
+    /**
+     * <code>required sint64 bottom = 4;</code>
+     */
     boolean hasBottom();
+    /**
+     * <code>required sint64 bottom = 4;</code>
+     */
     long getBottom();
   }
+  /**
+   * Protobuf type {@code OSMPBF.HeaderBBox}
+   */
   public static final class HeaderBBox extends
-      com.google.protobuf.GeneratedMessageLite
-      implements HeaderBBoxOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBBox)
+      HeaderBBoxOrBuilder {
     // Use HeaderBBox.newBuilder() to construct.
-    private HeaderBBox(Builder builder) {
+    private HeaderBBox(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private HeaderBBox(boolean noInit) {}
-    
+    private HeaderBBox(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final HeaderBBox defaultInstance;
     public static HeaderBBox getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public HeaderBBox getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
-    private int bitField0_;
-    // required sint64 left = 1;
-    public static final int LEFT_FIELD_NUMBER = 1;
-    private long left_;
-    public boolean hasLeft() {
-      return ((bitField0_ & 0x00000001) == 0x00000001);
-    }
-    public long getLeft() {
-      return left_;
-    }
-    
-    // required sint64 right = 2;
-    public static final int RIGHT_FIELD_NUMBER = 2;
-    private long right_;
-    public boolean hasRight() {
-      return ((bitField0_ & 0x00000002) == 0x00000002);
-    }
-    public long getRight() {
-      return right_;
-    }
-    
-    // required sint64 top = 3;
-    public static final int TOP_FIELD_NUMBER = 3;
-    private long top_;
-    public boolean hasTop() {
-      return ((bitField0_ & 0x00000004) == 0x00000004);
-    }
-    public long getTop() {
-      return top_;
-    }
-    
-    // required sint64 bottom = 4;
-    public static final int BOTTOM_FIELD_NUMBER = 4;
-    private long bottom_;
-    public boolean hasBottom() {
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private HeaderBBox(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              bitField0_ |= 0x00000001;
+              left_ = input.readSInt64();
+              break;
+            }
+            case 16: {
+              bitField0_ |= 0x00000002;
+              right_ = input.readSInt64();
+              break;
+            }
+            case 24: {
+              bitField0_ |= 0x00000004;
+              top_ = input.readSInt64();
+              break;
+            }
+            case 32: {
+              bitField0_ |= 0x00000008;
+              bottom_ = input.readSInt64();
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<HeaderBBox> PARSER =
+        new com.google.protobuf.AbstractParser<HeaderBBox>() {
+      public HeaderBBox parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new HeaderBBox(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<HeaderBBox> getParserForType() {
+      return PARSER;
+    }
+
+    private int bitField0_;
+    public static final int LEFT_FIELD_NUMBER = 1;
+    private long left_;
+    /**
+     * <code>required sint64 left = 1;</code>
+     */
+    public boolean hasLeft() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    /**
+     * <code>required sint64 left = 1;</code>
+     */
+    public long getLeft() {
+      return left_;
+    }
+
+    public static final int RIGHT_FIELD_NUMBER = 2;
+    private long right_;
+    /**
+     * <code>required sint64 right = 2;</code>
+     */
+    public boolean hasRight() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    /**
+     * <code>required sint64 right = 2;</code>
+     */
+    public long getRight() {
+      return right_;
+    }
+
+    public static final int TOP_FIELD_NUMBER = 3;
+    private long top_;
+    /**
+     * <code>required sint64 top = 3;</code>
+     */
+    public boolean hasTop() {
+      return ((bitField0_ & 0x00000004) == 0x00000004);
+    }
+    /**
+     * <code>required sint64 top = 3;</code>
+     */
+    public long getTop() {
+      return top_;
+    }
+
+    public static final int BOTTOM_FIELD_NUMBER = 4;
+    private long bottom_;
+    /**
+     * <code>required sint64 bottom = 4;</code>
+     */
+    public boolean hasBottom() {
       return ((bitField0_ & 0x00000008) == 0x00000008);
     }
+    /**
+     * <code>required sint64 bottom = 4;</code>
+     */
     public long getBottom() {
       return bottom_;
     }
-    
+
     private void initFields() {
       left_ = 0L;
       right_ = 0L;
@@ -1034,8 +1858,9 @@ public final class Osmformat {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (!hasLeft()) {
         memoizedIsInitialized = 0;
         return false;
@@ -1055,7 +1880,7 @@ public final class Osmformat {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -1071,13 +1896,14 @@ public final class Osmformat {
       if (((bitField0_ & 0x00000008) == 0x00000008)) {
         output.writeSInt64(4, bottom_);
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
@@ -1095,106 +1921,98 @@ public final class Osmformat {
         size += com.google.protobuf.CodedOutputStream
           .computeSInt64Size(4, bottom_);
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.HeaderBBox}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBoxOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBBox)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBoxOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         left_ = 0L;
@@ -1207,15 +2025,15 @@ public final class Osmformat {
         bitField0_ = (bitField0_ & ~0x00000008);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox result = buildPartial();
         if (!result.isInitialized()) {
@@ -1223,17 +2041,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox result = new org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox(this);
         int from_bitField0_ = bitField0_;
@@ -1257,7 +2065,7 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox.getDefaultInstance()) return this;
         if (other.hasLeft()) {
@@ -1272,9 +2080,11 @@ public final class Osmformat {
         if (other.hasBottom()) {
           setBottom(other.getBottom());
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (!hasLeft()) {
           
@@ -1294,264 +2104,514 @@ public final class Osmformat {
         }
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 8: {
-              bitField0_ |= 0x00000001;
-              left_ = input.readSInt64();
-              break;
-            }
-            case 16: {
-              bitField0_ |= 0x00000002;
-              right_ = input.readSInt64();
-              break;
-            }
-            case 24: {
-              bitField0_ |= 0x00000004;
-              top_ = input.readSInt64();
-              break;
-            }
-            case 32: {
-              bitField0_ |= 0x00000008;
-              bottom_ = input.readSInt64();
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.HeaderBBox) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // required sint64 left = 1;
+
       private long left_ ;
+      /**
+       * <code>required sint64 left = 1;</code>
+       */
       public boolean hasLeft() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>required sint64 left = 1;</code>
+       */
       public long getLeft() {
         return left_;
       }
+      /**
+       * <code>required sint64 left = 1;</code>
+       */
       public Builder setLeft(long value) {
         bitField0_ |= 0x00000001;
         left_ = value;
         
         return this;
       }
+      /**
+       * <code>required sint64 left = 1;</code>
+       */
       public Builder clearLeft() {
         bitField0_ = (bitField0_ & ~0x00000001);
         left_ = 0L;
         
         return this;
       }
-      
-      // required sint64 right = 2;
+
       private long right_ ;
+      /**
+       * <code>required sint64 right = 2;</code>
+       */
       public boolean hasRight() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
+      /**
+       * <code>required sint64 right = 2;</code>
+       */
       public long getRight() {
         return right_;
       }
+      /**
+       * <code>required sint64 right = 2;</code>
+       */
       public Builder setRight(long value) {
         bitField0_ |= 0x00000002;
         right_ = value;
         
         return this;
       }
+      /**
+       * <code>required sint64 right = 2;</code>
+       */
       public Builder clearRight() {
         bitField0_ = (bitField0_ & ~0x00000002);
         right_ = 0L;
         
         return this;
       }
-      
-      // required sint64 top = 3;
+
       private long top_ ;
+      /**
+       * <code>required sint64 top = 3;</code>
+       */
       public boolean hasTop() {
         return ((bitField0_ & 0x00000004) == 0x00000004);
       }
+      /**
+       * <code>required sint64 top = 3;</code>
+       */
       public long getTop() {
         return top_;
       }
+      /**
+       * <code>required sint64 top = 3;</code>
+       */
       public Builder setTop(long value) {
         bitField0_ |= 0x00000004;
         top_ = value;
         
         return this;
       }
+      /**
+       * <code>required sint64 top = 3;</code>
+       */
       public Builder clearTop() {
         bitField0_ = (bitField0_ & ~0x00000004);
         top_ = 0L;
         
         return this;
       }
-      
-      // required sint64 bottom = 4;
+
       private long bottom_ ;
+      /**
+       * <code>required sint64 bottom = 4;</code>
+       */
       public boolean hasBottom() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
+      /**
+       * <code>required sint64 bottom = 4;</code>
+       */
       public long getBottom() {
         return bottom_;
       }
+      /**
+       * <code>required sint64 bottom = 4;</code>
+       */
       public Builder setBottom(long value) {
         bitField0_ |= 0x00000008;
         bottom_ = value;
         
         return this;
       }
+      /**
+       * <code>required sint64 bottom = 4;</code>
+       */
       public Builder clearBottom() {
         bitField0_ = (bitField0_ & ~0x00000008);
         bottom_ = 0L;
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBBox)
     }
-    
+
     static {
       defaultInstance = new HeaderBBox(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBBox)
   }
-  
-  public interface PrimitiveBlockOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // required .OSMPBF.StringTable stringtable = 1;
+
+  public interface PrimitiveBlockOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.PrimitiveBlock)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+     */
     boolean hasStringtable();
+    /**
+     * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getStringtable();
-    
-    // repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
+
+    /**
+     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+     */
     java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> 
         getPrimitivegroupList();
+    /**
+     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getPrimitivegroup(int index);
+    /**
+     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+     */
     int getPrimitivegroupCount();
-    
-    // optional int32 granularity = 17 [default = 100];
+
+    /**
+     * <code>optional int32 granularity = 17 [default = 100];</code>
+     *
+     * <pre>
+     * Granularity, units of nanodegrees, used to store coordinates in this block
+     * </pre>
+     */
     boolean hasGranularity();
+    /**
+     * <code>optional int32 granularity = 17 [default = 100];</code>
+     *
+     * <pre>
+     * Granularity, units of nanodegrees, used to store coordinates in this block
+     * </pre>
+     */
     int getGranularity();
-    
-    // optional int64 lat_offset = 19 [default = 0];
+
+    /**
+     * <code>optional int64 lat_offset = 19 [default = 0];</code>
+     *
+     * <pre>
+     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
+     * </pre>
+     */
     boolean hasLatOffset();
+    /**
+     * <code>optional int64 lat_offset = 19 [default = 0];</code>
+     *
+     * <pre>
+     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
+     * </pre>
+     */
     long getLatOffset();
-    
-    // optional int64 lon_offset = 20 [default = 0];
+
+    /**
+     * <code>optional int64 lon_offset = 20 [default = 0];</code>
+     */
     boolean hasLonOffset();
+    /**
+     * <code>optional int64 lon_offset = 20 [default = 0];</code>
+     */
     long getLonOffset();
-    
-    // optional int32 date_granularity = 18 [default = 1000];
+
+    /**
+     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+     *
+     * <pre>
+     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+     * </pre>
+     */
     boolean hasDateGranularity();
+    /**
+     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+     *
+     * <pre>
+     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+     * </pre>
+     */
     int getDateGranularity();
   }
+  /**
+   * Protobuf type {@code OSMPBF.PrimitiveBlock}
+   */
   public static final class PrimitiveBlock extends
-      com.google.protobuf.GeneratedMessageLite
-      implements PrimitiveBlockOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveBlock)
+      PrimitiveBlockOrBuilder {
     // Use PrimitiveBlock.newBuilder() to construct.
-    private PrimitiveBlock(Builder builder) {
+    private PrimitiveBlock(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private PrimitiveBlock(boolean noInit) {}
-    
+    private PrimitiveBlock(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final PrimitiveBlock defaultInstance;
     public static PrimitiveBlock getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public PrimitiveBlock getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private PrimitiveBlock(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000001) == 0x00000001)) {
+                subBuilder = stringtable_.toBuilder();
+              }
+              stringtable_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(stringtable_);
+                stringtable_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000001;
+              break;
+            }
+            case 18: {
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+                primitivegroup_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              primitivegroup_.add(input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.PARSER, extensionRegistry));
+              break;
+            }
+            case 136: {
+              bitField0_ |= 0x00000002;
+              granularity_ = input.readInt32();
+              break;
+            }
+            case 144: {
+              bitField0_ |= 0x00000010;
+              dateGranularity_ = input.readInt32();
+              break;
+            }
+            case 152: {
+              bitField0_ |= 0x00000004;
+              latOffset_ = input.readInt64();
+              break;
+            }
+            case 160: {
+              bitField0_ |= 0x00000008;
+              lonOffset_ = input.readInt64();
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+          primitivegroup_ = java.util.Collections.unmodifiableList(primitivegroup_);
+        }
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<PrimitiveBlock> PARSER =
+        new com.google.protobuf.AbstractParser<PrimitiveBlock>() {
+      public PrimitiveBlock parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new PrimitiveBlock(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<PrimitiveBlock> getParserForType() {
+      return PARSER;
+    }
+
     private int bitField0_;
-    // required .OSMPBF.StringTable stringtable = 1;
     public static final int STRINGTABLE_FIELD_NUMBER = 1;
     private org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable stringtable_;
+    /**
+     * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+     */
     public boolean hasStringtable() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getStringtable() {
       return stringtable_;
     }
-    
-    // repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
+
     public static final int PRIMITIVEGROUP_FIELD_NUMBER = 2;
     private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> primitivegroup_;
+    /**
+     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+     */
     public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> getPrimitivegroupList() {
       return primitivegroup_;
     }
+    /**
+     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+     */
     public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder> 
         getPrimitivegroupOrBuilderList() {
       return primitivegroup_;
     }
+    /**
+     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+     */
     public int getPrimitivegroupCount() {
       return primitivegroup_.size();
     }
+    /**
+     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
       return primitivegroup_.get(index);
     }
+    /**
+     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(
         int index) {
       return primitivegroup_.get(index);
     }
-    
-    // optional int32 granularity = 17 [default = 100];
+
     public static final int GRANULARITY_FIELD_NUMBER = 17;
     private int granularity_;
+    /**
+     * <code>optional int32 granularity = 17 [default = 100];</code>
+     *
+     * <pre>
+     * Granularity, units of nanodegrees, used to store coordinates in this block
+     * </pre>
+     */
     public boolean hasGranularity() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>optional int32 granularity = 17 [default = 100];</code>
+     *
+     * <pre>
+     * Granularity, units of nanodegrees, used to store coordinates in this block
+     * </pre>
+     */
     public int getGranularity() {
       return granularity_;
     }
-    
-    // optional int64 lat_offset = 19 [default = 0];
+
     public static final int LAT_OFFSET_FIELD_NUMBER = 19;
     private long latOffset_;
+    /**
+     * <code>optional int64 lat_offset = 19 [default = 0];</code>
+     *
+     * <pre>
+     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
+     * </pre>
+     */
     public boolean hasLatOffset() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
+    /**
+     * <code>optional int64 lat_offset = 19 [default = 0];</code>
+     *
+     * <pre>
+     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
+     * </pre>
+     */
     public long getLatOffset() {
       return latOffset_;
     }
-    
-    // optional int64 lon_offset = 20 [default = 0];
+
     public static final int LON_OFFSET_FIELD_NUMBER = 20;
     private long lonOffset_;
+    /**
+     * <code>optional int64 lon_offset = 20 [default = 0];</code>
+     */
     public boolean hasLonOffset() {
       return ((bitField0_ & 0x00000008) == 0x00000008);
     }
+    /**
+     * <code>optional int64 lon_offset = 20 [default = 0];</code>
+     */
     public long getLonOffset() {
       return lonOffset_;
     }
-    
-    // optional int32 date_granularity = 18 [default = 1000];
+
     public static final int DATE_GRANULARITY_FIELD_NUMBER = 18;
     private int dateGranularity_;
+    /**
+     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+     *
+     * <pre>
+     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+     * </pre>
+     */
     public boolean hasDateGranularity() {
       return ((bitField0_ & 0x00000010) == 0x00000010);
     }
+    /**
+     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+     *
+     * <pre>
+     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+     * </pre>
+     */
     public int getDateGranularity() {
       return dateGranularity_;
     }
-    
+
     private void initFields() {
       stringtable_ = org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance();
       primitivegroup_ = java.util.Collections.emptyList();
@@ -1563,8 +2623,9 @@ public final class Osmformat {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (!hasStringtable()) {
         memoizedIsInitialized = 0;
         return false;
@@ -1578,7 +2639,7 @@ public final class Osmformat {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -1600,13 +2661,14 @@ public final class Osmformat {
       if (((bitField0_ & 0x00000008) == 0x00000008)) {
         output.writeInt64(20, lonOffset_);
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
@@ -1632,106 +2694,98 @@ public final class Osmformat {
         size += com.google.protobuf.CodedOutputStream
           .computeInt64Size(20, lonOffset_);
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.PrimitiveBlock}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlockOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveBlock)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlockOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         stringtable_ = org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance();
@@ -1748,15 +2802,15 @@ public final class Osmformat {
         bitField0_ = (bitField0_ & ~0x00000020);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock result = buildPartial();
         if (!result.isInitialized()) {
@@ -1764,17 +2818,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock result = new org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock(this);
         int from_bitField0_ = bitField0_;
@@ -1807,7 +2851,7 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock.getDefaultInstance()) return this;
         if (other.hasStringtable()) {
@@ -1835,9 +2879,11 @@ public final class Osmformat {
         if (other.hasDateGranularity()) {
           setDateGranularity(other.getDateGranularity());
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (!hasStringtable()) {
           
@@ -1851,89 +2897,64 @@ public final class Osmformat {
         }
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 10: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.newBuilder();
-              if (hasStringtable()) {
-                subBuilder.mergeFrom(getStringtable());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setStringtable(subBuilder.buildPartial());
-              break;
-            }
-            case 18: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.newBuilder();
-              input.readMessage(subBuilder, extensionRegistry);
-              addPrimitivegroup(subBuilder.buildPartial());
-              break;
-            }
-            case 136: {
-              bitField0_ |= 0x00000004;
-              granularity_ = input.readInt32();
-              break;
-            }
-            case 144: {
-              bitField0_ |= 0x00000020;
-              dateGranularity_ = input.readInt32();
-              break;
-            }
-            case 152: {
-              bitField0_ |= 0x00000008;
-              latOffset_ = input.readInt64();
-              break;
-            }
-            case 160: {
-              bitField0_ |= 0x00000010;
-              lonOffset_ = input.readInt64();
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveBlock) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // required .OSMPBF.StringTable stringtable = 1;
+
       private org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable stringtable_ = org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance();
+      /**
+       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+       */
       public boolean hasStringtable() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getStringtable() {
         return stringtable_;
       }
+      /**
+       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+       */
       public Builder setStringtable(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable value) {
         if (value == null) {
           throw new NullPointerException();
         }
         stringtable_ = value;
-        
+
         bitField0_ |= 0x00000001;
         return this;
       }
+      /**
+       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+       */
       public Builder setStringtable(
           org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.Builder builderForValue) {
         stringtable_ = builderForValue.build();
-        
+
         bitField0_ |= 0x00000001;
         return this;
       }
+      /**
+       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+       */
       public Builder mergeStringtable(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable value) {
         if (((bitField0_ & 0x00000001) == 0x00000001) &&
             stringtable_ != org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance()) {
@@ -1942,18 +2963,20 @@ public final class Osmformat {
         } else {
           stringtable_ = value;
         }
-        
+
         bitField0_ |= 0x00000001;
         return this;
       }
+      /**
+       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
+       */
       public Builder clearStringtable() {
         stringtable_ = org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance();
-        
+
         bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
-      
-      // repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
+
       private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> primitivegroup_ =
         java.util.Collections.emptyList();
       private void ensurePrimitivegroupIsMutable() {
@@ -1962,16 +2985,28 @@ public final class Osmformat {
           bitField0_ |= 0x00000002;
          }
       }
-      
+
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> getPrimitivegroupList() {
         return java.util.Collections.unmodifiableList(primitivegroup_);
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public int getPrimitivegroupCount() {
         return primitivegroup_.size();
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
         return primitivegroup_.get(index);
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public Builder setPrimitivegroup(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup value) {
         if (value == null) {
@@ -1979,25 +3014,34 @@ public final class Osmformat {
         }
         ensurePrimitivegroupIsMutable();
         primitivegroup_.set(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public Builder setPrimitivegroup(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder builderForValue) {
         ensurePrimitivegroupIsMutable();
         primitivegroup_.set(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public Builder addPrimitivegroup(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup value) {
         if (value == null) {
           throw new NullPointerException();
         }
         ensurePrimitivegroupIsMutable();
         primitivegroup_.add(value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public Builder addPrimitivegroup(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup value) {
         if (value == null) {
@@ -2005,282 +3049,615 @@ public final class Osmformat {
         }
         ensurePrimitivegroupIsMutable();
         primitivegroup_.add(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public Builder addPrimitivegroup(
           org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder builderForValue) {
         ensurePrimitivegroupIsMutable();
         primitivegroup_.add(builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public Builder addPrimitivegroup(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.Builder builderForValue) {
         ensurePrimitivegroupIsMutable();
         primitivegroup_.add(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public Builder addAllPrimitivegroup(
           java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup> values) {
         ensurePrimitivegroupIsMutable();
-        super.addAll(values, primitivegroup_);
-        
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, primitivegroup_);
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public Builder clearPrimitivegroup() {
         primitivegroup_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000002);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
+       */
       public Builder removePrimitivegroup(int index) {
         ensurePrimitivegroupIsMutable();
         primitivegroup_.remove(index);
-        
+
         return this;
       }
-      
-      // optional int32 granularity = 17 [default = 100];
+
       private int granularity_ = 100;
+      /**
+       * <code>optional int32 granularity = 17 [default = 100];</code>
+       *
+       * <pre>
+       * Granularity, units of nanodegrees, used to store coordinates in this block
+       * </pre>
+       */
       public boolean hasGranularity() {
         return ((bitField0_ & 0x00000004) == 0x00000004);
       }
+      /**
+       * <code>optional int32 granularity = 17 [default = 100];</code>
+       *
+       * <pre>
+       * Granularity, units of nanodegrees, used to store coordinates in this block
+       * </pre>
+       */
       public int getGranularity() {
         return granularity_;
       }
+      /**
+       * <code>optional int32 granularity = 17 [default = 100];</code>
+       *
+       * <pre>
+       * Granularity, units of nanodegrees, used to store coordinates in this block
+       * </pre>
+       */
       public Builder setGranularity(int value) {
         bitField0_ |= 0x00000004;
         granularity_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int32 granularity = 17 [default = 100];</code>
+       *
+       * <pre>
+       * Granularity, units of nanodegrees, used to store coordinates in this block
+       * </pre>
+       */
       public Builder clearGranularity() {
         bitField0_ = (bitField0_ & ~0x00000004);
         granularity_ = 100;
         
         return this;
       }
-      
-      // optional int64 lat_offset = 19 [default = 0];
+
       private long latOffset_ ;
+      /**
+       * <code>optional int64 lat_offset = 19 [default = 0];</code>
+       *
+       * <pre>
+       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
+       * </pre>
+       */
       public boolean hasLatOffset() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
+      /**
+       * <code>optional int64 lat_offset = 19 [default = 0];</code>
+       *
+       * <pre>
+       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
+       * </pre>
+       */
       public long getLatOffset() {
         return latOffset_;
       }
+      /**
+       * <code>optional int64 lat_offset = 19 [default = 0];</code>
+       *
+       * <pre>
+       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
+       * </pre>
+       */
       public Builder setLatOffset(long value) {
         bitField0_ |= 0x00000008;
         latOffset_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int64 lat_offset = 19 [default = 0];</code>
+       *
+       * <pre>
+       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
+       * </pre>
+       */
       public Builder clearLatOffset() {
         bitField0_ = (bitField0_ & ~0x00000008);
         latOffset_ = 0L;
         
         return this;
       }
-      
-      // optional int64 lon_offset = 20 [default = 0];
+
       private long lonOffset_ ;
+      /**
+       * <code>optional int64 lon_offset = 20 [default = 0];</code>
+       */
       public boolean hasLonOffset() {
         return ((bitField0_ & 0x00000010) == 0x00000010);
       }
+      /**
+       * <code>optional int64 lon_offset = 20 [default = 0];</code>
+       */
       public long getLonOffset() {
         return lonOffset_;
       }
+      /**
+       * <code>optional int64 lon_offset = 20 [default = 0];</code>
+       */
       public Builder setLonOffset(long value) {
         bitField0_ |= 0x00000010;
         lonOffset_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int64 lon_offset = 20 [default = 0];</code>
+       */
       public Builder clearLonOffset() {
         bitField0_ = (bitField0_ & ~0x00000010);
         lonOffset_ = 0L;
         
         return this;
       }
-      
-      // optional int32 date_granularity = 18 [default = 1000];
+
       private int dateGranularity_ = 1000;
+      /**
+       * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+       *
+       * <pre>
+       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+       * </pre>
+       */
       public boolean hasDateGranularity() {
         return ((bitField0_ & 0x00000020) == 0x00000020);
       }
+      /**
+       * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+       *
+       * <pre>
+       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+       * </pre>
+       */
       public int getDateGranularity() {
         return dateGranularity_;
       }
+      /**
+       * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+       *
+       * <pre>
+       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+       * </pre>
+       */
       public Builder setDateGranularity(int value) {
         bitField0_ |= 0x00000020;
         dateGranularity_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+       *
+       * <pre>
+       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+       * </pre>
+       */
       public Builder clearDateGranularity() {
         bitField0_ = (bitField0_ & ~0x00000020);
         dateGranularity_ = 1000;
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveBlock)
     }
-    
+
     static {
       defaultInstance = new PrimitiveBlock(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveBlock)
   }
-  
-  public interface PrimitiveGroupOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // repeated .OSMPBF.Node nodes = 1;
+
+  public interface PrimitiveGroupOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.PrimitiveGroup)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>repeated .OSMPBF.Node nodes = 1;</code>
+     */
     java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node> 
         getNodesList();
+    /**
+     * <code>repeated .OSMPBF.Node nodes = 1;</code>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.Node getNodes(int index);
+    /**
+     * <code>repeated .OSMPBF.Node nodes = 1;</code>
+     */
     int getNodesCount();
-    
-    // optional .OSMPBF.DenseNodes dense = 2;
+
+    /**
+     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+     */
     boolean hasDense();
+    /**
+     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDense();
-    
-    // repeated .OSMPBF.Way ways = 3;
+
+    /**
+     * <code>repeated .OSMPBF.Way ways = 3;</code>
+     */
     java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way> 
         getWaysList();
+    /**
+     * <code>repeated .OSMPBF.Way ways = 3;</code>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.Way getWays(int index);
+    /**
+     * <code>repeated .OSMPBF.Way ways = 3;</code>
+     */
     int getWaysCount();
-    
-    // repeated .OSMPBF.Relation relations = 4;
+
+    /**
+     * <code>repeated .OSMPBF.Relation relations = 4;</code>
+     */
     java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> 
         getRelationsList();
+    /**
+     * <code>repeated .OSMPBF.Relation relations = 4;</code>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getRelations(int index);
+    /**
+     * <code>repeated .OSMPBF.Relation relations = 4;</code>
+     */
     int getRelationsCount();
-    
-    // repeated .OSMPBF.ChangeSet changesets = 5;
+
+    /**
+     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+     */
     java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> 
         getChangesetsList();
+    /**
+     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getChangesets(int index);
+    /**
+     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+     */
     int getChangesetsCount();
   }
+  /**
+   * Protobuf type {@code OSMPBF.PrimitiveGroup}
+   *
+   * <pre>
+   * Group of OSMPrimitives. All primitives in a group must be the same type.
+   * </pre>
+   */
   public static final class PrimitiveGroup extends
-      com.google.protobuf.GeneratedMessageLite
-      implements PrimitiveGroupOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveGroup)
+      PrimitiveGroupOrBuilder {
     // Use PrimitiveGroup.newBuilder() to construct.
-    private PrimitiveGroup(Builder builder) {
+    private PrimitiveGroup(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private PrimitiveGroup(boolean noInit) {}
-    
+    private PrimitiveGroup(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final PrimitiveGroup defaultInstance;
     public static PrimitiveGroup getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public PrimitiveGroup getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private PrimitiveGroup(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+                nodes_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Node>();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              nodes_.add(input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Node.PARSER, extensionRegistry));
+              break;
+            }
+            case 18: {
+              org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000001) == 0x00000001)) {
+                subBuilder = dense_.toBuilder();
+              }
+              dense_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(dense_);
+                dense_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000001;
+              break;
+            }
+            case 26: {
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+                ways_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Way>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              ways_.add(input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Way.PARSER, extensionRegistry));
+              break;
+            }
+            case 34: {
+              if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+                relations_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation>();
+                mutable_bitField0_ |= 0x00000008;
+              }
+              relations_.add(input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.PARSER, extensionRegistry));
+              break;
+            }
+            case 42: {
+              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+                changesets_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet>();
+                mutable_bitField0_ |= 0x00000010;
+              }
+              changesets_.add(input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.PARSER, extensionRegistry));
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+          nodes_ = java.util.Collections.unmodifiableList(nodes_);
+        }
+        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+          ways_ = java.util.Collections.unmodifiableList(ways_);
+        }
+        if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+          relations_ = java.util.Collections.unmodifiableList(relations_);
+        }
+        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+          changesets_ = java.util.Collections.unmodifiableList(changesets_);
+        }
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<PrimitiveGroup> PARSER =
+        new com.google.protobuf.AbstractParser<PrimitiveGroup>() {
+      public PrimitiveGroup parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new PrimitiveGroup(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<PrimitiveGroup> getParserForType() {
+      return PARSER;
+    }
+
     private int bitField0_;
-    // repeated .OSMPBF.Node nodes = 1;
     public static final int NODES_FIELD_NUMBER = 1;
     private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node> nodes_;
+    /**
+     * <code>repeated .OSMPBF.Node nodes = 1;</code>
+     */
     public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node> getNodesList() {
       return nodes_;
     }
+    /**
+     * <code>repeated .OSMPBF.Node nodes = 1;</code>
+     */
     public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder> 
         getNodesOrBuilderList() {
       return nodes_;
     }
+    /**
+     * <code>repeated .OSMPBF.Node nodes = 1;</code>
+     */
     public int getNodesCount() {
       return nodes_.size();
     }
+    /**
+     * <code>repeated .OSMPBF.Node nodes = 1;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.Node getNodes(int index) {
       return nodes_.get(index);
     }
+    /**
+     * <code>repeated .OSMPBF.Node nodes = 1;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder getNodesOrBuilder(
         int index) {
       return nodes_.get(index);
     }
-    
-    // optional .OSMPBF.DenseNodes dense = 2;
+
     public static final int DENSE_FIELD_NUMBER = 2;
     private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes dense_;
+    /**
+     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+     */
     public boolean hasDense() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDense() {
       return dense_;
     }
-    
-    // repeated .OSMPBF.Way ways = 3;
+
     public static final int WAYS_FIELD_NUMBER = 3;
     private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way> ways_;
+    /**
+     * <code>repeated .OSMPBF.Way ways = 3;</code>
+     */
     public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way> getWaysList() {
       return ways_;
     }
+    /**
+     * <code>repeated .OSMPBF.Way ways = 3;</code>
+     */
     public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder> 
         getWaysOrBuilderList() {
       return ways_;
     }
+    /**
+     * <code>repeated .OSMPBF.Way ways = 3;</code>
+     */
     public int getWaysCount() {
       return ways_.size();
     }
+    /**
+     * <code>repeated .OSMPBF.Way ways = 3;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.Way getWays(int index) {
       return ways_.get(index);
     }
+    /**
+     * <code>repeated .OSMPBF.Way ways = 3;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder getWaysOrBuilder(
         int index) {
       return ways_.get(index);
     }
-    
-    // repeated .OSMPBF.Relation relations = 4;
+
     public static final int RELATIONS_FIELD_NUMBER = 4;
     private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> relations_;
+    /**
+     * <code>repeated .OSMPBF.Relation relations = 4;</code>
+     */
     public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> getRelationsList() {
       return relations_;
     }
+    /**
+     * <code>repeated .OSMPBF.Relation relations = 4;</code>
+     */
     public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder> 
         getRelationsOrBuilderList() {
       return relations_;
     }
+    /**
+     * <code>repeated .OSMPBF.Relation relations = 4;</code>
+     */
     public int getRelationsCount() {
       return relations_.size();
     }
+    /**
+     * <code>repeated .OSMPBF.Relation relations = 4;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getRelations(int index) {
       return relations_.get(index);
     }
+    /**
+     * <code>repeated .OSMPBF.Relation relations = 4;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder getRelationsOrBuilder(
         int index) {
       return relations_.get(index);
     }
-    
-    // repeated .OSMPBF.ChangeSet changesets = 5;
+
     public static final int CHANGESETS_FIELD_NUMBER = 5;
     private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> changesets_;
+    /**
+     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+     */
     public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> getChangesetsList() {
       return changesets_;
     }
+    /**
+     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+     */
     public java.util.List<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder> 
         getChangesetsOrBuilderList() {
       return changesets_;
     }
+    /**
+     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+     */
     public int getChangesetsCount() {
       return changesets_.size();
     }
+    /**
+     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getChangesets(int index) {
       return changesets_.get(index);
     }
+    /**
+     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder getChangesetsOrBuilder(
         int index) {
       return changesets_.get(index);
     }
-    
+
     private void initFields() {
       nodes_ = java.util.Collections.emptyList();
       dense_ = org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance();
@@ -2291,8 +3668,9 @@ public final class Osmformat {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       for (int i = 0; i < getNodesCount(); i++) {
         if (!getNodes(i).isInitialized()) {
           memoizedIsInitialized = 0;
@@ -2320,7 +3698,7 @@ public final class Osmformat {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -2339,13 +3717,14 @@ public final class Osmformat {
       for (int i = 0; i < changesets_.size(); i++) {
         output.writeMessage(5, changesets_.get(i));
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       for (int i = 0; i < nodes_.size(); i++) {
         size += com.google.protobuf.CodedOutputStream
@@ -2367,106 +3746,102 @@ public final class Osmformat {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(5, changesets_.get(i));
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.PrimitiveGroup}
+     *
+     * <pre>
+     * Group of OSMPrimitives. All primitives in a group must be the same type.
+     * </pre>
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveGroup)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroupOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         nodes_ = java.util.Collections.emptyList();
@@ -2481,15 +3856,15 @@ public final class Osmformat {
         bitField0_ = (bitField0_ & ~0x00000010);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup result = buildPartial();
         if (!result.isInitialized()) {
@@ -2497,17 +3872,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup result = new org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup(this);
         int from_bitField0_ = bitField0_;
@@ -2539,7 +3904,7 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup.getDefaultInstance()) return this;
         if (!other.nodes_.isEmpty()) {
@@ -2585,9 +3950,11 @@ public final class Osmformat {
           }
           
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         for (int i = 0; i < getNodesCount(); i++) {
           if (!getNodes(i).isInitialized()) {
@@ -2615,64 +3982,26 @@ public final class Osmformat {
         }
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 10: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.Node.newBuilder();
-              input.readMessage(subBuilder, extensionRegistry);
-              addNodes(subBuilder.buildPartial());
-              break;
-            }
-            case 18: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.newBuilder();
-              if (hasDense()) {
-                subBuilder.mergeFrom(getDense());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setDense(subBuilder.buildPartial());
-              break;
-            }
-            case 26: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.Way.newBuilder();
-              input.readMessage(subBuilder, extensionRegistry);
-              addWays(subBuilder.buildPartial());
-              break;
-            }
-            case 34: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.newBuilder();
-              input.readMessage(subBuilder, extensionRegistry);
-              addRelations(subBuilder.buildPartial());
-              break;
-            }
-            case 42: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.newBuilder();
-              input.readMessage(subBuilder, extensionRegistry);
-              addChangesets(subBuilder.buildPartial());
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.PrimitiveGroup) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // repeated .OSMPBF.Node nodes = 1;
+
       private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node> nodes_ =
         java.util.Collections.emptyList();
       private void ensureNodesIsMutable() {
@@ -2681,16 +4010,28 @@ public final class Osmformat {
           bitField0_ |= 0x00000001;
          }
       }
-      
+
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Node> getNodesList() {
         return java.util.Collections.unmodifiableList(nodes_);
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public int getNodesCount() {
         return nodes_.size();
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Node getNodes(int index) {
         return nodes_.get(index);
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public Builder setNodes(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Node value) {
         if (value == null) {
@@ -2698,25 +4039,34 @@ public final class Osmformat {
         }
         ensureNodesIsMutable();
         nodes_.set(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public Builder setNodes(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder builderForValue) {
         ensureNodesIsMutable();
         nodes_.set(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public Builder addNodes(org.openstreetmap.osmosis.osmbinary.Osmformat.Node value) {
         if (value == null) {
           throw new NullPointerException();
         }
         ensureNodesIsMutable();
         nodes_.add(value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public Builder addNodes(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Node value) {
         if (value == null) {
@@ -2724,67 +4074,97 @@ public final class Osmformat {
         }
         ensureNodesIsMutable();
         nodes_.add(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public Builder addNodes(
           org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder builderForValue) {
         ensureNodesIsMutable();
         nodes_.add(builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public Builder addNodes(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Node.Builder builderForValue) {
         ensureNodesIsMutable();
         nodes_.add(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public Builder addAllNodes(
           java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.Node> values) {
         ensureNodesIsMutable();
-        super.addAll(values, nodes_);
-        
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, nodes_);
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public Builder clearNodes() {
         nodes_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000001);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Node nodes = 1;</code>
+       */
       public Builder removeNodes(int index) {
         ensureNodesIsMutable();
         nodes_.remove(index);
-        
+
         return this;
       }
-      
-      // optional .OSMPBF.DenseNodes dense = 2;
+
       private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes dense_ = org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance();
+      /**
+       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+       */
       public boolean hasDense() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
+      /**
+       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDense() {
         return dense_;
       }
+      /**
+       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+       */
       public Builder setDense(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes value) {
         if (value == null) {
           throw new NullPointerException();
         }
         dense_ = value;
-        
+
         bitField0_ |= 0x00000002;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+       */
       public Builder setDense(
           org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.Builder builderForValue) {
         dense_ = builderForValue.build();
-        
+
         bitField0_ |= 0x00000002;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+       */
       public Builder mergeDense(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes value) {
         if (((bitField0_ & 0x00000002) == 0x00000002) &&
             dense_ != org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance()) {
@@ -2793,18 +4173,20 @@ public final class Osmformat {
         } else {
           dense_ = value;
         }
-        
+
         bitField0_ |= 0x00000002;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
+       */
       public Builder clearDense() {
         dense_ = org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance();
-        
+
         bitField0_ = (bitField0_ & ~0x00000002);
         return this;
       }
-      
-      // repeated .OSMPBF.Way ways = 3;
+
       private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way> ways_ =
         java.util.Collections.emptyList();
       private void ensureWaysIsMutable() {
@@ -2813,16 +4195,28 @@ public final class Osmformat {
           bitField0_ |= 0x00000004;
          }
       }
-      
+
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Way> getWaysList() {
         return java.util.Collections.unmodifiableList(ways_);
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public int getWaysCount() {
         return ways_.size();
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Way getWays(int index) {
         return ways_.get(index);
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public Builder setWays(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Way value) {
         if (value == null) {
@@ -2830,25 +4224,34 @@ public final class Osmformat {
         }
         ensureWaysIsMutable();
         ways_.set(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public Builder setWays(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder builderForValue) {
         ensureWaysIsMutable();
         ways_.set(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public Builder addWays(org.openstreetmap.osmosis.osmbinary.Osmformat.Way value) {
         if (value == null) {
           throw new NullPointerException();
         }
         ensureWaysIsMutable();
         ways_.add(value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public Builder addWays(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Way value) {
         if (value == null) {
@@ -2856,44 +4259,59 @@ public final class Osmformat {
         }
         ensureWaysIsMutable();
         ways_.add(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public Builder addWays(
           org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder builderForValue) {
         ensureWaysIsMutable();
         ways_.add(builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public Builder addWays(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Way.Builder builderForValue) {
         ensureWaysIsMutable();
         ways_.add(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public Builder addAllWays(
           java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.Way> values) {
         ensureWaysIsMutable();
-        super.addAll(values, ways_);
-        
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, ways_);
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public Builder clearWays() {
         ways_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Way ways = 3;</code>
+       */
       public Builder removeWays(int index) {
         ensureWaysIsMutable();
         ways_.remove(index);
-        
+
         return this;
       }
-      
-      // repeated .OSMPBF.Relation relations = 4;
+
       private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> relations_ =
         java.util.Collections.emptyList();
       private void ensureRelationsIsMutable() {
@@ -2902,16 +4320,28 @@ public final class Osmformat {
           bitField0_ |= 0x00000008;
          }
       }
-      
+
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> getRelationsList() {
         return java.util.Collections.unmodifiableList(relations_);
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public int getRelationsCount() {
         return relations_.size();
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getRelations(int index) {
         return relations_.get(index);
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public Builder setRelations(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation value) {
         if (value == null) {
@@ -2919,25 +4349,34 @@ public final class Osmformat {
         }
         ensureRelationsIsMutable();
         relations_.set(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public Builder setRelations(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder builderForValue) {
         ensureRelationsIsMutable();
         relations_.set(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public Builder addRelations(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation value) {
         if (value == null) {
           throw new NullPointerException();
         }
         ensureRelationsIsMutable();
         relations_.add(value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public Builder addRelations(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation value) {
         if (value == null) {
@@ -2945,44 +4384,59 @@ public final class Osmformat {
         }
         ensureRelationsIsMutable();
         relations_.add(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public Builder addRelations(
           org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder builderForValue) {
         ensureRelationsIsMutable();
         relations_.add(builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public Builder addRelations(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.Builder builderForValue) {
         ensureRelationsIsMutable();
         relations_.add(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public Builder addAllRelations(
           java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.Relation> values) {
         ensureRelationsIsMutable();
-        super.addAll(values, relations_);
-        
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, relations_);
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public Builder clearRelations() {
         relations_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000008);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation relations = 4;</code>
+       */
       public Builder removeRelations(int index) {
         ensureRelationsIsMutable();
         relations_.remove(index);
-        
+
         return this;
       }
-      
-      // repeated .OSMPBF.ChangeSet changesets = 5;
+
       private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> changesets_ =
         java.util.Collections.emptyList();
       private void ensureChangesetsIsMutable() {
@@ -2991,16 +4445,28 @@ public final class Osmformat {
           bitField0_ |= 0x00000010;
          }
       }
-      
+
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> getChangesetsList() {
         return java.util.Collections.unmodifiableList(changesets_);
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public int getChangesetsCount() {
         return changesets_.size();
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getChangesets(int index) {
         return changesets_.get(index);
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public Builder setChangesets(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet value) {
         if (value == null) {
@@ -3008,25 +4474,34 @@ public final class Osmformat {
         }
         ensureChangesetsIsMutable();
         changesets_.set(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public Builder setChangesets(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder builderForValue) {
         ensureChangesetsIsMutable();
         changesets_.set(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public Builder addChangesets(org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet value) {
         if (value == null) {
           throw new NullPointerException();
         }
         ensureChangesetsIsMutable();
         changesets_.add(value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public Builder addChangesets(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet value) {
         if (value == null) {
@@ -3034,119 +4509,236 @@ public final class Osmformat {
         }
         ensureChangesetsIsMutable();
         changesets_.add(index, value);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public Builder addChangesets(
           org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder builderForValue) {
         ensureChangesetsIsMutable();
         changesets_.add(builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public Builder addChangesets(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.Builder builderForValue) {
         ensureChangesetsIsMutable();
         changesets_.add(index, builderForValue.build());
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public Builder addAllChangesets(
           java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet> values) {
         ensureChangesetsIsMutable();
-        super.addAll(values, changesets_);
-        
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, changesets_);
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public Builder clearChangesets() {
         changesets_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000010);
-        
+
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
+       */
       public Builder removeChangesets(int index) {
         ensureChangesetsIsMutable();
         changesets_.remove(index);
-        
+
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveGroup)
     }
-    
+
     static {
       defaultInstance = new PrimitiveGroup(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveGroup)
   }
-  
-  public interface StringTableOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // repeated bytes s = 1;
+
+  public interface StringTableOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.StringTable)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>repeated bytes s = 1;</code>
+     */
     java.util.List<com.google.protobuf.ByteString> getSList();
+    /**
+     * <code>repeated bytes s = 1;</code>
+     */
     int getSCount();
+    /**
+     * <code>repeated bytes s = 1;</code>
+     */
     com.google.protobuf.ByteString getS(int index);
   }
+  /**
+   * Protobuf type {@code OSMPBF.StringTable}
+   *
+   * <pre>
+   ** String table, contains the common strings in each block.
+   *Note that we reserve index '0' as a delimiter, so the entry at that
+   *index in the table is ALWAYS blank and unused.
+   * </pre>
+   */
   public static final class StringTable extends
-      com.google.protobuf.GeneratedMessageLite
-      implements StringTableOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.StringTable)
+      StringTableOrBuilder {
     // Use StringTable.newBuilder() to construct.
-    private StringTable(Builder builder) {
+    private StringTable(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private StringTable(boolean noInit) {}
-    
+    private StringTable(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final StringTable defaultInstance;
     public static StringTable getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public StringTable getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
-    // repeated bytes s = 1;
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private StringTable(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+                s_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              s_.add(input.readBytes());
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+          s_ = java.util.Collections.unmodifiableList(s_);
+        }
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<StringTable> PARSER =
+        new com.google.protobuf.AbstractParser<StringTable>() {
+      public StringTable parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new StringTable(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<StringTable> getParserForType() {
+      return PARSER;
+    }
+
     public static final int S_FIELD_NUMBER = 1;
     private java.util.List<com.google.protobuf.ByteString> s_;
+    /**
+     * <code>repeated bytes s = 1;</code>
+     */
     public java.util.List<com.google.protobuf.ByteString>
         getSList() {
       return s_;
     }
+    /**
+     * <code>repeated bytes s = 1;</code>
+     */
     public int getSCount() {
       return s_.size();
     }
+    /**
+     * <code>repeated bytes s = 1;</code>
+     */
     public com.google.protobuf.ByteString getS(int index) {
       return s_.get(index);
     }
-    
+
     private void initFields() {
-      s_ = java.util.Collections.emptyList();;
+      s_ = java.util.Collections.emptyList();
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
       for (int i = 0; i < s_.size(); i++) {
         output.writeBytes(1, s_.get(i));
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       {
         int dataSize = 0;
@@ -3157,121 +4749,119 @@ public final class Osmformat {
         size += dataSize;
         size += 1 * getSList().size();
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.StringTable}
+     *
+     * <pre>
+     ** String table, contains the common strings in each block.
+     *Note that we reserve index '0' as a delimiter, so the entry at that
+     *index in the table is ALWAYS blank and unused.
+     * </pre>
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.StringTableOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.StringTable)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.StringTableOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
-        s_ = java.util.Collections.emptyList();;
+        s_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable result = buildPartial();
         if (!result.isInitialized()) {
@@ -3279,17 +4869,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable result = new org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable(this);
         int from_bitField0_ = bitField0_;
@@ -3300,7 +4880,7 @@ public final class Osmformat {
         result.s_ = s_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable.getDefaultInstance()) return this;
         if (!other.s_.isEmpty()) {
@@ -3313,59 +4893,63 @@ public final class Osmformat {
           }
           
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 10: {
-              ensureSIsMutable();
-              s_.add(input.readBytes());
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.StringTable) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // repeated bytes s = 1;
-      private java.util.List<com.google.protobuf.ByteString> s_ = java.util.Collections.emptyList();;
+
+      private java.util.List<com.google.protobuf.ByteString> s_ = java.util.Collections.emptyList();
       private void ensureSIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
           s_ = new java.util.ArrayList<com.google.protobuf.ByteString>(s_);
           bitField0_ |= 0x00000001;
          }
       }
+      /**
+       * <code>repeated bytes s = 1;</code>
+       */
       public java.util.List<com.google.protobuf.ByteString>
           getSList() {
         return java.util.Collections.unmodifiableList(s_);
       }
+      /**
+       * <code>repeated bytes s = 1;</code>
+       */
       public int getSCount() {
         return s_.size();
       }
+      /**
+       * <code>repeated bytes s = 1;</code>
+       */
       public com.google.protobuf.ByteString getS(int index) {
         return s_.get(index);
       }
+      /**
+       * <code>repeated bytes s = 1;</code>
+       */
       public Builder setS(
           int index, com.google.protobuf.ByteString value) {
         if (value == null) {
@@ -3376,6 +4960,9 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated bytes s = 1;</code>
+       */
       public Builder addS(com.google.protobuf.ByteString value) {
         if (value == null) {
     throw new NullPointerException();
@@ -3385,137 +4972,364 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated bytes s = 1;</code>
+       */
       public Builder addAllS(
           java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
         ensureSIsMutable();
-        super.addAll(values, s_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, s_);
         
         return this;
       }
+      /**
+       * <code>repeated bytes s = 1;</code>
+       */
       public Builder clearS() {
-        s_ = java.util.Collections.emptyList();;
+        s_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000001);
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.StringTable)
     }
-    
+
     static {
       defaultInstance = new StringTable(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.StringTable)
   }
-  
-  public interface InfoOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // optional int32 version = 1 [default = -1];
+
+  public interface InfoOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.Info)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>optional int32 version = 1 [default = -1];</code>
+     */
     boolean hasVersion();
+    /**
+     * <code>optional int32 version = 1 [default = -1];</code>
+     */
     int getVersion();
-    
-    // optional int64 timestamp = 2;
+
+    /**
+     * <code>optional int64 timestamp = 2;</code>
+     */
     boolean hasTimestamp();
+    /**
+     * <code>optional int64 timestamp = 2;</code>
+     */
     long getTimestamp();
-    
-    // optional int64 changeset = 3;
+
+    /**
+     * <code>optional int64 changeset = 3;</code>
+     */
     boolean hasChangeset();
+    /**
+     * <code>optional int64 changeset = 3;</code>
+     */
     long getChangeset();
-    
-    // optional int32 uid = 4;
+
+    /**
+     * <code>optional int32 uid = 4;</code>
+     */
     boolean hasUid();
+    /**
+     * <code>optional int32 uid = 4;</code>
+     */
     int getUid();
-    
-    // optional uint32 user_sid = 5;
+
+    /**
+     * <code>optional uint32 user_sid = 5;</code>
+     *
+     * <pre>
+     * String IDs
+     * </pre>
+     */
     boolean hasUserSid();
+    /**
+     * <code>optional uint32 user_sid = 5;</code>
+     *
+     * <pre>
+     * String IDs
+     * </pre>
+     */
     int getUserSid();
-    
-    // optional bool visible = 6;
+
+    /**
+     * <code>optional bool visible = 6;</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     boolean hasVisible();
+    /**
+     * <code>optional bool visible = 6;</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     boolean getVisible();
   }
+  /**
+   * Protobuf type {@code OSMPBF.Info}
+   *
+   * <pre>
+   * Optional metadata that may be included into each primitive. 
+   * </pre>
+   */
   public static final class Info extends
-      com.google.protobuf.GeneratedMessageLite
-      implements InfoOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.Info)
+      InfoOrBuilder {
     // Use Info.newBuilder() to construct.
-    private Info(Builder builder) {
+    private Info(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private Info(boolean noInit) {}
-    
+    private Info(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final Info defaultInstance;
     public static Info getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public Info getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private Info(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              bitField0_ |= 0x00000001;
+              version_ = input.readInt32();
+              break;
+            }
+            case 16: {
+              bitField0_ |= 0x00000002;
+              timestamp_ = input.readInt64();
+              break;
+            }
+            case 24: {
+              bitField0_ |= 0x00000004;
+              changeset_ = input.readInt64();
+              break;
+            }
+            case 32: {
+              bitField0_ |= 0x00000008;
+              uid_ = input.readInt32();
+              break;
+            }
+            case 40: {
+              bitField0_ |= 0x00000010;
+              userSid_ = input.readUInt32();
+              break;
+            }
+            case 48: {
+              bitField0_ |= 0x00000020;
+              visible_ = input.readBool();
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<Info> PARSER =
+        new com.google.protobuf.AbstractParser<Info>() {
+      public Info parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Info(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Info> getParserForType() {
+      return PARSER;
+    }
+
     private int bitField0_;
-    // optional int32 version = 1 [default = -1];
     public static final int VERSION_FIELD_NUMBER = 1;
     private int version_;
+    /**
+     * <code>optional int32 version = 1 [default = -1];</code>
+     */
     public boolean hasVersion() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>optional int32 version = 1 [default = -1];</code>
+     */
     public int getVersion() {
       return version_;
     }
-    
-    // optional int64 timestamp = 2;
+
     public static final int TIMESTAMP_FIELD_NUMBER = 2;
     private long timestamp_;
+    /**
+     * <code>optional int64 timestamp = 2;</code>
+     */
     public boolean hasTimestamp() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>optional int64 timestamp = 2;</code>
+     */
     public long getTimestamp() {
       return timestamp_;
     }
-    
-    // optional int64 changeset = 3;
+
     public static final int CHANGESET_FIELD_NUMBER = 3;
     private long changeset_;
+    /**
+     * <code>optional int64 changeset = 3;</code>
+     */
     public boolean hasChangeset() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
+    /**
+     * <code>optional int64 changeset = 3;</code>
+     */
     public long getChangeset() {
       return changeset_;
     }
-    
-    // optional int32 uid = 4;
+
     public static final int UID_FIELD_NUMBER = 4;
     private int uid_;
+    /**
+     * <code>optional int32 uid = 4;</code>
+     */
     public boolean hasUid() {
       return ((bitField0_ & 0x00000008) == 0x00000008);
     }
+    /**
+     * <code>optional int32 uid = 4;</code>
+     */
     public int getUid() {
       return uid_;
     }
-    
-    // optional uint32 user_sid = 5;
+
     public static final int USER_SID_FIELD_NUMBER = 5;
     private int userSid_;
+    /**
+     * <code>optional uint32 user_sid = 5;</code>
+     *
+     * <pre>
+     * String IDs
+     * </pre>
+     */
     public boolean hasUserSid() {
       return ((bitField0_ & 0x00000010) == 0x00000010);
     }
+    /**
+     * <code>optional uint32 user_sid = 5;</code>
+     *
+     * <pre>
+     * String IDs
+     * </pre>
+     */
     public int getUserSid() {
       return userSid_;
     }
-    
-    // optional bool visible = 6;
+
     public static final int VISIBLE_FIELD_NUMBER = 6;
     private boolean visible_;
+    /**
+     * <code>optional bool visible = 6;</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     public boolean hasVisible() {
       return ((bitField0_ & 0x00000020) == 0x00000020);
     }
+    /**
+     * <code>optional bool visible = 6;</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     public boolean getVisible() {
       return visible_;
     }
-    
+
     private void initFields() {
       version_ = -1;
       timestamp_ = 0L;
@@ -3527,12 +5341,13 @@ public final class Osmformat {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -3554,13 +5369,14 @@ public final class Osmformat {
       if (((bitField0_ & 0x00000020) == 0x00000020)) {
         output.writeBool(6, visible_);
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
@@ -3586,106 +5402,102 @@ public final class Osmformat {
         size += com.google.protobuf.CodedOutputStream
           .computeBoolSize(6, visible_);
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Info parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.Info prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.Info}
+     *
+     * <pre>
+     * Optional metadata that may be included into each primitive. 
+     * </pre>
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.Info, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.Info)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.InfoOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.Info.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         version_ = -1;
@@ -3702,15 +5514,15 @@ public final class Osmformat {
         bitField0_ = (bitField0_ & ~0x00000020);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Info build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.Info result = buildPartial();
         if (!result.isInitialized()) {
@@ -3718,17 +5530,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.Info buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.Info result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Info buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.Info result = new org.openstreetmap.osmosis.osmbinary.Osmformat.Info(this);
         int from_bitField0_ = bitField0_;
@@ -3760,7 +5562,7 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.Info other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance()) return this;
         if (other.hasVersion()) {
@@ -3781,361 +5583,928 @@ public final class Osmformat {
         if (other.hasVisible()) {
           setVisible(other.getVisible());
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 8: {
-              bitField0_ |= 0x00000001;
-              version_ = input.readInt32();
-              break;
-            }
-            case 16: {
-              bitField0_ |= 0x00000002;
-              timestamp_ = input.readInt64();
-              break;
-            }
-            case 24: {
-              bitField0_ |= 0x00000004;
-              changeset_ = input.readInt64();
-              break;
-            }
-            case 32: {
-              bitField0_ |= 0x00000008;
-              uid_ = input.readInt32();
-              break;
-            }
-            case 40: {
-              bitField0_ |= 0x00000010;
-              userSid_ = input.readUInt32();
-              break;
-            }
-            case 48: {
-              bitField0_ |= 0x00000020;
-              visible_ = input.readBool();
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.Info parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.Info) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // optional int32 version = 1 [default = -1];
+
       private int version_ = -1;
+      /**
+       * <code>optional int32 version = 1 [default = -1];</code>
+       */
       public boolean hasVersion() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>optional int32 version = 1 [default = -1];</code>
+       */
       public int getVersion() {
         return version_;
       }
+      /**
+       * <code>optional int32 version = 1 [default = -1];</code>
+       */
       public Builder setVersion(int value) {
         bitField0_ |= 0x00000001;
         version_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int32 version = 1 [default = -1];</code>
+       */
       public Builder clearVersion() {
         bitField0_ = (bitField0_ & ~0x00000001);
         version_ = -1;
         
         return this;
       }
-      
-      // optional int64 timestamp = 2;
+
       private long timestamp_ ;
+      /**
+       * <code>optional int64 timestamp = 2;</code>
+       */
       public boolean hasTimestamp() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
+      /**
+       * <code>optional int64 timestamp = 2;</code>
+       */
       public long getTimestamp() {
         return timestamp_;
       }
+      /**
+       * <code>optional int64 timestamp = 2;</code>
+       */
       public Builder setTimestamp(long value) {
         bitField0_ |= 0x00000002;
         timestamp_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int64 timestamp = 2;</code>
+       */
       public Builder clearTimestamp() {
         bitField0_ = (bitField0_ & ~0x00000002);
         timestamp_ = 0L;
         
         return this;
       }
-      
-      // optional int64 changeset = 3;
+
       private long changeset_ ;
+      /**
+       * <code>optional int64 changeset = 3;</code>
+       */
       public boolean hasChangeset() {
         return ((bitField0_ & 0x00000004) == 0x00000004);
       }
+      /**
+       * <code>optional int64 changeset = 3;</code>
+       */
       public long getChangeset() {
         return changeset_;
       }
+      /**
+       * <code>optional int64 changeset = 3;</code>
+       */
       public Builder setChangeset(long value) {
         bitField0_ |= 0x00000004;
         changeset_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int64 changeset = 3;</code>
+       */
       public Builder clearChangeset() {
         bitField0_ = (bitField0_ & ~0x00000004);
         changeset_ = 0L;
         
         return this;
       }
-      
-      // optional int32 uid = 4;
+
       private int uid_ ;
+      /**
+       * <code>optional int32 uid = 4;</code>
+       */
       public boolean hasUid() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
+      /**
+       * <code>optional int32 uid = 4;</code>
+       */
       public int getUid() {
         return uid_;
       }
+      /**
+       * <code>optional int32 uid = 4;</code>
+       */
       public Builder setUid(int value) {
         bitField0_ |= 0x00000008;
         uid_ = value;
         
         return this;
       }
+      /**
+       * <code>optional int32 uid = 4;</code>
+       */
       public Builder clearUid() {
         bitField0_ = (bitField0_ & ~0x00000008);
         uid_ = 0;
         
         return this;
       }
-      
-      // optional uint32 user_sid = 5;
+
       private int userSid_ ;
+      /**
+       * <code>optional uint32 user_sid = 5;</code>
+       *
+       * <pre>
+       * String IDs
+       * </pre>
+       */
       public boolean hasUserSid() {
         return ((bitField0_ & 0x00000010) == 0x00000010);
       }
+      /**
+       * <code>optional uint32 user_sid = 5;</code>
+       *
+       * <pre>
+       * String IDs
+       * </pre>
+       */
       public int getUserSid() {
         return userSid_;
       }
+      /**
+       * <code>optional uint32 user_sid = 5;</code>
+       *
+       * <pre>
+       * String IDs
+       * </pre>
+       */
       public Builder setUserSid(int value) {
         bitField0_ |= 0x00000010;
         userSid_ = value;
         
         return this;
       }
+      /**
+       * <code>optional uint32 user_sid = 5;</code>
+       *
+       * <pre>
+       * String IDs
+       * </pre>
+       */
       public Builder clearUserSid() {
         bitField0_ = (bitField0_ & ~0x00000010);
         userSid_ = 0;
         
         return this;
       }
-      
-      // optional bool visible = 6;
+
       private boolean visible_ ;
+      /**
+       * <code>optional bool visible = 6;</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public boolean hasVisible() {
         return ((bitField0_ & 0x00000020) == 0x00000020);
       }
+      /**
+       * <code>optional bool visible = 6;</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public boolean getVisible() {
         return visible_;
       }
+      /**
+       * <code>optional bool visible = 6;</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public Builder setVisible(boolean value) {
         bitField0_ |= 0x00000020;
         visible_ = value;
         
         return this;
       }
+      /**
+       * <code>optional bool visible = 6;</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public Builder clearVisible() {
         bitField0_ = (bitField0_ & ~0x00000020);
         visible_ = false;
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.Info)
     }
-    
+
     static {
       defaultInstance = new Info(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.Info)
   }
-  
-  public interface DenseInfoOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // repeated int32 version = 1 [packed = true];
+
+  public interface DenseInfoOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.DenseInfo)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>repeated int32 version = 1 [packed = true];</code>
+     */
     java.util.List<java.lang.Integer> getVersionList();
+    /**
+     * <code>repeated int32 version = 1 [packed = true];</code>
+     */
     int getVersionCount();
+    /**
+     * <code>repeated int32 version = 1 [packed = true];</code>
+     */
     int getVersion(int index);
-    
-    // repeated sint64 timestamp = 2 [packed = true];
+
+    /**
+     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     java.util.List<java.lang.Long> getTimestampList();
+    /**
+     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     int getTimestampCount();
+    /**
+     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     long getTimestamp(int index);
-    
-    // repeated sint64 changeset = 3 [packed = true];
+
+    /**
+     * <code>repeated sint64 changeset = 3 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     java.util.List<java.lang.Long> getChangesetList();
+    /**
+     * <code>repeated sint64 changeset = 3 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     int getChangesetCount();
+    /**
+     * <code>repeated sint64 changeset = 3 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     long getChangeset(int index);
-    
-    // repeated sint32 uid = 4 [packed = true];
+
+    /**
+     * <code>repeated sint32 uid = 4 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     java.util.List<java.lang.Integer> getUidList();
+    /**
+     * <code>repeated sint32 uid = 4 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     int getUidCount();
+    /**
+     * <code>repeated sint32 uid = 4 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     int getUid(int index);
-    
-    // repeated sint32 user_sid = 5 [packed = true];
+
+    /**
+     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs for usernames. DELTA coded
+     * </pre>
+     */
     java.util.List<java.lang.Integer> getUserSidList();
+    /**
+     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs for usernames. DELTA coded
+     * </pre>
+     */
     int getUserSidCount();
+    /**
+     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs for usernames. DELTA coded
+     * </pre>
+     */
     int getUserSid(int index);
-    
-    // repeated bool visible = 6 [packed = true];
+
+    /**
+     * <code>repeated bool visible = 6 [packed = true];</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     java.util.List<java.lang.Boolean> getVisibleList();
+    /**
+     * <code>repeated bool visible = 6 [packed = true];</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     int getVisibleCount();
+    /**
+     * <code>repeated bool visible = 6 [packed = true];</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     boolean getVisible(int index);
   }
+  /**
+   * Protobuf type {@code OSMPBF.DenseInfo}
+   *
+   * <pre>
+   ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes. 
+   * </pre>
+   */
   public static final class DenseInfo extends
-      com.google.protobuf.GeneratedMessageLite
-      implements DenseInfoOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.DenseInfo)
+      DenseInfoOrBuilder {
     // Use DenseInfo.newBuilder() to construct.
-    private DenseInfo(Builder builder) {
+    private DenseInfo(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private DenseInfo(boolean noInit) {}
-    
+    private DenseInfo(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final DenseInfo defaultInstance;
     public static DenseInfo getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public DenseInfo getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
-    // repeated int32 version = 1 [packed = true];
-    public static final int VERSION_FIELD_NUMBER = 1;
-    private java.util.List<java.lang.Integer> version_;
-    public java.util.List<java.lang.Integer>
-        getVersionList() {
-      return version_;
-    }
-    public int getVersionCount() {
-      return version_.size();
-    }
-    public int getVersion(int index) {
-      return version_.get(index);
-    }
-    private int versionMemoizedSerializedSize = -1;
-    
-    // repeated sint64 timestamp = 2 [packed = true];
-    public static final int TIMESTAMP_FIELD_NUMBER = 2;
-    private java.util.List<java.lang.Long> timestamp_;
-    public java.util.List<java.lang.Long>
-        getTimestampList() {
-      return timestamp_;
-    }
-    public int getTimestampCount() {
-      return timestamp_.size();
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private DenseInfo(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+                version_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              version_.add(input.readInt32());
+              break;
+            }
+            case 10: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
+                version_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                version_.add(input.readInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 16: {
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+                timestamp_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              timestamp_.add(input.readSInt64());
+              break;
+            }
+            case 18: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
+                timestamp_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                timestamp_.add(input.readSInt64());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 24: {
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+                changeset_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              changeset_.add(input.readSInt64());
+              break;
+            }
+            case 26: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
+                changeset_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                changeset_.add(input.readSInt64());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 32: {
+              if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+                uid_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000008;
+              }
+              uid_.add(input.readSInt32());
+              break;
+            }
+            case 34: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
+                uid_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000008;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                uid_.add(input.readSInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 40: {
+              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+                userSid_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000010;
+              }
+              userSid_.add(input.readSInt32());
+              break;
+            }
+            case 42: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
+                userSid_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000010;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                userSid_.add(input.readSInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 48: {
+              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+                visible_ = new java.util.ArrayList<java.lang.Boolean>();
+                mutable_bitField0_ |= 0x00000020;
+              }
+              visible_.add(input.readBool());
+              break;
+            }
+            case 50: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
+                visible_ = new java.util.ArrayList<java.lang.Boolean>();
+                mutable_bitField0_ |= 0x00000020;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                visible_.add(input.readBool());
+              }
+              input.popLimit(limit);
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+          version_ = java.util.Collections.unmodifiableList(version_);
+        }
+        if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+          timestamp_ = java.util.Collections.unmodifiableList(timestamp_);
+        }
+        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+          changeset_ = java.util.Collections.unmodifiableList(changeset_);
+        }
+        if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+          uid_ = java.util.Collections.unmodifiableList(uid_);
+        }
+        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+          userSid_ = java.util.Collections.unmodifiableList(userSid_);
+        }
+        if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+          visible_ = java.util.Collections.unmodifiableList(visible_);
+        }
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<DenseInfo> PARSER =
+        new com.google.protobuf.AbstractParser<DenseInfo>() {
+      public DenseInfo parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new DenseInfo(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<DenseInfo> getParserForType() {
+      return PARSER;
+    }
+
+    public static final int VERSION_FIELD_NUMBER = 1;
+    private java.util.List<java.lang.Integer> version_;
+    /**
+     * <code>repeated int32 version = 1 [packed = true];</code>
+     */
+    public java.util.List<java.lang.Integer>
+        getVersionList() {
+      return version_;
+    }
+    /**
+     * <code>repeated int32 version = 1 [packed = true];</code>
+     */
+    public int getVersionCount() {
+      return version_.size();
+    }
+    /**
+     * <code>repeated int32 version = 1 [packed = true];</code>
+     */
+    public int getVersion(int index) {
+      return version_.get(index);
+    }
+    private int versionMemoizedSerializedSize = -1;
+
+    public static final int TIMESTAMP_FIELD_NUMBER = 2;
+    private java.util.List<java.lang.Long> timestamp_;
+    /**
+     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
+    public java.util.List<java.lang.Long>
+        getTimestampList() {
+      return timestamp_;
     }
+    /**
+     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
+    public int getTimestampCount() {
+      return timestamp_.size();
+    }
+    /**
+     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public long getTimestamp(int index) {
       return timestamp_.get(index);
     }
     private int timestampMemoizedSerializedSize = -1;
-    
-    // repeated sint64 changeset = 3 [packed = true];
+
     public static final int CHANGESET_FIELD_NUMBER = 3;
     private java.util.List<java.lang.Long> changeset_;
+    /**
+     * <code>repeated sint64 changeset = 3 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public java.util.List<java.lang.Long>
         getChangesetList() {
       return changeset_;
     }
+    /**
+     * <code>repeated sint64 changeset = 3 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public int getChangesetCount() {
       return changeset_.size();
     }
+    /**
+     * <code>repeated sint64 changeset = 3 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public long getChangeset(int index) {
       return changeset_.get(index);
     }
     private int changesetMemoizedSerializedSize = -1;
-    
-    // repeated sint32 uid = 4 [packed = true];
+
     public static final int UID_FIELD_NUMBER = 4;
     private java.util.List<java.lang.Integer> uid_;
+    /**
+     * <code>repeated sint32 uid = 4 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public java.util.List<java.lang.Integer>
         getUidList() {
       return uid_;
     }
+    /**
+     * <code>repeated sint32 uid = 4 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public int getUidCount() {
       return uid_.size();
     }
+    /**
+     * <code>repeated sint32 uid = 4 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public int getUid(int index) {
       return uid_.get(index);
     }
     private int uidMemoizedSerializedSize = -1;
-    
-    // repeated sint32 user_sid = 5 [packed = true];
+
     public static final int USER_SID_FIELD_NUMBER = 5;
     private java.util.List<java.lang.Integer> userSid_;
+    /**
+     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs for usernames. DELTA coded
+     * </pre>
+     */
     public java.util.List<java.lang.Integer>
         getUserSidList() {
       return userSid_;
     }
+    /**
+     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs for usernames. DELTA coded
+     * </pre>
+     */
     public int getUserSidCount() {
       return userSid_.size();
     }
+    /**
+     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs for usernames. DELTA coded
+     * </pre>
+     */
     public int getUserSid(int index) {
       return userSid_.get(index);
     }
     private int userSidMemoizedSerializedSize = -1;
-    
-    // repeated bool visible = 6 [packed = true];
+
     public static final int VISIBLE_FIELD_NUMBER = 6;
     private java.util.List<java.lang.Boolean> visible_;
+    /**
+     * <code>repeated bool visible = 6 [packed = true];</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     public java.util.List<java.lang.Boolean>
         getVisibleList() {
       return visible_;
     }
+    /**
+     * <code>repeated bool visible = 6 [packed = true];</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     public int getVisibleCount() {
       return visible_.size();
     }
+    /**
+     * <code>repeated bool visible = 6 [packed = true];</code>
+     *
+     * <pre>
+     * The visible flag is used to store history information. It indicates that
+     * the current object version has been created by a delete operation on the
+     * OSM API.
+     * When a writer sets this flag, it MUST add a required_features tag with
+     * value "HistoricalInformation" to the HeaderBlock.
+     * If this flag is not available for some object it MUST be assumed to be
+     * true if the file has the required_features tag "HistoricalInformation"
+     * set.
+     * </pre>
+     */
     public boolean getVisible(int index) {
       return visible_.get(index);
     }
     private int visibleMemoizedSerializedSize = -1;
-    
+
     private void initFields() {
-      version_ = java.util.Collections.emptyList();;
-      timestamp_ = java.util.Collections.emptyList();;
-      changeset_ = java.util.Collections.emptyList();;
-      uid_ = java.util.Collections.emptyList();;
-      userSid_ = java.util.Collections.emptyList();;
-      visible_ = java.util.Collections.emptyList();;
+      version_ = java.util.Collections.emptyList();
+      timestamp_ = java.util.Collections.emptyList();
+      changeset_ = java.util.Collections.emptyList();
+      uid_ = java.util.Collections.emptyList();
+      userSid_ = java.util.Collections.emptyList();
+      visible_ = java.util.Collections.emptyList();
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -4181,13 +6550,14 @@ public final class Osmformat {
       for (int i = 0; i < visible_.size(); i++) {
         output.writeBoolNoTag(visible_.get(i));
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       {
         int dataSize = 0;
@@ -4270,131 +6640,127 @@ public final class Osmformat {
         }
         visibleMemoizedSerializedSize = dataSize;
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.DenseInfo}
+     *
+     * <pre>
+     ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes. 
+     * </pre>
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfoOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.DenseInfo)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfoOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
-        version_ = java.util.Collections.emptyList();;
+        version_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000001);
-        timestamp_ = java.util.Collections.emptyList();;
+        timestamp_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000002);
-        changeset_ = java.util.Collections.emptyList();;
+        changeset_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
-        uid_ = java.util.Collections.emptyList();;
+        uid_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000008);
-        userSid_ = java.util.Collections.emptyList();;
+        userSid_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000010);
-        visible_ = java.util.Collections.emptyList();;
+        visible_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000020);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo result = buildPartial();
         if (!result.isInitialized()) {
@@ -4402,17 +6768,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo result = new org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo(this);
         int from_bitField0_ = bitField0_;
@@ -4448,7 +6804,7 @@ public final class Osmformat {
         result.visible_ = visible_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance()) return this;
         if (!other.version_.isEmpty()) {
@@ -4511,138 +6867,63 @@ public final class Osmformat {
           }
           
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 8: {
-              ensureVersionIsMutable();
-              version_.add(input.readInt32());
-              break;
-            }
-            case 10: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addVersion(input.readInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 16: {
-              ensureTimestampIsMutable();
-              timestamp_.add(input.readSInt64());
-              break;
-            }
-            case 18: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addTimestamp(input.readSInt64());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 24: {
-              ensureChangesetIsMutable();
-              changeset_.add(input.readSInt64());
-              break;
-            }
-            case 26: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addChangeset(input.readSInt64());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 32: {
-              ensureUidIsMutable();
-              uid_.add(input.readSInt32());
-              break;
-            }
-            case 34: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addUid(input.readSInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 40: {
-              ensureUserSidIsMutable();
-              userSid_.add(input.readSInt32());
-              break;
-            }
-            case 42: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addUserSid(input.readSInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 48: {
-              ensureVisibleIsMutable();
-              visible_.add(input.readBool());
-              break;
-            }
-            case 50: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addVisible(input.readBool());
-              }
-              input.popLimit(limit);
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // repeated int32 version = 1 [packed = true];
-      private java.util.List<java.lang.Integer> version_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> version_ = java.util.Collections.emptyList();
       private void ensureVersionIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
           version_ = new java.util.ArrayList<java.lang.Integer>(version_);
           bitField0_ |= 0x00000001;
          }
       }
+      /**
+       * <code>repeated int32 version = 1 [packed = true];</code>
+       */
       public java.util.List<java.lang.Integer>
           getVersionList() {
         return java.util.Collections.unmodifiableList(version_);
       }
+      /**
+       * <code>repeated int32 version = 1 [packed = true];</code>
+       */
       public int getVersionCount() {
         return version_.size();
       }
+      /**
+       * <code>repeated int32 version = 1 [packed = true];</code>
+       */
       public int getVersion(int index) {
         return version_.get(index);
       }
+      /**
+       * <code>repeated int32 version = 1 [packed = true];</code>
+       */
       public Builder setVersion(
           int index, int value) {
         ensureVersionIsMutable();
@@ -4650,44 +6931,81 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated int32 version = 1 [packed = true];</code>
+       */
       public Builder addVersion(int value) {
         ensureVersionIsMutable();
         version_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated int32 version = 1 [packed = true];</code>
+       */
       public Builder addAllVersion(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureVersionIsMutable();
-        super.addAll(values, version_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, version_);
         
         return this;
       }
+      /**
+       * <code>repeated int32 version = 1 [packed = true];</code>
+       */
       public Builder clearVersion() {
-        version_ = java.util.Collections.emptyList();;
+        version_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000001);
         
         return this;
       }
-      
-      // repeated sint64 timestamp = 2 [packed = true];
-      private java.util.List<java.lang.Long> timestamp_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Long> timestamp_ = java.util.Collections.emptyList();
       private void ensureTimestampIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
           timestamp_ = new java.util.ArrayList<java.lang.Long>(timestamp_);
           bitField0_ |= 0x00000002;
          }
       }
+      /**
+       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public java.util.List<java.lang.Long>
           getTimestampList() {
         return java.util.Collections.unmodifiableList(timestamp_);
       }
+      /**
+       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public int getTimestampCount() {
         return timestamp_.size();
       }
+      /**
+       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public long getTimestamp(int index) {
         return timestamp_.get(index);
       }
+      /**
+       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder setTimestamp(
           int index, long value) {
         ensureTimestampIsMutable();
@@ -4695,44 +7013,93 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addTimestamp(long value) {
         ensureTimestampIsMutable();
         timestamp_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addAllTimestamp(
           java.lang.Iterable<? extends java.lang.Long> values) {
         ensureTimestampIsMutable();
-        super.addAll(values, timestamp_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, timestamp_);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder clearTimestamp() {
-        timestamp_ = java.util.Collections.emptyList();;
+        timestamp_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000002);
         
         return this;
       }
-      
-      // repeated sint64 changeset = 3 [packed = true];
-      private java.util.List<java.lang.Long> changeset_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Long> changeset_ = java.util.Collections.emptyList();
       private void ensureChangesetIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
           changeset_ = new java.util.ArrayList<java.lang.Long>(changeset_);
           bitField0_ |= 0x00000004;
          }
       }
+      /**
+       * <code>repeated sint64 changeset = 3 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public java.util.List<java.lang.Long>
           getChangesetList() {
         return java.util.Collections.unmodifiableList(changeset_);
       }
+      /**
+       * <code>repeated sint64 changeset = 3 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public int getChangesetCount() {
         return changeset_.size();
       }
+      /**
+       * <code>repeated sint64 changeset = 3 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public long getChangeset(int index) {
         return changeset_.get(index);
       }
+      /**
+       * <code>repeated sint64 changeset = 3 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder setChangeset(
           int index, long value) {
         ensureChangesetIsMutable();
@@ -4740,44 +7107,93 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated sint64 changeset = 3 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addChangeset(long value) {
         ensureChangesetIsMutable();
         changeset_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 changeset = 3 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addAllChangeset(
           java.lang.Iterable<? extends java.lang.Long> values) {
         ensureChangesetIsMutable();
-        super.addAll(values, changeset_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, changeset_);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 changeset = 3 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder clearChangeset() {
-        changeset_ = java.util.Collections.emptyList();;
+        changeset_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
         
         return this;
       }
-      
-      // repeated sint32 uid = 4 [packed = true];
-      private java.util.List<java.lang.Integer> uid_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> uid_ = java.util.Collections.emptyList();
       private void ensureUidIsMutable() {
         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
           uid_ = new java.util.ArrayList<java.lang.Integer>(uid_);
           bitField0_ |= 0x00000008;
          }
       }
+      /**
+       * <code>repeated sint32 uid = 4 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public java.util.List<java.lang.Integer>
           getUidList() {
         return java.util.Collections.unmodifiableList(uid_);
       }
+      /**
+       * <code>repeated sint32 uid = 4 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public int getUidCount() {
         return uid_.size();
       }
+      /**
+       * <code>repeated sint32 uid = 4 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public int getUid(int index) {
         return uid_.get(index);
       }
+      /**
+       * <code>repeated sint32 uid = 4 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder setUid(
           int index, int value) {
         ensureUidIsMutable();
@@ -4785,44 +7201,93 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated sint32 uid = 4 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addUid(int value) {
         ensureUidIsMutable();
         uid_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated sint32 uid = 4 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addAllUid(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureUidIsMutable();
-        super.addAll(values, uid_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, uid_);
         
         return this;
       }
+      /**
+       * <code>repeated sint32 uid = 4 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder clearUid() {
-        uid_ = java.util.Collections.emptyList();;
+        uid_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000008);
         
         return this;
       }
-      
-      // repeated sint32 user_sid = 5 [packed = true];
-      private java.util.List<java.lang.Integer> userSid_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> userSid_ = java.util.Collections.emptyList();
       private void ensureUserSidIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
           userSid_ = new java.util.ArrayList<java.lang.Integer>(userSid_);
           bitField0_ |= 0x00000010;
          }
       }
+      /**
+       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs for usernames. DELTA coded
+       * </pre>
+       */
       public java.util.List<java.lang.Integer>
           getUserSidList() {
         return java.util.Collections.unmodifiableList(userSid_);
       }
+      /**
+       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs for usernames. DELTA coded
+       * </pre>
+       */
       public int getUserSidCount() {
         return userSid_.size();
       }
+      /**
+       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs for usernames. DELTA coded
+       * </pre>
+       */
       public int getUserSid(int index) {
         return userSid_.get(index);
       }
+      /**
+       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs for usernames. DELTA coded
+       * </pre>
+       */
       public Builder setUserSid(
           int index, int value) {
         ensureUserSidIsMutable();
@@ -4830,44 +7295,121 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs for usernames. DELTA coded
+       * </pre>
+       */
       public Builder addUserSid(int value) {
         ensureUserSidIsMutable();
         userSid_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs for usernames. DELTA coded
+       * </pre>
+       */
       public Builder addAllUserSid(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureUserSidIsMutable();
-        super.addAll(values, userSid_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, userSid_);
         
         return this;
       }
+      /**
+       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs for usernames. DELTA coded
+       * </pre>
+       */
       public Builder clearUserSid() {
-        userSid_ = java.util.Collections.emptyList();;
+        userSid_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000010);
         
         return this;
       }
-      
-      // repeated bool visible = 6 [packed = true];
-      private java.util.List<java.lang.Boolean> visible_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Boolean> visible_ = java.util.Collections.emptyList();
       private void ensureVisibleIsMutable() {
         if (!((bitField0_ & 0x00000020) == 0x00000020)) {
           visible_ = new java.util.ArrayList<java.lang.Boolean>(visible_);
           bitField0_ |= 0x00000020;
          }
       }
+      /**
+       * <code>repeated bool visible = 6 [packed = true];</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public java.util.List<java.lang.Boolean>
           getVisibleList() {
         return java.util.Collections.unmodifiableList(visible_);
       }
+      /**
+       * <code>repeated bool visible = 6 [packed = true];</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public int getVisibleCount() {
         return visible_.size();
       }
+      /**
+       * <code>repeated bool visible = 6 [packed = true];</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public boolean getVisible(int index) {
         return visible_.get(index);
       }
+      /**
+       * <code>repeated bool visible = 6 [packed = true];</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public Builder setVisible(
           int index, boolean value) {
         ensureVisibleIsMutable();
@@ -4875,81 +7417,243 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated bool visible = 6 [packed = true];</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public Builder addVisible(boolean value) {
         ensureVisibleIsMutable();
         visible_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated bool visible = 6 [packed = true];</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public Builder addAllVisible(
           java.lang.Iterable<? extends java.lang.Boolean> values) {
         ensureVisibleIsMutable();
-        super.addAll(values, visible_);
-        
-        return this;
-      }
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, visible_);
+        
+        return this;
+      }
+      /**
+       * <code>repeated bool visible = 6 [packed = true];</code>
+       *
+       * <pre>
+       * The visible flag is used to store history information. It indicates that
+       * the current object version has been created by a delete operation on the
+       * OSM API.
+       * When a writer sets this flag, it MUST add a required_features tag with
+       * value "HistoricalInformation" to the HeaderBlock.
+       * If this flag is not available for some object it MUST be assumed to be
+       * true if the file has the required_features tag "HistoricalInformation"
+       * set.
+       * </pre>
+       */
       public Builder clearVisible() {
-        visible_ = java.util.Collections.emptyList();;
+        visible_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000020);
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.DenseInfo)
     }
-    
+
     static {
       defaultInstance = new DenseInfo(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.DenseInfo)
   }
-  
-  public interface ChangeSetOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // required int64 id = 1;
+
+  public interface ChangeSetOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.ChangeSet)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>required int64 id = 1;</code>
+     *
+     * <pre>
+     *   
+     *   // Parallel arrays.
+     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
+     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
+     *   optional Info info = 4;
+     * </pre>
+     */
     boolean hasId();
+    /**
+     * <code>required int64 id = 1;</code>
+     *
+     * <pre>
+     *   
+     *   // Parallel arrays.
+     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
+     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
+     *   optional Info info = 4;
+     * </pre>
+     */
     long getId();
   }
+  /**
+   * Protobuf type {@code OSMPBF.ChangeSet}
+   *
+   * <pre>
+   * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
+   * TODO:    REMOVE THIS?
+   * </pre>
+   */
   public static final class ChangeSet extends
-      com.google.protobuf.GeneratedMessageLite
-      implements ChangeSetOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.ChangeSet)
+      ChangeSetOrBuilder {
     // Use ChangeSet.newBuilder() to construct.
-    private ChangeSet(Builder builder) {
+    private ChangeSet(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private ChangeSet(boolean noInit) {}
-    
+    private ChangeSet(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final ChangeSet defaultInstance;
     public static ChangeSet getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public ChangeSet getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private ChangeSet(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              bitField0_ |= 0x00000001;
+              id_ = input.readInt64();
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<ChangeSet> PARSER =
+        new com.google.protobuf.AbstractParser<ChangeSet>() {
+      public ChangeSet parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new ChangeSet(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<ChangeSet> getParserForType() {
+      return PARSER;
+    }
+
     private int bitField0_;
-    // required int64 id = 1;
     public static final int ID_FIELD_NUMBER = 1;
     private long id_;
+    /**
+     * <code>required int64 id = 1;</code>
+     *
+     * <pre>
+     *   
+     *   // Parallel arrays.
+     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
+     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
+     *   optional Info info = 4;
+     * </pre>
+     */
     public boolean hasId() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>required int64 id = 1;</code>
+     *
+     * <pre>
+     *   
+     *   // Parallel arrays.
+     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
+     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
+     *   optional Info info = 4;
+     * </pre>
+     */
     public long getId() {
       return id_;
     }
-    
+
     private void initFields() {
       id_ = 0L;
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (!hasId()) {
         memoizedIsInitialized = 0;
         return false;
@@ -4957,140 +7661,138 @@ public final class Osmformat {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         output.writeInt64(1, id_);
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
           .computeInt64Size(1, id_);
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.ChangeSet}
+     *
+     * <pre>
+     * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
+     * TODO:    REMOVE THIS?
+     * </pre>
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.ChangeSet)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSetOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         id_ = 0L;
         bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet result = buildPartial();
         if (!result.isInitialized()) {
@@ -5098,17 +7800,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet result = new org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet(this);
         int from_bitField0_ = bitField0_;
@@ -5120,15 +7812,17 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet.getDefaultInstance()) return this;
         if (other.hasId()) {
           setId(other.getId());
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (!hasId()) {
           
@@ -5136,189 +7830,501 @@ public final class Osmformat {
         }
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 8: {
-              bitField0_ |= 0x00000001;
-              id_ = input.readInt64();
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.ChangeSet) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // required int64 id = 1;
+
       private long id_ ;
+      /**
+       * <code>required int64 id = 1;</code>
+       *
+       * <pre>
+       *   
+       *   // Parallel arrays.
+       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
+       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
+       *   optional Info info = 4;
+       * </pre>
+       */
       public boolean hasId() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>required int64 id = 1;</code>
+       *
+       * <pre>
+       *   
+       *   // Parallel arrays.
+       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
+       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
+       *   optional Info info = 4;
+       * </pre>
+       */
       public long getId() {
         return id_;
       }
+      /**
+       * <code>required int64 id = 1;</code>
+       *
+       * <pre>
+       *   
+       *   // Parallel arrays.
+       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
+       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
+       *   optional Info info = 4;
+       * </pre>
+       */
       public Builder setId(long value) {
         bitField0_ |= 0x00000001;
         id_ = value;
         
         return this;
       }
+      /**
+       * <code>required int64 id = 1;</code>
+       *
+       * <pre>
+       *   
+       *   // Parallel arrays.
+       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
+       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
+       *   optional Info info = 4;
+       * </pre>
+       */
       public Builder clearId() {
         bitField0_ = (bitField0_ & ~0x00000001);
         id_ = 0L;
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.ChangeSet)
     }
-    
+
     static {
       defaultInstance = new ChangeSet(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.ChangeSet)
   }
-  
-  public interface NodeOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // required sint64 id = 1;
+
+  public interface NodeOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.Node)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>required sint64 id = 1;</code>
+     */
     boolean hasId();
+    /**
+     * <code>required sint64 id = 1;</code>
+     */
     long getId();
-    
-    // repeated uint32 keys = 2 [packed = true];
+
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     java.util.List<java.lang.Integer> getKeysList();
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     int getKeysCount();
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     int getKeys(int index);
-    
-    // repeated uint32 vals = 3 [packed = true];
+
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs.
+     * </pre>
+     */
     java.util.List<java.lang.Integer> getValsList();
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs.
+     * </pre>
+     */
     int getValsCount();
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs.
+     * </pre>
+     */
     int getVals(int index);
-    
-    // optional .OSMPBF.Info info = 4;
+
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     *
+     * <pre>
+     * May be omitted in omitmeta
+     * </pre>
+     */
     boolean hasInfo();
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     *
+     * <pre>
+     * May be omitted in omitmeta
+     * </pre>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo();
-    
-    // required sint64 lat = 8;
+
+    /**
+     * <code>required sint64 lat = 8;</code>
+     */
     boolean hasLat();
+    /**
+     * <code>required sint64 lat = 8;</code>
+     */
     long getLat();
-    
-    // required sint64 lon = 9;
+
+    /**
+     * <code>required sint64 lon = 9;</code>
+     */
     boolean hasLon();
+    /**
+     * <code>required sint64 lon = 9;</code>
+     */
     long getLon();
   }
+  /**
+   * Protobuf type {@code OSMPBF.Node}
+   */
   public static final class Node extends
-      com.google.protobuf.GeneratedMessageLite
-      implements NodeOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.Node)
+      NodeOrBuilder {
     // Use Node.newBuilder() to construct.
-    private Node(Builder builder) {
+    private Node(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private Node(boolean noInit) {}
-    
+    private Node(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final Node defaultInstance;
     public static Node getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public Node getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private Node(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              bitField0_ |= 0x00000001;
+              id_ = input.readSInt64();
+              break;
+            }
+            case 16: {
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              keys_.add(input.readUInt32());
+              break;
+            }
+            case 18: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
+                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                keys_.add(input.readUInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 24: {
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              vals_.add(input.readUInt32());
+              break;
+            }
+            case 26: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
+                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                vals_.add(input.readUInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 34: {
+              org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000002) == 0x00000002)) {
+                subBuilder = info_.toBuilder();
+              }
+              info_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Info.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(info_);
+                info_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000002;
+              break;
+            }
+            case 64: {
+              bitField0_ |= 0x00000004;
+              lat_ = input.readSInt64();
+              break;
+            }
+            case 72: {
+              bitField0_ |= 0x00000008;
+              lon_ = input.readSInt64();
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+          keys_ = java.util.Collections.unmodifiableList(keys_);
+        }
+        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+          vals_ = java.util.Collections.unmodifiableList(vals_);
+        }
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<Node> PARSER =
+        new com.google.protobuf.AbstractParser<Node>() {
+      public Node parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Node(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Node> getParserForType() {
+      return PARSER;
+    }
+
     private int bitField0_;
-    // required sint64 id = 1;
     public static final int ID_FIELD_NUMBER = 1;
     private long id_;
+    /**
+     * <code>required sint64 id = 1;</code>
+     */
     public boolean hasId() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>required sint64 id = 1;</code>
+     */
     public long getId() {
       return id_;
     }
-    
-    // repeated uint32 keys = 2 [packed = true];
+
     public static final int KEYS_FIELD_NUMBER = 2;
     private java.util.List<java.lang.Integer> keys_;
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     public java.util.List<java.lang.Integer>
         getKeysList() {
       return keys_;
     }
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     public int getKeysCount() {
       return keys_.size();
     }
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     public int getKeys(int index) {
       return keys_.get(index);
     }
     private int keysMemoizedSerializedSize = -1;
-    
-    // repeated uint32 vals = 3 [packed = true];
+
     public static final int VALS_FIELD_NUMBER = 3;
     private java.util.List<java.lang.Integer> vals_;
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs.
+     * </pre>
+     */
     public java.util.List<java.lang.Integer>
         getValsList() {
       return vals_;
     }
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs.
+     * </pre>
+     */
     public int getValsCount() {
       return vals_.size();
     }
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     *
+     * <pre>
+     * String IDs.
+     * </pre>
+     */
     public int getVals(int index) {
       return vals_.get(index);
     }
     private int valsMemoizedSerializedSize = -1;
-    
-    // optional .OSMPBF.Info info = 4;
+
     public static final int INFO_FIELD_NUMBER = 4;
     private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_;
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     *
+     * <pre>
+     * May be omitted in omitmeta
+     * </pre>
+     */
     public boolean hasInfo() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     *
+     * <pre>
+     * May be omitted in omitmeta
+     * </pre>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
       return info_;
     }
-    
-    // required sint64 lat = 8;
+
     public static final int LAT_FIELD_NUMBER = 8;
     private long lat_;
+    /**
+     * <code>required sint64 lat = 8;</code>
+     */
     public boolean hasLat() {
       return ((bitField0_ & 0x00000004) == 0x00000004);
     }
+    /**
+     * <code>required sint64 lat = 8;</code>
+     */
     public long getLat() {
       return lat_;
     }
-    
-    // required sint64 lon = 9;
+
     public static final int LON_FIELD_NUMBER = 9;
     private long lon_;
+    /**
+     * <code>required sint64 lon = 9;</code>
+     */
     public boolean hasLon() {
       return ((bitField0_ & 0x00000008) == 0x00000008);
     }
+    /**
+     * <code>required sint64 lon = 9;</code>
+     */
     public long getLon() {
       return lon_;
     }
-    
+
     private void initFields() {
       id_ = 0L;
-      keys_ = java.util.Collections.emptyList();;
-      vals_ = java.util.Collections.emptyList();;
+      keys_ = java.util.Collections.emptyList();
+      vals_ = java.util.Collections.emptyList();
       info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
       lat_ = 0L;
       lon_ = 0L;
@@ -5326,8 +8332,9 @@ public final class Osmformat {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (!hasId()) {
         memoizedIsInitialized = 0;
         return false;
@@ -5343,7 +8350,7 @@ public final class Osmformat {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -5373,13 +8380,14 @@ public final class Osmformat {
       if (((bitField0_ & 0x00000008) == 0x00000008)) {
         output.writeSInt64(9, lon_);
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
@@ -5425,113 +8433,105 @@ public final class Osmformat {
         size += com.google.protobuf.CodedOutputStream
           .computeSInt64Size(9, lon_);
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Node parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.Node prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.Node}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.Node, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.Node)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.NodeOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.Node.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         id_ = 0L;
         bitField0_ = (bitField0_ & ~0x00000001);
-        keys_ = java.util.Collections.emptyList();;
+        keys_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000002);
-        vals_ = java.util.Collections.emptyList();;
+        vals_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
         info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
         bitField0_ = (bitField0_ & ~0x00000008);
@@ -5541,15 +8541,15 @@ public final class Osmformat {
         bitField0_ = (bitField0_ & ~0x00000020);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Node getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.Node.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Node build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.Node result = buildPartial();
         if (!result.isInitialized()) {
@@ -5557,17 +8557,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.Node buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.Node result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Node buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.Node result = new org.openstreetmap.osmosis.osmbinary.Osmformat.Node(this);
         int from_bitField0_ = bitField0_;
@@ -5601,7 +8591,7 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.Node other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.Node.getDefaultInstance()) return this;
         if (other.hasId()) {
@@ -5636,9 +8626,11 @@ public final class Osmformat {
         if (other.hasLon()) {
           setLon(other.getLon());
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (!hasId()) {
           
@@ -5654,121 +8646,103 @@ public final class Osmformat {
         }
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 8: {
-              bitField0_ |= 0x00000001;
-              id_ = input.readSInt64();
-              break;
-            }
-            case 16: {
-              ensureKeysIsMutable();
-              keys_.add(input.readUInt32());
-              break;
-            }
-            case 18: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addKeys(input.readUInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 24: {
-              ensureValsIsMutable();
-              vals_.add(input.readUInt32());
-              break;
-            }
-            case 26: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addVals(input.readUInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 34: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.newBuilder();
-              if (hasInfo()) {
-                subBuilder.mergeFrom(getInfo());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setInfo(subBuilder.buildPartial());
-              break;
-            }
-            case 64: {
-              bitField0_ |= 0x00000010;
-              lat_ = input.readSInt64();
-              break;
-            }
-            case 72: {
-              bitField0_ |= 0x00000020;
-              lon_ = input.readSInt64();
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.Node parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.Node) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // required sint64 id = 1;
+
       private long id_ ;
+      /**
+       * <code>required sint64 id = 1;</code>
+       */
       public boolean hasId() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>required sint64 id = 1;</code>
+       */
       public long getId() {
         return id_;
       }
+      /**
+       * <code>required sint64 id = 1;</code>
+       */
       public Builder setId(long value) {
         bitField0_ |= 0x00000001;
         id_ = value;
         
         return this;
       }
+      /**
+       * <code>required sint64 id = 1;</code>
+       */
       public Builder clearId() {
         bitField0_ = (bitField0_ & ~0x00000001);
         id_ = 0L;
         
         return this;
       }
-      
-      // repeated uint32 keys = 2 [packed = true];
-      private java.util.List<java.lang.Integer> keys_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> keys_ = java.util.Collections.emptyList();
       private void ensureKeysIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
           keys_ = new java.util.ArrayList<java.lang.Integer>(keys_);
           bitField0_ |= 0x00000002;
          }
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public java.util.List<java.lang.Integer>
           getKeysList() {
         return java.util.Collections.unmodifiableList(keys_);
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public int getKeysCount() {
         return keys_.size();
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public int getKeys(int index) {
         return keys_.get(index);
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder setKeys(
           int index, int value) {
         ensureKeysIsMutable();
@@ -5776,44 +8750,93 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder addKeys(int value) {
         ensureKeysIsMutable();
         keys_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder addAllKeys(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureKeysIsMutable();
-        super.addAll(values, keys_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, keys_);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder clearKeys() {
-        keys_ = java.util.Collections.emptyList();;
+        keys_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000002);
         
         return this;
       }
-      
-      // repeated uint32 vals = 3 [packed = true];
-      private java.util.List<java.lang.Integer> vals_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> vals_ = java.util.Collections.emptyList();
       private void ensureValsIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
           vals_ = new java.util.ArrayList<java.lang.Integer>(vals_);
           bitField0_ |= 0x00000004;
          }
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs.
+       * </pre>
+       */
       public java.util.List<java.lang.Integer>
           getValsList() {
         return java.util.Collections.unmodifiableList(vals_);
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs.
+       * </pre>
+       */
       public int getValsCount() {
         return vals_.size();
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs.
+       * </pre>
+       */
       public int getVals(int index) {
         return vals_.get(index);
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs.
+       * </pre>
+       */
       public Builder setVals(
           int index, int value) {
         ensureValsIsMutable();
@@ -5821,50 +8844,106 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs.
+       * </pre>
+       */
       public Builder addVals(int value) {
         ensureValsIsMutable();
         vals_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs.
+       * </pre>
+       */
       public Builder addAllVals(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureValsIsMutable();
-        super.addAll(values, vals_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, vals_);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       *
+       * <pre>
+       * String IDs.
+       * </pre>
+       */
       public Builder clearVals() {
-        vals_ = java.util.Collections.emptyList();;
+        vals_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
         
         return this;
       }
-      
-      // optional .OSMPBF.Info info = 4;
+
       private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       *
+       * <pre>
+       * May be omitted in omitmeta
+       * </pre>
+       */
       public boolean hasInfo() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       *
+       * <pre>
+       * May be omitted in omitmeta
+       * </pre>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
         return info_;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       *
+       * <pre>
+       * May be omitted in omitmeta
+       * </pre>
+       */
       public Builder setInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
         if (value == null) {
           throw new NullPointerException();
         }
         info_ = value;
-        
+
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       *
+       * <pre>
+       * May be omitted in omitmeta
+       * </pre>
+       */
       public Builder setInfo(
           org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder builderForValue) {
         info_ = builderForValue.build();
-        
+
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       *
+       * <pre>
+       * May be omitted in omitmeta
+       * </pre>
+       */
       public Builder mergeInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
         if (((bitField0_ & 0x00000008) == 0x00000008) &&
             info_ != org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance()) {
@@ -5873,202 +8952,593 @@ public final class Osmformat {
         } else {
           info_ = value;
         }
-        
+
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       *
+       * <pre>
+       * May be omitted in omitmeta
+       * </pre>
+       */
       public Builder clearInfo() {
         info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
-        
+
         bitField0_ = (bitField0_ & ~0x00000008);
         return this;
       }
-      
-      // required sint64 lat = 8;
+
       private long lat_ ;
+      /**
+       * <code>required sint64 lat = 8;</code>
+       */
       public boolean hasLat() {
         return ((bitField0_ & 0x00000010) == 0x00000010);
       }
+      /**
+       * <code>required sint64 lat = 8;</code>
+       */
       public long getLat() {
         return lat_;
       }
+      /**
+       * <code>required sint64 lat = 8;</code>
+       */
       public Builder setLat(long value) {
         bitField0_ |= 0x00000010;
         lat_ = value;
         
         return this;
       }
+      /**
+       * <code>required sint64 lat = 8;</code>
+       */
       public Builder clearLat() {
         bitField0_ = (bitField0_ & ~0x00000010);
         lat_ = 0L;
         
         return this;
       }
-      
-      // required sint64 lon = 9;
+
       private long lon_ ;
+      /**
+       * <code>required sint64 lon = 9;</code>
+       */
       public boolean hasLon() {
         return ((bitField0_ & 0x00000020) == 0x00000020);
       }
+      /**
+       * <code>required sint64 lon = 9;</code>
+       */
       public long getLon() {
         return lon_;
       }
+      /**
+       * <code>required sint64 lon = 9;</code>
+       */
       public Builder setLon(long value) {
         bitField0_ |= 0x00000020;
         lon_ = value;
         
         return this;
       }
+      /**
+       * <code>required sint64 lon = 9;</code>
+       */
       public Builder clearLon() {
         bitField0_ = (bitField0_ & ~0x00000020);
         lon_ = 0L;
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.Node)
     }
-    
+
     static {
       defaultInstance = new Node(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.Node)
   }
-  
-  public interface DenseNodesOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // repeated sint64 id = 1 [packed = true];
+
+  public interface DenseNodesOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.DenseNodes)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>repeated sint64 id = 1 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     java.util.List<java.lang.Long> getIdList();
+    /**
+     * <code>repeated sint64 id = 1 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     int getIdCount();
+    /**
+     * <code>repeated sint64 id = 1 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     long getId(int index);
-    
-    // optional .OSMPBF.DenseInfo denseinfo = 5;
+
+    /**
+     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+     *
+     * <pre>
+     *repeated Info info = 4;
+     * </pre>
+     */
     boolean hasDenseinfo();
+    /**
+     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+     *
+     * <pre>
+     *repeated Info info = 4;
+     * </pre>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDenseinfo();
-    
-    // repeated sint64 lat = 8 [packed = true];
+
+    /**
+     * <code>repeated sint64 lat = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     java.util.List<java.lang.Long> getLatList();
+    /**
+     * <code>repeated sint64 lat = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     int getLatCount();
+    /**
+     * <code>repeated sint64 lat = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     long getLat(int index);
-    
-    // repeated sint64 lon = 9 [packed = true];
+
+    /**
+     * <code>repeated sint64 lon = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     java.util.List<java.lang.Long> getLonList();
+    /**
+     * <code>repeated sint64 lon = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     int getLonCount();
+    /**
+     * <code>repeated sint64 lon = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     long getLon(int index);
-    
-    // repeated int32 keys_vals = 10 [packed = true];
+
+    /**
+     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+     *
+     * <pre>
+     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+     * </pre>
+     */
     java.util.List<java.lang.Integer> getKeysValsList();
+    /**
+     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+     *
+     * <pre>
+     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+     * </pre>
+     */
     int getKeysValsCount();
+    /**
+     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+     *
+     * <pre>
+     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+     * </pre>
+     */
     int getKeysVals(int index);
   }
+  /**
+   * Protobuf type {@code OSMPBF.DenseNodes}
+   */
   public static final class DenseNodes extends
-      com.google.protobuf.GeneratedMessageLite
-      implements DenseNodesOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.DenseNodes)
+      DenseNodesOrBuilder {
     // Use DenseNodes.newBuilder() to construct.
-    private DenseNodes(Builder builder) {
+    private DenseNodes(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private DenseNodes(boolean noInit) {}
-    
+    private DenseNodes(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final DenseNodes defaultInstance;
     public static DenseNodes getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public DenseNodes getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private DenseNodes(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+                id_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              id_.add(input.readSInt64());
+              break;
+            }
+            case 10: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
+                id_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                id_.add(input.readSInt64());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 42: {
+              org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000001) == 0x00000001)) {
+                subBuilder = denseinfo_.toBuilder();
+              }
+              denseinfo_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(denseinfo_);
+                denseinfo_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000001;
+              break;
+            }
+            case 64: {
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+                lat_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              lat_.add(input.readSInt64());
+              break;
+            }
+            case 66: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
+                lat_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                lat_.add(input.readSInt64());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 72: {
+              if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+                lon_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000008;
+              }
+              lon_.add(input.readSInt64());
+              break;
+            }
+            case 74: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
+                lon_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000008;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                lon_.add(input.readSInt64());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 80: {
+              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+                keysVals_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000010;
+              }
+              keysVals_.add(input.readInt32());
+              break;
+            }
+            case 82: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
+                keysVals_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000010;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                keysVals_.add(input.readInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+          id_ = java.util.Collections.unmodifiableList(id_);
+        }
+        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+          lat_ = java.util.Collections.unmodifiableList(lat_);
+        }
+        if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+          lon_ = java.util.Collections.unmodifiableList(lon_);
+        }
+        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+          keysVals_ = java.util.Collections.unmodifiableList(keysVals_);
+        }
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<DenseNodes> PARSER =
+        new com.google.protobuf.AbstractParser<DenseNodes>() {
+      public DenseNodes parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new DenseNodes(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<DenseNodes> getParserForType() {
+      return PARSER;
+    }
+
     private int bitField0_;
-    // repeated sint64 id = 1 [packed = true];
     public static final int ID_FIELD_NUMBER = 1;
     private java.util.List<java.lang.Long> id_;
+    /**
+     * <code>repeated sint64 id = 1 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public java.util.List<java.lang.Long>
         getIdList() {
       return id_;
     }
+    /**
+     * <code>repeated sint64 id = 1 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public int getIdCount() {
       return id_.size();
     }
+    /**
+     * <code>repeated sint64 id = 1 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public long getId(int index) {
       return id_.get(index);
     }
     private int idMemoizedSerializedSize = -1;
-    
-    // optional .OSMPBF.DenseInfo denseinfo = 5;
+
     public static final int DENSEINFO_FIELD_NUMBER = 5;
     private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo denseinfo_;
+    /**
+     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+     *
+     * <pre>
+     *repeated Info info = 4;
+     * </pre>
+     */
     public boolean hasDenseinfo() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+     *
+     * <pre>
+     *repeated Info info = 4;
+     * </pre>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDenseinfo() {
       return denseinfo_;
     }
-    
-    // repeated sint64 lat = 8 [packed = true];
+
     public static final int LAT_FIELD_NUMBER = 8;
     private java.util.List<java.lang.Long> lat_;
+    /**
+     * <code>repeated sint64 lat = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public java.util.List<java.lang.Long>
         getLatList() {
       return lat_;
     }
+    /**
+     * <code>repeated sint64 lat = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public int getLatCount() {
       return lat_.size();
     }
+    /**
+     * <code>repeated sint64 lat = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public long getLat(int index) {
       return lat_.get(index);
     }
     private int latMemoizedSerializedSize = -1;
-    
-    // repeated sint64 lon = 9 [packed = true];
+
     public static final int LON_FIELD_NUMBER = 9;
     private java.util.List<java.lang.Long> lon_;
+    /**
+     * <code>repeated sint64 lon = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public java.util.List<java.lang.Long>
         getLonList() {
       return lon_;
     }
+    /**
+     * <code>repeated sint64 lon = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public int getLonCount() {
       return lon_.size();
     }
+    /**
+     * <code>repeated sint64 lon = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public long getLon(int index) {
       return lon_.get(index);
     }
     private int lonMemoizedSerializedSize = -1;
-    
-    // repeated int32 keys_vals = 10 [packed = true];
+
     public static final int KEYS_VALS_FIELD_NUMBER = 10;
     private java.util.List<java.lang.Integer> keysVals_;
+    /**
+     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+     *
+     * <pre>
+     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+     * </pre>
+     */
     public java.util.List<java.lang.Integer>
         getKeysValsList() {
       return keysVals_;
     }
+    /**
+     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+     *
+     * <pre>
+     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+     * </pre>
+     */
     public int getKeysValsCount() {
       return keysVals_.size();
     }
+    /**
+     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+     *
+     * <pre>
+     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+     * </pre>
+     */
     public int getKeysVals(int index) {
       return keysVals_.get(index);
     }
     private int keysValsMemoizedSerializedSize = -1;
-    
+
     private void initFields() {
-      id_ = java.util.Collections.emptyList();;
+      id_ = java.util.Collections.emptyList();
       denseinfo_ = org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance();
-      lat_ = java.util.Collections.emptyList();;
-      lon_ = java.util.Collections.emptyList();;
-      keysVals_ = java.util.Collections.emptyList();;
+      lat_ = java.util.Collections.emptyList();
+      lon_ = java.util.Collections.emptyList();
+      keysVals_ = java.util.Collections.emptyList();
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -6103,13 +9573,14 @@ public final class Osmformat {
       for (int i = 0; i < keysVals_.size(); i++) {
         output.writeInt32NoTag(keysVals_.get(i));
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       {
         int dataSize = 0;
@@ -6171,129 +9642,121 @@ public final class Osmformat {
         }
         keysValsMemoizedSerializedSize = dataSize;
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.DenseNodes}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodesOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.DenseNodes)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodesOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
-        id_ = java.util.Collections.emptyList();;
+        id_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000001);
         denseinfo_ = org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance();
         bitField0_ = (bitField0_ & ~0x00000002);
-        lat_ = java.util.Collections.emptyList();;
+        lat_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
-        lon_ = java.util.Collections.emptyList();;
+        lon_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000008);
-        keysVals_ = java.util.Collections.emptyList();;
+        keysVals_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000010);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes result = buildPartial();
         if (!result.isInitialized()) {
@@ -6301,17 +9764,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes result = new org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes(this);
         int from_bitField0_ = bitField0_;
@@ -6343,7 +9796,7 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes.getDefaultInstance()) return this;
         if (!other.id_.isEmpty()) {
@@ -6389,119 +9842,79 @@ public final class Osmformat {
           }
           
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 8: {
-              ensureIdIsMutable();
-              id_.add(input.readSInt64());
-              break;
-            }
-            case 10: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addId(input.readSInt64());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 42: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.newBuilder();
-              if (hasDenseinfo()) {
-                subBuilder.mergeFrom(getDenseinfo());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setDenseinfo(subBuilder.buildPartial());
-              break;
-            }
-            case 64: {
-              ensureLatIsMutable();
-              lat_.add(input.readSInt64());
-              break;
-            }
-            case 66: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addLat(input.readSInt64());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 72: {
-              ensureLonIsMutable();
-              lon_.add(input.readSInt64());
-              break;
-            }
-            case 74: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addLon(input.readSInt64());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 80: {
-              ensureKeysValsIsMutable();
-              keysVals_.add(input.readInt32());
-              break;
-            }
-            case 82: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addKeysVals(input.readInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.DenseNodes) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // repeated sint64 id = 1 [packed = true];
-      private java.util.List<java.lang.Long> id_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Long> id_ = java.util.Collections.emptyList();
       private void ensureIdIsMutable() {
         if (!((bitField0_ & 0x00000001) == 0x00000001)) {
           id_ = new java.util.ArrayList<java.lang.Long>(id_);
           bitField0_ |= 0x00000001;
          }
       }
+      /**
+       * <code>repeated sint64 id = 1 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public java.util.List<java.lang.Long>
           getIdList() {
         return java.util.Collections.unmodifiableList(id_);
       }
+      /**
+       * <code>repeated sint64 id = 1 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public int getIdCount() {
         return id_.size();
       }
+      /**
+       * <code>repeated sint64 id = 1 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public long getId(int index) {
         return id_.get(index);
       }
+      /**
+       * <code>repeated sint64 id = 1 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder setId(
           int index, long value) {
         ensureIdIsMutable();
@@ -6509,50 +9922,106 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated sint64 id = 1 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addId(long value) {
         ensureIdIsMutable();
         id_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 id = 1 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addAllId(
           java.lang.Iterable<? extends java.lang.Long> values) {
         ensureIdIsMutable();
-        super.addAll(values, id_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, id_);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 id = 1 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder clearId() {
-        id_ = java.util.Collections.emptyList();;
+        id_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000001);
         
         return this;
       }
-      
-      // optional .OSMPBF.DenseInfo denseinfo = 5;
+
       private org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo denseinfo_ = org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance();
+      /**
+       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+       *
+       * <pre>
+       *repeated Info info = 4;
+       * </pre>
+       */
       public boolean hasDenseinfo() {
         return ((bitField0_ & 0x00000002) == 0x00000002);
       }
+      /**
+       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+       *
+       * <pre>
+       *repeated Info info = 4;
+       * </pre>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo getDenseinfo() {
         return denseinfo_;
       }
+      /**
+       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+       *
+       * <pre>
+       *repeated Info info = 4;
+       * </pre>
+       */
       public Builder setDenseinfo(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo value) {
         if (value == null) {
           throw new NullPointerException();
         }
         denseinfo_ = value;
-        
+
         bitField0_ |= 0x00000002;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+       *
+       * <pre>
+       *repeated Info info = 4;
+       * </pre>
+       */
       public Builder setDenseinfo(
           org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.Builder builderForValue) {
         denseinfo_ = builderForValue.build();
-        
+
         bitField0_ |= 0x00000002;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+       *
+       * <pre>
+       *repeated Info info = 4;
+       * </pre>
+       */
       public Builder mergeDenseinfo(org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo value) {
         if (((bitField0_ & 0x00000002) == 0x00000002) &&
             denseinfo_ != org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance()) {
@@ -6561,35 +10030,69 @@ public final class Osmformat {
         } else {
           denseinfo_ = value;
         }
-        
+
         bitField0_ |= 0x00000002;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
+       *
+       * <pre>
+       *repeated Info info = 4;
+       * </pre>
+       */
       public Builder clearDenseinfo() {
         denseinfo_ = org.openstreetmap.osmosis.osmbinary.Osmformat.DenseInfo.getDefaultInstance();
-        
+
         bitField0_ = (bitField0_ & ~0x00000002);
         return this;
       }
-      
-      // repeated sint64 lat = 8 [packed = true];
-      private java.util.List<java.lang.Long> lat_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Long> lat_ = java.util.Collections.emptyList();
       private void ensureLatIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
           lat_ = new java.util.ArrayList<java.lang.Long>(lat_);
           bitField0_ |= 0x00000004;
          }
       }
+      /**
+       * <code>repeated sint64 lat = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public java.util.List<java.lang.Long>
           getLatList() {
         return java.util.Collections.unmodifiableList(lat_);
       }
+      /**
+       * <code>repeated sint64 lat = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public int getLatCount() {
         return lat_.size();
       }
+      /**
+       * <code>repeated sint64 lat = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public long getLat(int index) {
         return lat_.get(index);
       }
+      /**
+       * <code>repeated sint64 lat = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder setLat(
           int index, long value) {
         ensureLatIsMutable();
@@ -6597,44 +10100,93 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated sint64 lat = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addLat(long value) {
         ensureLatIsMutable();
         lat_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 lat = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addAllLat(
           java.lang.Iterable<? extends java.lang.Long> values) {
         ensureLatIsMutable();
-        super.addAll(values, lat_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, lat_);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 lat = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder clearLat() {
-        lat_ = java.util.Collections.emptyList();;
+        lat_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
         
         return this;
       }
-      
-      // repeated sint64 lon = 9 [packed = true];
-      private java.util.List<java.lang.Long> lon_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Long> lon_ = java.util.Collections.emptyList();
       private void ensureLonIsMutable() {
         if (!((bitField0_ & 0x00000008) == 0x00000008)) {
           lon_ = new java.util.ArrayList<java.lang.Long>(lon_);
           bitField0_ |= 0x00000008;
          }
       }
+      /**
+       * <code>repeated sint64 lon = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public java.util.List<java.lang.Long>
           getLonList() {
         return java.util.Collections.unmodifiableList(lon_);
       }
+      /**
+       * <code>repeated sint64 lon = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public int getLonCount() {
         return lon_.size();
       }
+      /**
+       * <code>repeated sint64 lon = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public long getLon(int index) {
         return lon_.get(index);
       }
+      /**
+       * <code>repeated sint64 lon = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder setLon(
           int index, long value) {
         ensureLonIsMutable();
@@ -6642,44 +10194,93 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated sint64 lon = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addLon(long value) {
         ensureLonIsMutable();
         lon_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 lon = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder addAllLon(
           java.lang.Iterable<? extends java.lang.Long> values) {
         ensureLonIsMutable();
-        super.addAll(values, lon_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, lon_);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 lon = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
       public Builder clearLon() {
-        lon_ = java.util.Collections.emptyList();;
+        lon_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000008);
         
         return this;
       }
-      
-      // repeated int32 keys_vals = 10 [packed = true];
-      private java.util.List<java.lang.Integer> keysVals_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> keysVals_ = java.util.Collections.emptyList();
       private void ensureKeysValsIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
           keysVals_ = new java.util.ArrayList<java.lang.Integer>(keysVals_);
           bitField0_ |= 0x00000010;
          }
       }
+      /**
+       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+       *
+       * <pre>
+       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+       * </pre>
+       */
       public java.util.List<java.lang.Integer>
           getKeysValsList() {
         return java.util.Collections.unmodifiableList(keysVals_);
       }
+      /**
+       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+       *
+       * <pre>
+       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+       * </pre>
+       */
       public int getKeysValsCount() {
         return keysVals_.size();
       }
+      /**
+       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+       *
+       * <pre>
+       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+       * </pre>
+       */
       public int getKeysVals(int index) {
         return keysVals_.get(index);
       }
+      /**
+       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+       *
+       * <pre>
+       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+       * </pre>
+       */
       public Builder setKeysVals(
           int index, int value) {
         ensureKeysValsIsMutable();
@@ -6687,159 +10288,454 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+       *
+       * <pre>
+       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+       * </pre>
+       */
       public Builder addKeysVals(int value) {
         ensureKeysValsIsMutable();
         keysVals_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+       *
+       * <pre>
+       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+       * </pre>
+       */
       public Builder addAllKeysVals(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureKeysValsIsMutable();
-        super.addAll(values, keysVals_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, keysVals_);
         
         return this;
       }
+      /**
+       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
+       *
+       * <pre>
+       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
+       * </pre>
+       */
       public Builder clearKeysVals() {
-        keysVals_ = java.util.Collections.emptyList();;
+        keysVals_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000010);
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.DenseNodes)
     }
-    
+
     static {
       defaultInstance = new DenseNodes(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.DenseNodes)
   }
-  
-  public interface WayOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // required int64 id = 1;
+
+  public interface WayOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.Way)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>required int64 id = 1;</code>
+     */
     boolean hasId();
+    /**
+     * <code>required int64 id = 1;</code>
+     */
     long getId();
-    
-    // repeated uint32 keys = 2 [packed = true];
+
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     java.util.List<java.lang.Integer> getKeysList();
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     int getKeysCount();
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     int getKeys(int index);
-    
-    // repeated uint32 vals = 3 [packed = true];
+
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
     java.util.List<java.lang.Integer> getValsList();
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
     int getValsCount();
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
     int getVals(int index);
-    
-    // optional .OSMPBF.Info info = 4;
+
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     */
     boolean hasInfo();
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     */
     org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo();
-    
-    // repeated sint64 refs = 8 [packed = true];
+
+    /**
+     * <code>repeated sint64 refs = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     java.util.List<java.lang.Long> getRefsList();
+    /**
+     * <code>repeated sint64 refs = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     int getRefsCount();
+    /**
+     * <code>repeated sint64 refs = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     long getRefs(int index);
   }
+  /**
+   * Protobuf type {@code OSMPBF.Way}
+   */
   public static final class Way extends
-      com.google.protobuf.GeneratedMessageLite
-      implements WayOrBuilder {
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.Way)
+      WayOrBuilder {
     // Use Way.newBuilder() to construct.
-    private Way(Builder builder) {
+    private Way(com.google.protobuf.GeneratedMessageLite.Builder builder) {
       super(builder);
+      this.unknownFields = builder.getUnknownFields();
     }
-    private Way(boolean noInit) {}
-    
+    private Way(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
     private static final Way defaultInstance;
     public static Way getDefaultInstance() {
       return defaultInstance;
     }
-    
+
     public Way getDefaultInstanceForType() {
       return defaultInstance;
     }
-    
-    private int bitField0_;
-    // required int64 id = 1;
-    public static final int ID_FIELD_NUMBER = 1;
-    private long id_;
-    public boolean hasId() {
-      return ((bitField0_ & 0x00000001) == 0x00000001);
-    }
-    public long getId() {
-      return id_;
-    }
-    
-    // repeated uint32 keys = 2 [packed = true];
-    public static final int KEYS_FIELD_NUMBER = 2;
-    private java.util.List<java.lang.Integer> keys_;
-    public java.util.List<java.lang.Integer>
-        getKeysList() {
-      return keys_;
-    }
-    public int getKeysCount() {
-      return keys_.size();
-    }
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private Way(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              bitField0_ |= 0x00000001;
+              id_ = input.readInt64();
+              break;
+            }
+            case 16: {
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              keys_.add(input.readUInt32());
+              break;
+            }
+            case 18: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
+                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                keys_.add(input.readUInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 24: {
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              vals_.add(input.readUInt32());
+              break;
+            }
+            case 26: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
+                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                vals_.add(input.readUInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 34: {
+              org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000002) == 0x00000002)) {
+                subBuilder = info_.toBuilder();
+              }
+              info_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Info.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(info_);
+                info_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000002;
+              break;
+            }
+            case 64: {
+              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+                refs_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000010;
+              }
+              refs_.add(input.readSInt64());
+              break;
+            }
+            case 66: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
+                refs_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000010;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                refs_.add(input.readSInt64());
+              }
+              input.popLimit(limit);
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+          keys_ = java.util.Collections.unmodifiableList(keys_);
+        }
+        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+          vals_ = java.util.Collections.unmodifiableList(vals_);
+        }
+        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+          refs_ = java.util.Collections.unmodifiableList(refs_);
+        }
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static com.google.protobuf.Parser<Way> PARSER =
+        new com.google.protobuf.AbstractParser<Way>() {
+      public Way parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Way(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Way> getParserForType() {
+      return PARSER;
+    }
+
+    private int bitField0_;
+    public static final int ID_FIELD_NUMBER = 1;
+    private long id_;
+    /**
+     * <code>required int64 id = 1;</code>
+     */
+    public boolean hasId() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    /**
+     * <code>required int64 id = 1;</code>
+     */
+    public long getId() {
+      return id_;
+    }
+
+    public static final int KEYS_FIELD_NUMBER = 2;
+    private java.util.List<java.lang.Integer> keys_;
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
+    public java.util.List<java.lang.Integer>
+        getKeysList() {
+      return keys_;
+    }
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
+    public int getKeysCount() {
+      return keys_.size();
+    }
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     public int getKeys(int index) {
       return keys_.get(index);
     }
     private int keysMemoizedSerializedSize = -1;
-    
-    // repeated uint32 vals = 3 [packed = true];
+
     public static final int VALS_FIELD_NUMBER = 3;
     private java.util.List<java.lang.Integer> vals_;
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
     public java.util.List<java.lang.Integer>
         getValsList() {
       return vals_;
     }
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
     public int getValsCount() {
       return vals_.size();
     }
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
     public int getVals(int index) {
       return vals_.get(index);
     }
     private int valsMemoizedSerializedSize = -1;
-    
-    // optional .OSMPBF.Info info = 4;
+
     public static final int INFO_FIELD_NUMBER = 4;
     private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_;
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     */
     public boolean hasInfo() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
       return info_;
     }
-    
-    // repeated sint64 refs = 8 [packed = true];
+
     public static final int REFS_FIELD_NUMBER = 8;
     private java.util.List<java.lang.Long> refs_;
+    /**
+     * <code>repeated sint64 refs = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public java.util.List<java.lang.Long>
         getRefsList() {
       return refs_;
     }
+    /**
+     * <code>repeated sint64 refs = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public int getRefsCount() {
       return refs_.size();
     }
+    /**
+     * <code>repeated sint64 refs = 8 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA coded
+     * </pre>
+     */
     public long getRefs(int index) {
       return refs_.get(index);
     }
     private int refsMemoizedSerializedSize = -1;
-    
+
     private void initFields() {
       id_ = 0L;
-      keys_ = java.util.Collections.emptyList();;
-      vals_ = java.util.Collections.emptyList();;
+      keys_ = java.util.Collections.emptyList();
+      vals_ = java.util.Collections.emptyList();
       info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
-      refs_ = java.util.Collections.emptyList();;
+      refs_ = java.util.Collections.emptyList();
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (!hasId()) {
         memoizedIsInitialized = 0;
         return false;
@@ -6847,7 +10743,7 @@ public final class Osmformat {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -6878,13 +10774,14 @@ public final class Osmformat {
       for (int i = 0; i < refs_.size(); i++) {
         output.writeSInt64NoTag(refs_.get(i));
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
@@ -6936,129 +10833,121 @@ public final class Osmformat {
         }
         refsMemoizedSerializedSize = dataSize;
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Way parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.Way prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.Way}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.Way, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.Way)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.WayOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.Way.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         id_ = 0L;
         bitField0_ = (bitField0_ & ~0x00000001);
-        keys_ = java.util.Collections.emptyList();;
+        keys_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000002);
-        vals_ = java.util.Collections.emptyList();;
+        vals_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
         info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
         bitField0_ = (bitField0_ & ~0x00000008);
-        refs_ = java.util.Collections.emptyList();;
+        refs_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000010);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Way getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.Way.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Way build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.Way result = buildPartial();
         if (!result.isInitialized()) {
@@ -7066,17 +10955,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.Way buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.Way result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Way buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.Way result = new org.openstreetmap.osmosis.osmbinary.Osmformat.Way(this);
         int from_bitField0_ = bitField0_;
@@ -7107,7 +10986,7 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.Way other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.Way.getDefaultInstance()) return this;
         if (other.hasId()) {
@@ -7146,9 +11025,11 @@ public final class Osmformat {
           }
           
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (!hasId()) {
           
@@ -7156,125 +11037,103 @@ public final class Osmformat {
         }
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 8: {
-              bitField0_ |= 0x00000001;
-              id_ = input.readInt64();
-              break;
-            }
-            case 16: {
-              ensureKeysIsMutable();
-              keys_.add(input.readUInt32());
-              break;
-            }
-            case 18: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addKeys(input.readUInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 24: {
-              ensureValsIsMutable();
-              vals_.add(input.readUInt32());
-              break;
-            }
-            case 26: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addVals(input.readUInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 34: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.newBuilder();
-              if (hasInfo()) {
-                subBuilder.mergeFrom(getInfo());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setInfo(subBuilder.buildPartial());
-              break;
-            }
-            case 64: {
-              ensureRefsIsMutable();
-              refs_.add(input.readSInt64());
-              break;
-            }
-            case 66: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addRefs(input.readSInt64());
-              }
-              input.popLimit(limit);
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.Way parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.Way) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // required int64 id = 1;
+
       private long id_ ;
+      /**
+       * <code>required int64 id = 1;</code>
+       */
       public boolean hasId() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>required int64 id = 1;</code>
+       */
       public long getId() {
         return id_;
       }
+      /**
+       * <code>required int64 id = 1;</code>
+       */
       public Builder setId(long value) {
         bitField0_ |= 0x00000001;
         id_ = value;
         
         return this;
       }
+      /**
+       * <code>required int64 id = 1;</code>
+       */
       public Builder clearId() {
         bitField0_ = (bitField0_ & ~0x00000001);
         id_ = 0L;
         
         return this;
       }
-      
-      // repeated uint32 keys = 2 [packed = true];
-      private java.util.List<java.lang.Integer> keys_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> keys_ = java.util.Collections.emptyList();
       private void ensureKeysIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
           keys_ = new java.util.ArrayList<java.lang.Integer>(keys_);
           bitField0_ |= 0x00000002;
          }
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public java.util.List<java.lang.Integer>
           getKeysList() {
         return java.util.Collections.unmodifiableList(keys_);
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public int getKeysCount() {
         return keys_.size();
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public int getKeys(int index) {
         return keys_.get(index);
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder setKeys(
           int index, int value) {
         ensureKeysIsMutable();
@@ -7282,44 +11141,77 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder addKeys(int value) {
         ensureKeysIsMutable();
         keys_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder addAllKeys(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureKeysIsMutable();
-        super.addAll(values, keys_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, keys_);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder clearKeys() {
-        keys_ = java.util.Collections.emptyList();;
+        keys_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000002);
         
         return this;
       }
-      
-      // repeated uint32 vals = 3 [packed = true];
-      private java.util.List<java.lang.Integer> vals_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> vals_ = java.util.Collections.emptyList();
       private void ensureValsIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
           vals_ = new java.util.ArrayList<java.lang.Integer>(vals_);
           bitField0_ |= 0x00000004;
          }
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public java.util.List<java.lang.Integer>
           getValsList() {
         return java.util.Collections.unmodifiableList(vals_);
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public int getValsCount() {
         return vals_.size();
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public int getVals(int index) {
         return vals_.get(index);
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public Builder setVals(
           int index, int value) {
         ensureValsIsMutable();
@@ -7327,50 +11219,74 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public Builder addVals(int value) {
         ensureValsIsMutable();
         vals_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public Builder addAllVals(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureValsIsMutable();
-        super.addAll(values, vals_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, vals_);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public Builder clearVals() {
-        vals_ = java.util.Collections.emptyList();;
+        vals_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
         
         return this;
       }
-      
-      // optional .OSMPBF.Info info = 4;
+
       private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public boolean hasInfo() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
         return info_;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public Builder setInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
         if (value == null) {
           throw new NullPointerException();
         }
         info_ = value;
-        
+
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public Builder setInfo(
           org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder builderForValue) {
         info_ = builderForValue.build();
-        
+
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public Builder mergeInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
         if (((bitField0_ & 0x00000008) == 0x00000008) &&
             info_ != org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance()) {
@@ -7379,141 +11295,518 @@ public final class Osmformat {
         } else {
           info_ = value;
         }
-        
-        bitField0_ |= 0x00000008;
-        return this;
-      }
-      public Builder clearInfo() {
-        info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
-        
-        bitField0_ = (bitField0_ & ~0x00000008);
-        return this;
-      }
-      
-      // repeated sint64 refs = 8 [packed = true];
-      private java.util.List<java.lang.Long> refs_ = java.util.Collections.emptyList();;
-      private void ensureRefsIsMutable() {
-        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
-          refs_ = new java.util.ArrayList<java.lang.Long>(refs_);
-          bitField0_ |= 0x00000010;
-         }
-      }
-      public java.util.List<java.lang.Long>
-          getRefsList() {
-        return java.util.Collections.unmodifiableList(refs_);
-      }
-      public int getRefsCount() {
-        return refs_.size();
-      }
-      public long getRefs(int index) {
-        return refs_.get(index);
-      }
-      public Builder setRefs(
-          int index, long value) {
-        ensureRefsIsMutable();
-        refs_.set(index, value);
-        
-        return this;
-      }
-      public Builder addRefs(long value) {
-        ensureRefsIsMutable();
-        refs_.add(value);
-        
-        return this;
-      }
-      public Builder addAllRefs(
-          java.lang.Iterable<? extends java.lang.Long> values) {
-        ensureRefsIsMutable();
-        super.addAll(values, refs_);
-        
-        return this;
-      }
-      public Builder clearRefs() {
-        refs_ = java.util.Collections.emptyList();;
-        bitField0_ = (bitField0_ & ~0x00000010);
-        
-        return this;
+
+        bitField0_ |= 0x00000008;
+        return this;
+      }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
+      public Builder clearInfo() {
+        info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
+
+        bitField0_ = (bitField0_ & ~0x00000008);
+        return this;
+      }
+
+      private java.util.List<java.lang.Long> refs_ = java.util.Collections.emptyList();
+      private void ensureRefsIsMutable() {
+        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
+          refs_ = new java.util.ArrayList<java.lang.Long>(refs_);
+          bitField0_ |= 0x00000010;
+         }
+      }
+      /**
+       * <code>repeated sint64 refs = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
+      public java.util.List<java.lang.Long>
+          getRefsList() {
+        return java.util.Collections.unmodifiableList(refs_);
+      }
+      /**
+       * <code>repeated sint64 refs = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
+      public int getRefsCount() {
+        return refs_.size();
+      }
+      /**
+       * <code>repeated sint64 refs = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
+      public long getRefs(int index) {
+        return refs_.get(index);
+      }
+      /**
+       * <code>repeated sint64 refs = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
+      public Builder setRefs(
+          int index, long value) {
+        ensureRefsIsMutable();
+        refs_.set(index, value);
+        
+        return this;
+      }
+      /**
+       * <code>repeated sint64 refs = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
+      public Builder addRefs(long value) {
+        ensureRefsIsMutable();
+        refs_.add(value);
+        
+        return this;
+      }
+      /**
+       * <code>repeated sint64 refs = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
+      public Builder addAllRefs(
+          java.lang.Iterable<? extends java.lang.Long> values) {
+        ensureRefsIsMutable();
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, refs_);
+        
+        return this;
+      }
+      /**
+       * <code>repeated sint64 refs = 8 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA coded
+       * </pre>
+       */
+      public Builder clearRefs() {
+        refs_ = java.util.Collections.emptyList();
+        bitField0_ = (bitField0_ & ~0x00000010);
+        
+        return this;
+      }
+
+      // @@protoc_insertion_point(builder_scope:OSMPBF.Way)
+    }
+
+    static {
+      defaultInstance = new Way(true);
+      defaultInstance.initFields();
+    }
+
+    // @@protoc_insertion_point(class_scope:OSMPBF.Way)
+  }
+
+  public interface RelationOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:OSMPBF.Relation)
+      com.google.protobuf.MessageLiteOrBuilder {
+
+    /**
+     * <code>required int64 id = 1;</code>
+     */
+    boolean hasId();
+    /**
+     * <code>required int64 id = 1;</code>
+     */
+    long getId();
+
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
+    java.util.List<java.lang.Integer> getKeysList();
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
+    int getKeysCount();
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
+    int getKeys(int index);
+
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
+    java.util.List<java.lang.Integer> getValsList();
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
+    int getValsCount();
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
+    int getVals(int index);
+
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     */
+    boolean hasInfo();
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     */
+    org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo();
+
+    /**
+     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays
+     * </pre>
+     */
+    java.util.List<java.lang.Integer> getRolesSidList();
+    /**
+     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays
+     * </pre>
+     */
+    int getRolesSidCount();
+    /**
+     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays
+     * </pre>
+     */
+    int getRolesSid(int index);
+
+    /**
+     * <code>repeated sint64 memids = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA encoded
+     * </pre>
+     */
+    java.util.List<java.lang.Long> getMemidsList();
+    /**
+     * <code>repeated sint64 memids = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA encoded
+     * </pre>
+     */
+    int getMemidsCount();
+    /**
+     * <code>repeated sint64 memids = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA encoded
+     * </pre>
+     */
+    long getMemids(int index);
+
+    /**
+     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+     */
+    java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> getTypesList();
+    /**
+     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+     */
+    int getTypesCount();
+    /**
+     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+     */
+    org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType getTypes(int index);
+  }
+  /**
+   * Protobuf type {@code OSMPBF.Relation}
+   */
+  public static final class Relation extends
+      com.google.protobuf.GeneratedMessageLite implements
+      // @@protoc_insertion_point(message_implements:OSMPBF.Relation)
+      RelationOrBuilder {
+    // Use Relation.newBuilder() to construct.
+    private Relation(com.google.protobuf.GeneratedMessageLite.Builder builder) {
+      super(builder);
+      this.unknownFields = builder.getUnknownFields();
+    }
+    private Relation(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
+
+    private static final Relation defaultInstance;
+    public static Relation getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    public Relation getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+    private final com.google.protobuf.ByteString unknownFields;
+    private Relation(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.ByteString.Output unknownFieldsOutput =
+          com.google.protobuf.ByteString.newOutput();
+      com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+          com.google.protobuf.CodedOutputStream.newInstance(
+              unknownFieldsOutput);
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFieldsCodedOutput,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              bitField0_ |= 0x00000001;
+              id_ = input.readInt64();
+              break;
+            }
+            case 16: {
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              keys_.add(input.readUInt32());
+              break;
+            }
+            case 18: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
+                keys_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                keys_.add(input.readUInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 24: {
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              vals_.add(input.readUInt32());
+              break;
+            }
+            case 26: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
+                vals_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                vals_.add(input.readUInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 34: {
+              org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000002) == 0x00000002)) {
+                subBuilder = info_.toBuilder();
+              }
+              info_ = input.readMessage(org.openstreetmap.osmosis.osmbinary.Osmformat.Info.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(info_);
+                info_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000002;
+              break;
+            }
+            case 64: {
+              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+                rolesSid_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000010;
+              }
+              rolesSid_.add(input.readInt32());
+              break;
+            }
+            case 66: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) {
+                rolesSid_ = new java.util.ArrayList<java.lang.Integer>();
+                mutable_bitField0_ |= 0x00000010;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                rolesSid_.add(input.readInt32());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 72: {
+              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+                memids_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000020;
+              }
+              memids_.add(input.readSInt64());
+              break;
+            }
+            case 74: {
+              int length = input.readRawVarint32();
+              int limit = input.pushLimit(length);
+              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
+                memids_ = new java.util.ArrayList<java.lang.Long>();
+                mutable_bitField0_ |= 0x00000020;
+              }
+              while (input.getBytesUntilLimit() > 0) {
+                memids_.add(input.readSInt64());
+              }
+              input.popLimit(limit);
+              break;
+            }
+            case 80: {
+              int rawValue = input.readEnum();
+              org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value = org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType.valueOf(rawValue);
+              if (value == null) {
+                unknownFieldsCodedOutput.writeRawVarint32(tag);
+                unknownFieldsCodedOutput.writeRawVarint32(rawValue);
+                } else {
+                if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
+                  types_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType>();
+                  mutable_bitField0_ |= 0x00000040;
+                }
+                types_.add(value);
+              }
+              break;
+            }
+            case 82: {
+              int length = input.readRawVarint32();
+              int oldLimit = input.pushLimit(length);
+              while(input.getBytesUntilLimit() > 0) {
+                int rawValue = input.readEnum();
+                org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value = org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType.valueOf(rawValue);
+                if (value == null) {
+                  unknownFieldsCodedOutput.writeRawVarint32(tag);
+                  unknownFieldsCodedOutput.writeRawVarint32(rawValue);
+                  } else {
+                  if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
+                    types_ = new java.util.ArrayList<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType>();
+                    mutable_bitField0_ |= 0x00000040;
+                  }
+                  types_.add(value);
+                }
+              }
+              input.popLimit(oldLimit);
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+          keys_ = java.util.Collections.unmodifiableList(keys_);
+        }
+        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+          vals_ = java.util.Collections.unmodifiableList(vals_);
+        }
+        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
+          rolesSid_ = java.util.Collections.unmodifiableList(rolesSid_);
+        }
+        if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+          memids_ = java.util.Collections.unmodifiableList(memids_);
+        }
+        if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
+          types_ = java.util.Collections.unmodifiableList(types_);
+        }
+        try {
+          unknownFieldsCodedOutput.flush();
+        } catch (java.io.IOException e) {
+        // Should not happen
+        } finally {
+          unknownFields = unknownFieldsOutput.toByteString();
+        }
+        makeExtensionsImmutable();
       }
-      
-      // @@protoc_insertion_point(builder_scope:OSMPBF.Way)
-    }
-    
-    static {
-      defaultInstance = new Way(true);
-      defaultInstance.initFields();
-    }
-    
-    // @@protoc_insertion_point(class_scope:OSMPBF.Way)
-  }
-  
-  public interface RelationOrBuilder
-      extends com.google.protobuf.MessageLiteOrBuilder {
-    
-    // required int64 id = 1;
-    boolean hasId();
-    long getId();
-    
-    // repeated uint32 keys = 2 [packed = true];
-    java.util.List<java.lang.Integer> getKeysList();
-    int getKeysCount();
-    int getKeys(int index);
-    
-    // repeated uint32 vals = 3 [packed = true];
-    java.util.List<java.lang.Integer> getValsList();
-    int getValsCount();
-    int getVals(int index);
-    
-    // optional .OSMPBF.Info info = 4;
-    boolean hasInfo();
-    org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo();
-    
-    // repeated int32 roles_sid = 8 [packed = true];
-    java.util.List<java.lang.Integer> getRolesSidList();
-    int getRolesSidCount();
-    int getRolesSid(int index);
-    
-    // repeated sint64 memids = 9 [packed = true];
-    java.util.List<java.lang.Long> getMemidsList();
-    int getMemidsCount();
-    long getMemids(int index);
-    
-    // repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
-    java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> getTypesList();
-    int getTypesCount();
-    org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType getTypes(int index);
-  }
-  public static final class Relation extends
-      com.google.protobuf.GeneratedMessageLite
-      implements RelationOrBuilder {
-    // Use Relation.newBuilder() to construct.
-    private Relation(Builder builder) {
-      super(builder);
-    }
-    private Relation(boolean noInit) {}
-    
-    private static final Relation defaultInstance;
-    public static Relation getDefaultInstance() {
-      return defaultInstance;
     }
-    
-    public Relation getDefaultInstanceForType() {
-      return defaultInstance;
+    public static com.google.protobuf.Parser<Relation> PARSER =
+        new com.google.protobuf.AbstractParser<Relation>() {
+      public Relation parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Relation(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Relation> getParserForType() {
+      return PARSER;
     }
-    
+
+    /**
+     * Protobuf enum {@code OSMPBF.Relation.MemberType}
+     */
     public enum MemberType
         implements com.google.protobuf.Internal.EnumLite {
+      /**
+       * <code>NODE = 0;</code>
+       */
       NODE(0, 0),
+      /**
+       * <code>WAY = 1;</code>
+       */
       WAY(1, 1),
+      /**
+       * <code>RELATION = 2;</code>
+       */
       RELATION(2, 2),
       ;
-      
+
+      /**
+       * <code>NODE = 0;</code>
+       */
       public static final int NODE_VALUE = 0;
+      /**
+       * <code>WAY = 1;</code>
+       */
       public static final int WAY_VALUE = 1;
+      /**
+       * <code>RELATION = 2;</code>
+       */
       public static final int RELATION_VALUE = 2;
-      
-      
+
+
       public final int getNumber() { return value; }
-      
+
       public static MemberType valueOf(int value) {
         switch (value) {
           case 0: return NODE;
@@ -7522,7 +11815,7 @@ public final class Osmformat {
           default: return null;
         }
       }
-      
+
       public static com.google.protobuf.Internal.EnumLiteMap<MemberType>
           internalGetValueMap() {
         return internalValueMap;
@@ -7534,125 +11827,212 @@ public final class Osmformat {
                 return MemberType.valueOf(number);
               }
             };
-      
+
       private final int value;
-      
+
       private MemberType(int index, int value) {
         this.value = value;
       }
-      
+
       // @@protoc_insertion_point(enum_scope:OSMPBF.Relation.MemberType)
     }
-    
+
     private int bitField0_;
-    // required int64 id = 1;
     public static final int ID_FIELD_NUMBER = 1;
     private long id_;
+    /**
+     * <code>required int64 id = 1;</code>
+     */
     public boolean hasId() {
       return ((bitField0_ & 0x00000001) == 0x00000001);
     }
+    /**
+     * <code>required int64 id = 1;</code>
+     */
     public long getId() {
       return id_;
     }
-    
-    // repeated uint32 keys = 2 [packed = true];
+
     public static final int KEYS_FIELD_NUMBER = 2;
     private java.util.List<java.lang.Integer> keys_;
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     public java.util.List<java.lang.Integer>
         getKeysList() {
       return keys_;
     }
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     public int getKeysCount() {
       return keys_.size();
     }
+    /**
+     * <code>repeated uint32 keys = 2 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays.
+     * </pre>
+     */
     public int getKeys(int index) {
       return keys_.get(index);
     }
     private int keysMemoizedSerializedSize = -1;
-    
-    // repeated uint32 vals = 3 [packed = true];
+
     public static final int VALS_FIELD_NUMBER = 3;
     private java.util.List<java.lang.Integer> vals_;
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
     public java.util.List<java.lang.Integer>
         getValsList() {
       return vals_;
     }
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
     public int getValsCount() {
       return vals_.size();
     }
+    /**
+     * <code>repeated uint32 vals = 3 [packed = true];</code>
+     */
     public int getVals(int index) {
       return vals_.get(index);
     }
     private int valsMemoizedSerializedSize = -1;
-    
-    // optional .OSMPBF.Info info = 4;
+
     public static final int INFO_FIELD_NUMBER = 4;
     private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_;
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     */
     public boolean hasInfo() {
       return ((bitField0_ & 0x00000002) == 0x00000002);
     }
+    /**
+     * <code>optional .OSMPBF.Info info = 4;</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
       return info_;
     }
-    
-    // repeated int32 roles_sid = 8 [packed = true];
+
     public static final int ROLES_SID_FIELD_NUMBER = 8;
     private java.util.List<java.lang.Integer> rolesSid_;
+    /**
+     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays
+     * </pre>
+     */
     public java.util.List<java.lang.Integer>
         getRolesSidList() {
       return rolesSid_;
     }
+    /**
+     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays
+     * </pre>
+     */
     public int getRolesSidCount() {
       return rolesSid_.size();
     }
+    /**
+     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+     *
+     * <pre>
+     * Parallel arrays
+     * </pre>
+     */
     public int getRolesSid(int index) {
       return rolesSid_.get(index);
     }
     private int rolesSidMemoizedSerializedSize = -1;
-    
-    // repeated sint64 memids = 9 [packed = true];
+
     public static final int MEMIDS_FIELD_NUMBER = 9;
     private java.util.List<java.lang.Long> memids_;
+    /**
+     * <code>repeated sint64 memids = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA encoded
+     * </pre>
+     */
     public java.util.List<java.lang.Long>
         getMemidsList() {
       return memids_;
     }
+    /**
+     * <code>repeated sint64 memids = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA encoded
+     * </pre>
+     */
     public int getMemidsCount() {
       return memids_.size();
     }
+    /**
+     * <code>repeated sint64 memids = 9 [packed = true];</code>
+     *
+     * <pre>
+     * DELTA encoded
+     * </pre>
+     */
     public long getMemids(int index) {
       return memids_.get(index);
     }
     private int memidsMemoizedSerializedSize = -1;
-    
-    // repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
+
     public static final int TYPES_FIELD_NUMBER = 10;
     private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> types_;
+    /**
+     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+     */
     public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> getTypesList() {
       return types_;
     }
+    /**
+     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+     */
     public int getTypesCount() {
       return types_.size();
     }
+    /**
+     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+     */
     public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType getTypes(int index) {
       return types_.get(index);
     }
     private int typesMemoizedSerializedSize;
-    
+
     private void initFields() {
       id_ = 0L;
-      keys_ = java.util.Collections.emptyList();;
-      vals_ = java.util.Collections.emptyList();;
+      keys_ = java.util.Collections.emptyList();
+      vals_ = java.util.Collections.emptyList();
       info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
-      rolesSid_ = java.util.Collections.emptyList();;
-      memids_ = java.util.Collections.emptyList();;
+      rolesSid_ = java.util.Collections.emptyList();
+      memids_ = java.util.Collections.emptyList();
       types_ = java.util.Collections.emptyList();
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
-      
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
       if (!hasId()) {
         memoizedIsInitialized = 0;
         return false;
@@ -7660,7 +12040,7 @@ public final class Osmformat {
       memoizedIsInitialized = 1;
       return true;
     }
-    
+
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
@@ -7705,13 +12085,14 @@ public final class Osmformat {
       for (int i = 0; i < types_.size(); i++) {
         output.writeEnumNoTag(types_.get(i).getNumber());
       }
+      output.writeRawBytes(unknownFields);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public int getSerializedSize() {
       int size = memoizedSerializedSize;
       if (size != -1) return size;
-    
+
       size = 0;
       if (((bitField0_ & 0x00000001) == 0x00000001)) {
         size += com.google.protobuf.CodedOutputStream
@@ -7789,133 +12170,125 @@ public final class Osmformat {
             .computeRawVarint32Size(dataSize);
         }typesMemoizedSerializedSize = dataSize;
       }
+      size += unknownFields.size();
       memoizedSerializedSize = size;
       return size;
     }
-    
+
     private static final long serialVersionUID = 0L;
     @java.lang.Override
     protected java.lang.Object writeReplace()
         throws java.io.ObjectStreamException {
       return super.writeReplace();
     }
-    
+
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data).buildParsed();
+      return PARSER.parseFrom(data);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
-      return newBuilder().mergeFrom(data, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(data, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(java.io.InputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      Builder builder = newBuilder();
-      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
-        return builder.buildParsed();
-      } else {
-        return null;
-      }
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input).buildParsed();
+      return PARSER.parseFrom(input);
     }
     public static org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      return newBuilder().mergeFrom(input, extensionRegistry)
-               .buildParsed();
+      return PARSER.parseFrom(input, extensionRegistry);
     }
-    
+
     public static Builder newBuilder() { return Builder.create(); }
     public Builder newBuilderForType() { return newBuilder(); }
     public static Builder newBuilder(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation prototype) {
       return newBuilder().mergeFrom(prototype);
     }
     public Builder toBuilder() { return newBuilder(this); }
-    
+
+    /**
+     * Protobuf type {@code OSMPBF.Relation}
+     */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageLite.Builder<
           org.openstreetmap.osmosis.osmbinary.Osmformat.Relation, Builder>
-        implements org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder {
+        implements
+        // @@protoc_insertion_point(builder_implements:OSMPBF.Relation)
+        org.openstreetmap.osmosis.osmbinary.Osmformat.RelationOrBuilder {
       // Construct using org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.newBuilder()
       private Builder() {
         maybeForceBuilderInitialization();
       }
-      
+
       private void maybeForceBuilderInitialization() {
       }
       private static Builder create() {
         return new Builder();
       }
-      
+
       public Builder clear() {
         super.clear();
         id_ = 0L;
         bitField0_ = (bitField0_ & ~0x00000001);
-        keys_ = java.util.Collections.emptyList();;
+        keys_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000002);
-        vals_ = java.util.Collections.emptyList();;
+        vals_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
         info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
         bitField0_ = (bitField0_ & ~0x00000008);
-        rolesSid_ = java.util.Collections.emptyList();;
+        rolesSid_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000010);
-        memids_ = java.util.Collections.emptyList();;
+        memids_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000020);
         types_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000040);
         return this;
       }
-      
+
       public Builder clone() {
         return create().mergeFrom(buildPartial());
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation getDefaultInstanceForType() {
         return org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.getDefaultInstance();
       }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation build() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.Relation result = buildPartial();
         if (!result.isInitialized()) {
@@ -7923,17 +12296,7 @@ public final class Osmformat {
         }
         return result;
       }
-      
-      private org.openstreetmap.osmosis.osmbinary.Osmformat.Relation buildParsed()
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        org.openstreetmap.osmosis.osmbinary.Osmformat.Relation result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(
-            result).asInvalidProtocolBufferException();
-        }
-        return result;
-      }
-      
+
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation buildPartial() {
         org.openstreetmap.osmosis.osmbinary.Osmformat.Relation result = new org.openstreetmap.osmosis.osmbinary.Osmformat.Relation(this);
         int from_bitField0_ = bitField0_;
@@ -7974,7 +12337,7 @@ public final class Osmformat {
         result.bitField0_ = to_bitField0_;
         return result;
       }
-      
+
       public Builder mergeFrom(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation other) {
         if (other == org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.getDefaultInstance()) return this;
         if (other.hasId()) {
@@ -8033,9 +12396,11 @@ public final class Osmformat {
           }
           
         }
+        setUnknownFields(
+            getUnknownFields().concat(other.unknownFields));
         return this;
       }
-      
+
       public final boolean isInitialized() {
         if (!hasId()) {
           
@@ -8043,160 +12408,103 @@ public final class Osmformat {
         }
         return true;
       }
-      
+
       public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        while (true) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              
-              return this;
-            default: {
-              if (!parseUnknownField(input, extensionRegistry, tag)) {
-                
-                return this;
-              }
-              break;
-            }
-            case 8: {
-              bitField0_ |= 0x00000001;
-              id_ = input.readInt64();
-              break;
-            }
-            case 16: {
-              ensureKeysIsMutable();
-              keys_.add(input.readUInt32());
-              break;
-            }
-            case 18: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addKeys(input.readUInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 24: {
-              ensureValsIsMutable();
-              vals_.add(input.readUInt32());
-              break;
-            }
-            case 26: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addVals(input.readUInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 34: {
-              org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder subBuilder = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.newBuilder();
-              if (hasInfo()) {
-                subBuilder.mergeFrom(getInfo());
-              }
-              input.readMessage(subBuilder, extensionRegistry);
-              setInfo(subBuilder.buildPartial());
-              break;
-            }
-            case 64: {
-              ensureRolesSidIsMutable();
-              rolesSid_.add(input.readInt32());
-              break;
-            }
-            case 66: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addRolesSid(input.readInt32());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 72: {
-              ensureMemidsIsMutable();
-              memids_.add(input.readSInt64());
-              break;
-            }
-            case 74: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              while (input.getBytesUntilLimit() > 0) {
-                addMemids(input.readSInt64());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 80: {
-              int rawValue = input.readEnum();
-              org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value = org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType.valueOf(rawValue);
-              if (value != null) {
-                addTypes(value);
-              }
-              break;
-            }
-            case 82: {
-              int length = input.readRawVarint32();
-              int oldLimit = input.pushLimit(length);
-              while(input.getBytesUntilLimit() > 0) {
-                int rawValue = input.readEnum();
-                org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value = org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType.valueOf(rawValue);
-                if (value != null) {
-                  addTypes(value);
-                }
-              }
-              input.popLimit(oldLimit);
-              break;
-            }
+        org.openstreetmap.osmosis.osmbinary.Osmformat.Relation parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.openstreetmap.osmosis.osmbinary.Osmformat.Relation) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
           }
         }
+        return this;
       }
-      
       private int bitField0_;
-      
-      // required int64 id = 1;
+
       private long id_ ;
+      /**
+       * <code>required int64 id = 1;</code>
+       */
       public boolean hasId() {
         return ((bitField0_ & 0x00000001) == 0x00000001);
       }
+      /**
+       * <code>required int64 id = 1;</code>
+       */
       public long getId() {
         return id_;
       }
+      /**
+       * <code>required int64 id = 1;</code>
+       */
       public Builder setId(long value) {
         bitField0_ |= 0x00000001;
         id_ = value;
         
         return this;
       }
+      /**
+       * <code>required int64 id = 1;</code>
+       */
       public Builder clearId() {
         bitField0_ = (bitField0_ & ~0x00000001);
         id_ = 0L;
         
         return this;
       }
-      
-      // repeated uint32 keys = 2 [packed = true];
-      private java.util.List<java.lang.Integer> keys_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> keys_ = java.util.Collections.emptyList();
       private void ensureKeysIsMutable() {
         if (!((bitField0_ & 0x00000002) == 0x00000002)) {
           keys_ = new java.util.ArrayList<java.lang.Integer>(keys_);
           bitField0_ |= 0x00000002;
          }
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public java.util.List<java.lang.Integer>
           getKeysList() {
         return java.util.Collections.unmodifiableList(keys_);
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public int getKeysCount() {
         return keys_.size();
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public int getKeys(int index) {
         return keys_.get(index);
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder setKeys(
           int index, int value) {
         ensureKeysIsMutable();
@@ -8204,44 +12512,77 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder addKeys(int value) {
         ensureKeysIsMutable();
         keys_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder addAllKeys(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureKeysIsMutable();
-        super.addAll(values, keys_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, keys_);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 keys = 2 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays.
+       * </pre>
+       */
       public Builder clearKeys() {
-        keys_ = java.util.Collections.emptyList();;
+        keys_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000002);
         
         return this;
       }
-      
-      // repeated uint32 vals = 3 [packed = true];
-      private java.util.List<java.lang.Integer> vals_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> vals_ = java.util.Collections.emptyList();
       private void ensureValsIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
           vals_ = new java.util.ArrayList<java.lang.Integer>(vals_);
           bitField0_ |= 0x00000004;
          }
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public java.util.List<java.lang.Integer>
           getValsList() {
         return java.util.Collections.unmodifiableList(vals_);
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public int getValsCount() {
         return vals_.size();
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public int getVals(int index) {
         return vals_.get(index);
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public Builder setVals(
           int index, int value) {
         ensureValsIsMutable();
@@ -8249,50 +12590,74 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public Builder addVals(int value) {
         ensureValsIsMutable();
         vals_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public Builder addAllVals(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureValsIsMutable();
-        super.addAll(values, vals_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, vals_);
         
         return this;
       }
+      /**
+       * <code>repeated uint32 vals = 3 [packed = true];</code>
+       */
       public Builder clearVals() {
-        vals_ = java.util.Collections.emptyList();;
+        vals_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000004);
         
         return this;
       }
-      
-      // optional .OSMPBF.Info info = 4;
+
       private org.openstreetmap.osmosis.osmbinary.Osmformat.Info info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public boolean hasInfo() {
         return ((bitField0_ & 0x00000008) == 0x00000008);
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Info getInfo() {
         return info_;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public Builder setInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
         if (value == null) {
           throw new NullPointerException();
         }
         info_ = value;
-        
+
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public Builder setInfo(
           org.openstreetmap.osmosis.osmbinary.Osmformat.Info.Builder builderForValue) {
         info_ = builderForValue.build();
-        
+
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public Builder mergeInfo(org.openstreetmap.osmosis.osmbinary.Osmformat.Info value) {
         if (((bitField0_ & 0x00000008) == 0x00000008) &&
             info_ != org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance()) {
@@ -8301,35 +12666,65 @@ public final class Osmformat {
         } else {
           info_ = value;
         }
-        
+
         bitField0_ |= 0x00000008;
         return this;
       }
+      /**
+       * <code>optional .OSMPBF.Info info = 4;</code>
+       */
       public Builder clearInfo() {
         info_ = org.openstreetmap.osmosis.osmbinary.Osmformat.Info.getDefaultInstance();
-        
+
         bitField0_ = (bitField0_ & ~0x00000008);
         return this;
       }
-      
-      // repeated int32 roles_sid = 8 [packed = true];
-      private java.util.List<java.lang.Integer> rolesSid_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Integer> rolesSid_ = java.util.Collections.emptyList();
       private void ensureRolesSidIsMutable() {
         if (!((bitField0_ & 0x00000010) == 0x00000010)) {
           rolesSid_ = new java.util.ArrayList<java.lang.Integer>(rolesSid_);
           bitField0_ |= 0x00000010;
          }
       }
+      /**
+       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays
+       * </pre>
+       */
       public java.util.List<java.lang.Integer>
           getRolesSidList() {
         return java.util.Collections.unmodifiableList(rolesSid_);
       }
+      /**
+       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays
+       * </pre>
+       */
       public int getRolesSidCount() {
         return rolesSid_.size();
       }
+      /**
+       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays
+       * </pre>
+       */
       public int getRolesSid(int index) {
         return rolesSid_.get(index);
       }
+      /**
+       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays
+       * </pre>
+       */
       public Builder setRolesSid(
           int index, int value) {
         ensureRolesSidIsMutable();
@@ -8337,44 +12732,93 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays
+       * </pre>
+       */
       public Builder addRolesSid(int value) {
         ensureRolesSidIsMutable();
         rolesSid_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays
+       * </pre>
+       */
       public Builder addAllRolesSid(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureRolesSidIsMutable();
-        super.addAll(values, rolesSid_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, rolesSid_);
         
         return this;
       }
+      /**
+       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
+       *
+       * <pre>
+       * Parallel arrays
+       * </pre>
+       */
       public Builder clearRolesSid() {
-        rolesSid_ = java.util.Collections.emptyList();;
+        rolesSid_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000010);
         
         return this;
       }
-      
-      // repeated sint64 memids = 9 [packed = true];
-      private java.util.List<java.lang.Long> memids_ = java.util.Collections.emptyList();;
+
+      private java.util.List<java.lang.Long> memids_ = java.util.Collections.emptyList();
       private void ensureMemidsIsMutable() {
         if (!((bitField0_ & 0x00000020) == 0x00000020)) {
           memids_ = new java.util.ArrayList<java.lang.Long>(memids_);
           bitField0_ |= 0x00000020;
          }
       }
+      /**
+       * <code>repeated sint64 memids = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA encoded
+       * </pre>
+       */
       public java.util.List<java.lang.Long>
           getMemidsList() {
         return java.util.Collections.unmodifiableList(memids_);
       }
+      /**
+       * <code>repeated sint64 memids = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA encoded
+       * </pre>
+       */
       public int getMemidsCount() {
         return memids_.size();
       }
+      /**
+       * <code>repeated sint64 memids = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA encoded
+       * </pre>
+       */
       public long getMemids(int index) {
         return memids_.get(index);
       }
+      /**
+       * <code>repeated sint64 memids = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA encoded
+       * </pre>
+       */
       public Builder setMemids(
           int index, long value) {
         ensureMemidsIsMutable();
@@ -8382,27 +12826,48 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated sint64 memids = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA encoded
+       * </pre>
+       */
       public Builder addMemids(long value) {
         ensureMemidsIsMutable();
         memids_.add(value);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 memids = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA encoded
+       * </pre>
+       */
       public Builder addAllMemids(
           java.lang.Iterable<? extends java.lang.Long> values) {
         ensureMemidsIsMutable();
-        super.addAll(values, memids_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, memids_);
         
         return this;
       }
+      /**
+       * <code>repeated sint64 memids = 9 [packed = true];</code>
+       *
+       * <pre>
+       * DELTA encoded
+       * </pre>
+       */
       public Builder clearMemids() {
-        memids_ = java.util.Collections.emptyList();;
+        memids_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000020);
         
         return this;
       }
-      
-      // repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
+
       private java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> types_ =
         java.util.Collections.emptyList();
       private void ensureTypesIsMutable() {
@@ -8411,15 +12876,27 @@ public final class Osmformat {
           bitField0_ |= 0x00000040;
         }
       }
+      /**
+       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+       */
       public java.util.List<org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> getTypesList() {
         return java.util.Collections.unmodifiableList(types_);
       }
+      /**
+       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+       */
       public int getTypesCount() {
         return types_.size();
       }
+      /**
+       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+       */
       public org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType getTypes(int index) {
         return types_.get(index);
       }
+      /**
+       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+       */
       public Builder setTypes(
           int index, org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value) {
         if (value == null) {
@@ -8430,6 +12907,9 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+       */
       public Builder addTypes(org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType value) {
         if (value == null) {
           throw new NullPointerException();
@@ -8439,34 +12919,41 @@ public final class Osmformat {
         
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+       */
       public Builder addAllTypes(
           java.lang.Iterable<? extends org.openstreetmap.osmosis.osmbinary.Osmformat.Relation.MemberType> values) {
         ensureTypesIsMutable();
-        super.addAll(values, types_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, types_);
         
         return this;
       }
+      /**
+       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
+       */
       public Builder clearTypes() {
         types_ = java.util.Collections.emptyList();
         bitField0_ = (bitField0_ & ~0x00000040);
         
         return this;
       }
-      
+
       // @@protoc_insertion_point(builder_scope:OSMPBF.Relation)
     }
-    
+
     static {
       defaultInstance = new Relation(true);
       defaultInstance.initFields();
     }
-    
+
     // @@protoc_insertion_point(class_scope:OSMPBF.Relation)
   }
-  
-  
+
+
   static {
   }
-  
+
   // @@protoc_insertion_point(outer_class_scope)
 }
diff --git a/osmosis-pgsimple/build.gradle b/osmosis-pgsimple/build.gradle
index bed83bb..0baac5f 100644
--- a/osmosis-pgsimple/build.gradle
+++ b/osmosis-pgsimple/build.gradle
@@ -6,7 +6,7 @@ configurations {
 dependencies {
     compile project(':osmosis-core')
     compile group: 'org.postgis', name: 'postgis-jdbc', version: dependencyVersionPostGis
-    compile group: 'postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
+    compile group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
     testCompile project(':osmosis-dataset')
     testCompile project(':osmosis-testutil')
     testCompile project(':osmosis-xml')
diff --git a/osmosis-pgsnapshot/build.gradle b/osmosis-pgsnapshot/build.gradle
index d4a2f8b..5e84070 100644
--- a/osmosis-pgsnapshot/build.gradle
+++ b/osmosis-pgsnapshot/build.gradle
@@ -9,7 +9,7 @@ dependencies {
     compile group: 'commons-dbcp', name: 'commons-dbcp', version: dependencyVersionCommonsDbcp
     compile group: 'org.postgis', name: 'postgis-jdbc', version: dependencyVersionPostGis
     compile group: 'org.springframework', name: 'spring-jdbc', version: dependencyVersionSpring
-    compile group: 'postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
+    compile group: 'org.postgresql', name: 'postgresql', version: dependencyVersionPostgreSql
     testCompile project(':osmosis-dataset')
     testCompile project(':osmosis-testutil')
     testCompile project(':osmosis-xml')
diff --git a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/common/SchemaVersionValidator.java b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/common/SchemaVersionValidator.java
index 93bacbd..b337614 100644
--- a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/common/SchemaVersionValidator.java
+++ b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/common/SchemaVersionValidator.java
@@ -61,7 +61,7 @@ public class SchemaVersionValidator {
 		if (preferences.getValidateSchemaVersion()) {
 			int dbVersion;
 			
-			dbVersion = jdbcTemplate.queryForInt(SELECT_SQL);
+			dbVersion = jdbcTemplate.queryForObject(SELECT_SQL, Integer.class);
 			
 			if (dbVersion != expectedVersion) {
 				throw new OsmosisRuntimeException(
diff --git a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityDao.java b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityDao.java
index 54b7c95..e53539e 100644
--- a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityDao.java
+++ b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityDao.java
@@ -73,7 +73,7 @@ public abstract class EntityDao<T extends Entity> {
 	 * @return True if the entity exists in the database.
 	 */
 	public boolean exists(long entityId) {
-		return jdbcTemplate.queryForInt(entityMapper.getSqlSelectCount(true), entityId) > 0;
+		return jdbcTemplate.queryForObject(entityMapper.getSqlSelectCount(true), Integer.class, entityId) > 0;
 	}
 	
 	
diff --git a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityFeatureDao.java b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityFeatureDao.java
index d6d0e38..5d5d01e 100644
--- a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityFeatureDao.java
+++ b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityFeatureDao.java
@@ -51,7 +51,8 @@ public class EntityFeatureDao<Tef extends Storeable, Tdb extends DbFeature<Tef>>
 	 * @return All instances of this feature type for the entity.
 	 */
 	public Collection<Tdb> getAll(long entityId) {
-		return jdbcTemplate.query(entityFeatureMapper.getSqlSelect("", true, true), entityFeatureMapper.getRowMapper());
+		return jdbcTemplate.query(entityFeatureMapper.getSqlSelect("", true, true), new Object[] {entityId},
+				entityFeatureMapper.getRowMapper());
 	}
 	
 	
diff --git a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityMapper.java b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityMapper.java
index 27f07ae..d4846fd 100644
--- a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityMapper.java
+++ b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityMapper.java
@@ -3,12 +3,12 @@ package org.openstreetmap.osmosis.pgsnapshot.v0_6.impl;
 
 import java.sql.Timestamp;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.Map;
 
 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
 import org.openstreetmap.osmosis.core.domain.v0_6.Entity;
 import org.openstreetmap.osmosis.core.domain.v0_6.Tag;
-import org.openstreetmap.osmosis.hstore.PGHStore;
 import org.springframework.jdbc.core.RowMapper;
 
 
@@ -226,7 +226,7 @@ public abstract class EntityMapper<T extends Entity> {
 	 *            The entity containing the data to be inserted.
 	 */
 	protected void populateCommonEntityParameters(Map<String, Object> args, Entity entity) {
-		PGHStore tags;
+		Map<String, String> tags;
 		
 		// We can't write an entity with a null timestamp.
 		if (entity.getTimestamp() == null) {
@@ -234,7 +234,7 @@ public abstract class EntityMapper<T extends Entity> {
 					"Entity(" + entity.getType() + ") " + entity.getId() + " does not have a timestamp set.");
 		}
 		
-		tags = new PGHStore();
+		tags = new HashMap<String, String>(entity.getTags().size());
 		for (Tag tag : entity.getTags()) {
 			tags.put(tag.getKey(), tag.getValue());
 		}
diff --git a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityRowMapper.java b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityRowMapper.java
index 1674a64..d4b71a4 100644
--- a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityRowMapper.java
+++ b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityRowMapper.java
@@ -5,6 +5,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.Collection;
 import java.util.Date;
+import java.util.Map;
 import java.util.Map.Entry;
 
 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
@@ -12,7 +13,6 @@ import org.openstreetmap.osmosis.core.domain.v0_6.CommonEntityData;
 import org.openstreetmap.osmosis.core.domain.v0_6.Entity;
 import org.openstreetmap.osmosis.core.domain.v0_6.OsmUser;
 import org.openstreetmap.osmosis.core.domain.v0_6.Tag;
-import org.openstreetmap.osmosis.hstore.PGHStore;
 import org.springframework.jdbc.core.RowMapper;
 
 
@@ -64,9 +64,10 @@ public abstract class EntityRowMapper<T extends Entity> implements RowMapper<T>
 	 *             if a database error is encountered.
 	 * @return The common entity data.
 	 */
+	@SuppressWarnings("unchecked")
 	protected CommonEntityData mapCommonEntityData(ResultSet rs) throws SQLException {
 		CommonEntityData entityData;
-		PGHStore dbTags;
+		Map<String, String> dbTags;
 		Collection<Tag> tags;
 		
 		entityData = new CommonEntityData(
@@ -77,7 +78,7 @@ public abstract class EntityRowMapper<T extends Entity> implements RowMapper<T>
 			rs.getLong("changeset_id")
 		);
 		
-		dbTags = (PGHStore) rs.getObject("tags");
+		dbTags = (Map<String, String>) rs.getObject("tags");
 		if (dbTags != null) {
 			tags = entityData.getTags();
 			for (Entry<String, String> tagEntry : dbTags.entrySet()) {
diff --git a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/RelationMemberMapper.java b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/RelationMemberMapper.java
index f244e31..0a7f4ba 100644
--- a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/RelationMemberMapper.java
+++ b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/RelationMemberMapper.java
@@ -59,7 +59,7 @@ public class RelationMemberMapper extends EntityFeatureMapper<DbOrderedFeature<R
 				.append("s e ON f.").append(getParentEntityName()).append("_id = e.id");
 		}
 		if (filterByEntityId) {
-			resultSql.append(" WHERE entity_id = ?");
+			resultSql.append(" WHERE relation_id = ?");
 		}
 		if (orderBy) {
 			resultSql.append(getSqlDefaultOrderBy());
diff --git a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/WayDao.java b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/WayDao.java
index 8a7b213..237eefe 100644
--- a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/WayDao.java
+++ b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/WayDao.java
@@ -58,26 +58,6 @@ public class WayDao extends EntityDao<Way> {
 		wayNodeMapper = new WayNodeMapper();
 		wayNodeDao = new EntityFeatureDao<WayNode, DbOrderedFeature<WayNode>>(jdbcTemplate, wayNodeMapper);
 	}
-	
-	
-	private void loadFeatures(long entityId, Way entity) {
-		entity.getWayNodes().addAll(wayNodeDao.getAllRaw(entityId));
-	}
-	
-	
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public Way getEntity(long entityId) {
-		Way entity;
-		
-		entity = super.getEntity(entityId);
-		
-		loadFeatures(entityId, entity);
-		
-		return entity;
-	}
 
 
 	/**
diff --git a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/WayNodeMapper.java b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/WayNodeMapper.java
index 91b44fb..1125610 100644
--- a/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/WayNodeMapper.java
+++ b/osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/WayNodeMapper.java
@@ -48,7 +48,7 @@ public class WayNodeMapper extends EntityFeatureMapper<DbOrderedFeature<WayNode>
 				.append("s e ON f.").append(getParentEntityName()).append("_id = e.id");
 		}
 		if (filterByEntityId) {
-			resultSql.append(" WHERE entity_id = ?");
+			resultSql.append(" WHERE way_id = ?");
 		}
 		if (orderBy) {
 			resultSql.append(getSqlDefaultOrderBy());
diff --git a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/common/ServerStateReader.java b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/common/ServerStateReader.java
index 917a73c..62c283d 100644
--- a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/common/ServerStateReader.java
+++ b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/common/ServerStateReader.java
@@ -16,6 +16,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
+import org.openstreetmap.osmosis.core.OsmosisConstants;
 
 
 /**
@@ -92,6 +93,7 @@ public class ServerStateReader {
 			URLConnection connection = stateUrl.openConnection();
 			connection.setReadTimeout(15 * 60 * 1000); // timeout 15 minutes
 			connection.setConnectTimeout(15 * 60 * 1000); // timeout 15 minutes
+			connection.setRequestProperty("User-Agent", "Osmosis/" + OsmosisConstants.VERSION);
 			stateStream = connection.getInputStream();
 			
 			reader = new BufferedReader(new InputStreamReader(stateStream));
diff --git a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/BaseReplicationDownloader.java b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/BaseReplicationDownloader.java
index 00779e3..be5d09a 100644
--- a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/BaseReplicationDownloader.java
+++ b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/BaseReplicationDownloader.java
@@ -18,6 +18,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
+import org.openstreetmap.osmosis.core.OsmosisConstants;
 import org.openstreetmap.osmosis.core.task.common.RunnableTask;
 import org.openstreetmap.osmosis.core.util.FileBasedLock;
 import org.openstreetmap.osmosis.core.util.PropertiesPersister;
@@ -104,6 +105,7 @@ public abstract class BaseReplicationDownloader implements RunnableTask {
 			URLConnection connection = changesetUrl.openConnection();
 			connection.setReadTimeout(15 * 60 * 1000); // timeout 15 minutes
 			connection.setConnectTimeout(15 * 60 * 1000); // timeout 15 minutes
+			connection.setRequestProperty("User-Agent", "Osmosis/" + OsmosisConstants.VERSION);
 			inputStream = connection.getInputStream();
 			source = new BufferedInputStream(inputStream, 65536);
 			
diff --git a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/IntervalDownloader.java b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/IntervalDownloader.java
index 3178134..6df0990 100644
--- a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/IntervalDownloader.java
+++ b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/IntervalDownloader.java
@@ -20,6 +20,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
+import org.openstreetmap.osmosis.core.OsmosisConstants;
 import org.openstreetmap.osmosis.core.merge.common.ConflictResolutionMethod;
 import org.openstreetmap.osmosis.core.pipeline.common.TaskRunner;
 import org.openstreetmap.osmosis.core.task.v0_6.ChangeSink;
@@ -111,6 +112,7 @@ public class IntervalDownloader implements RunnableChangeSource {
 			URLConnection connection = timestampUrl.openConnection();
 			connection.setReadTimeout(15 * 60 * 1000); // timeout 15 minutes
 			connection.setConnectTimeout(15 * 60 * 1000); // timeout 15 minutes
+			connection.setRequestProperty("User-Agent", "Osmosis/" + OsmosisConstants.VERSION);
 			timestampStream = connection.getInputStream();
 			
 			reader = new BufferedReader(new InputStreamReader(timestampStream));
diff --git a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationFileMerger.java b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationFileMerger.java
index 6dc51fe..88472bb 100644
--- a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationFileMerger.java
+++ b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationFileMerger.java
@@ -10,7 +10,6 @@ import org.openstreetmap.osmosis.core.container.v0_6.ChangeContainer;
 import org.openstreetmap.osmosis.core.sort.v0_6.ChangeForStreamableApplierComparator;
 import org.openstreetmap.osmosis.core.sort.v0_6.ChangeSorter;
 import org.openstreetmap.osmosis.core.task.v0_6.ChangeSink;
-import org.openstreetmap.osmosis.core.util.PropertiesPersister;
 import org.openstreetmap.osmosis.replication.common.FileReplicationStore;
 import org.openstreetmap.osmosis.replication.common.ReplicationState;
 import org.openstreetmap.osmosis.replication.common.ReplicationStore;
@@ -35,7 +34,6 @@ public class ReplicationFileMerger extends BaseReplicationDownloader {
 	private boolean sinkActive;
 	private ChangeSink changeSink;
 	private ReplicationState currentDataState;
-	private PropertiesPersister dataStatePersister;
 	private ReplicationStore replicationStore;
 
 
@@ -47,7 +45,7 @@ public class ReplicationFileMerger extends BaseReplicationDownloader {
 	 */
 	public ReplicationFileMerger(File workingDirectory) {
 		super(workingDirectory);
-
+		
 		replicationStore = new FileReplicationStore(new File(getWorkingDirectory(), DATA_DIRECTORY), true);
 
 		sinkActive = false;
@@ -77,7 +75,7 @@ public class ReplicationFileMerger extends BaseReplicationDownloader {
 		long intervalLength;
 
 		// Read the current persisted state.
-		currentDataState = new ReplicationState(dataStatePersister.loadMap());
+		currentDataState = replicationStore.getCurrentState();
 
 		// Get the default maximum timestamp according to base calculations.
 		maximumTimestamp = super.calculateMaximumTimestamp(configuration, serverTimestamp, localTimestamp);
diff --git a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationLagReader.java b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationLagReader.java
index f43ec31..4854295 100644
--- a/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationLagReader.java
+++ b/osmosis-replication/src/main/java/org/openstreetmap/osmosis/replication/v0_6/ReplicationLagReader.java
@@ -119,10 +119,13 @@ public class ReplicationLagReader implements RunnableTask {
 				);
 				
 			} else {
+				Object[] args = {
+					new Long(lag)
+				};
 				
 				// just some seconds
 				System.out.println(
-					new MessageFormat("{0} second(s)").format(lag)
+					new MessageFormat("{0} second(s)").format(args)
 				);
 				
 			}
diff --git a/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/intervalConfiguration.txt b/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/intervalConfiguration.txt
index 43e95d8..4e3d769 100644
--- a/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/intervalConfiguration.txt
+++ b/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/intervalConfiguration.txt
@@ -1,5 +1,5 @@
 # The URL of the directory containing change files.
-baseUrl=http://planet.openstreetmap.org/hourly
+baseUrl=http://planet.openstreetmap.org/replication/hour
 
 # The length of an extraction interval in seconds (3600 = 1 hour).
 intervalLength=3600
diff --git a/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/replicationDownloaderConfiguration.txt b/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/replicationDownloaderConfiguration.txt
index c1413eb..3239f85 100644
--- a/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/replicationDownloaderConfiguration.txt
+++ b/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/replicationDownloaderConfiguration.txt
@@ -1,5 +1,5 @@
 # The URL of the directory containing change files.
-baseUrl=http://planet.openstreetmap.org/minute-replicate
+baseUrl=http://planet.openstreetmap.org/replication/minute
 
 # Defines the maximum time interval in seconds to download in a single invocation.
 # Setting to 0 disables this feature.
diff --git a/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/replicationFileMergerConfiguration.txt b/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/replicationFileMergerConfiguration.txt
index b843b97..7b3e54f 100644
--- a/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/replicationFileMergerConfiguration.txt
+++ b/osmosis-replication/src/main/resources/org/openstreetmap/osmosis/replication/v0_6/impl/replicationFileMergerConfiguration.txt
@@ -1,5 +1,5 @@
 # The URL of the directory containing change files.
-baseUrl=http://planet.openstreetmap.org/minute-replicate
+baseUrl=http://planet.openstreetmap.org/replication/minute
 
 # The length of an extraction interval in seconds (3600 = 1 hour).
 intervalLength=60
diff --git a/osmosis-set/src/test/java/org/openstreetmap/osmosis/set/v0_6/ChangeSimplifierTest.java b/osmosis-set/src/test/java/org/openstreetmap/osmosis/set/v0_6/ChangeSimplifierTest.java
index 8dabf8b..cd552b8 100644
--- a/osmosis-set/src/test/java/org/openstreetmap/osmosis/set/v0_6/ChangeSimplifierTest.java
+++ b/osmosis-set/src/test/java/org/openstreetmap/osmosis/set/v0_6/ChangeSimplifierTest.java
@@ -6,8 +6,7 @@ import java.io.IOException;
 import java.util.Date;
 import java.util.HashMap;
 
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Test;
 import org.openstreetmap.osmosis.core.Osmosis;
 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
diff --git a/osmosis-set/src/test/java/org/openstreetmap/osmosis/set/v0_6/EntityMergerTest.java b/osmosis-set/src/test/java/org/openstreetmap/osmosis/set/v0_6/EntityMergerTest.java
index bb9510e..ce2215b 100644
--- a/osmosis-set/src/test/java/org/openstreetmap/osmosis/set/v0_6/EntityMergerTest.java
+++ b/osmosis-set/src/test/java/org/openstreetmap/osmosis/set/v0_6/EntityMergerTest.java
@@ -6,8 +6,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import junit.framework.Assert;
-
+import org.junit.Assert;
 import org.junit.Test;
 import org.openstreetmap.osmosis.core.Osmosis;
 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
diff --git a/osmosis-tagfilter/src/main/java/org/openstreetmap/osmosis/tagfilter/common/KeyValueFileReader.java b/osmosis-tagfilter/src/main/java/org/openstreetmap/osmosis/tagfilter/common/KeyValueFileReader.java
index fe149e4..9688067 100644
--- a/osmosis-tagfilter/src/main/java/org/openstreetmap/osmosis/tagfilter/common/KeyValueFileReader.java
+++ b/osmosis-tagfilter/src/main/java/org/openstreetmap/osmosis/tagfilter/common/KeyValueFileReader.java
@@ -16,7 +16,7 @@ import java.util.logging.Logger;
  * Reads the content of a file containing "key.value" tags.
  * 
  * <p>
- * The content of the file contains one key.value pair per line. Example:<br/>
+ * The content of the file contains one key.value pair per line. Example:<br>
  * 
  * <code>
  * railway.tram
diff --git a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformHelper.java b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformHelper.java
index 8841587..ba1ed1c 100644
--- a/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformHelper.java
+++ b/osmosis-tagtransform/src/main/java/org/openstreetmap/osmosis/tagtransform/impl/TransformHelper.java
@@ -29,7 +29,7 @@ import org.openstreetmap.osmosis.xml.common.XmlTimestampFormat;
 
 
 /**
- * Class is intended to provide utility place for tag transform functionality. <br/>
+ * Class is intended to provide utility place for tag transform functionality.
  * See {@link org.openstreetmap.osmosis.tagtransform.v0_6.TransformTask
  * TransformTask} for example implementation.
  * 
diff --git a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlChangeUploader.java b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlChangeUploader.java
index f832910..37b403b 100644
--- a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlChangeUploader.java
+++ b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlChangeUploader.java
@@ -122,6 +122,7 @@ public class XmlChangeUploader implements ChangeSink {
             System.err.println("DEBUG: URL= " + url.toString());
             HttpURLConnection httpCon = (HttpURLConnection)
                                       url.openConnection();
+            httpCon.setRequestProperty("User-Agent", "Osmosis/" + OsmosisConstants.VERSION);
 
             // we do not use Authenticator.setDefault()
             // here to stay thread-safe.
diff --git a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlDownloader.java b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlDownloader.java
index f1f7dd2..2a463ba 100644
--- a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlDownloader.java
+++ b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlDownloader.java
@@ -19,6 +19,7 @@ import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
 
 import org.openstreetmap.osmosis.core.OsmosisRuntimeException;
+import org.openstreetmap.osmosis.core.OsmosisConstants;
 import org.openstreetmap.osmosis.core.container.v0_6.BoundContainer;
 import org.openstreetmap.osmosis.core.domain.v0_6.Bound;
 import org.openstreetmap.osmosis.core.task.v0_6.RunnableSource;
@@ -235,6 +236,7 @@ public class XmlDownloader implements RunnableSource {
         url = new URL(pUrlStr);
         myActiveConnection = (HttpURLConnection) url.openConnection();
 
+        myActiveConnection.setRequestProperty("User-Agent", "Osmosis/" + OsmosisConstants.VERSION);
         myActiveConnection.setRequestProperty("Accept-Encoding", "gzip, deflate");
 
         responseCode = myActiveConnection.getResponseCode();
diff --git a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlWriter.java b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlWriter.java
index 25a5550..aa72bf2 100644
--- a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlWriter.java
+++ b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/XmlWriter.java
@@ -56,8 +56,8 @@ public class XmlWriter extends BaseXmlWriter implements Sink {
 	 * @param compressionMethod
 	 *            Specifies the compression method to employ.
 	 * @param legacyBound
-	 *            If true, write the legacy <bound> element instead of the
-	 *            correct <bounds> one.
+	 *            If true, write the legacy {@literal <bound>} element
+	 *            instead of the correct {@literal <bounds>} one.
 	 */
 	public XmlWriter(File file, CompressionMethod compressionMethod, boolean legacyBound) {
 		super(file, compressionMethod);
diff --git a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/BoundWriter.java b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/BoundWriter.java
index 4bce565..f3272c9 100644
--- a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/BoundWriter.java
+++ b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/BoundWriter.java
@@ -24,8 +24,8 @@ public class BoundWriter extends ElementWriter {
 	 * @param indentLevel
 	 *            The indent level of the element.
 	 * @param legacyBound
-	 *            If true, write the legacy <bound> element instead of the
-	 *            correct <bounds> one.
+	 *            If true, write the legacy {@literal <bound>} element
+	 *            instead of the correct {@literal <bounds>} one.
 	 */
 	public BoundWriter(String elementName, int indentLevel, boolean legacyBound) {
 		super(elementName, indentLevel);
diff --git a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/OsmWriter.java b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/OsmWriter.java
index 8d72683..2efbccc 100644
--- a/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/OsmWriter.java
+++ b/osmosis-xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/OsmWriter.java
@@ -38,9 +38,9 @@ public class OsmWriter extends ElementWriter {
 	 *            element is embedded within a higher level element (eg.
 	 *            changesets)
 	 * @param legacyBound
-	 *            If true, write the legacy <bound> element instead of the
-	 *            correct <bounds> one.
-	 *        
+	 *	      If true, write the legacy {@literal <bound>} element
+	 *	      instead of the correct {@literal <bounds>} one.
+	 *
 	 */
 	public OsmWriter(String elementName, int indentLevel, boolean renderAttributes, boolean legacyBound) {
 		super(elementName, indentLevel);
diff --git a/osmosis-xml/src/test/java/org/openstreetmap/osmosis/xml/common/ElementWriterTest.java b/osmosis-xml/src/test/java/org/openstreetmap/osmosis/xml/common/ElementWriterTest.java
index 0c7270d..7809ae2 100644
--- a/osmosis-xml/src/test/java/org/openstreetmap/osmosis/xml/common/ElementWriterTest.java
+++ b/osmosis-xml/src/test/java/org/openstreetmap/osmosis/xml/common/ElementWriterTest.java
@@ -5,10 +5,9 @@ import java.io.BufferedWriter;
 import java.io.IOException;
 import java.io.StringWriter;
 
+import org.junit.Assert;
 import org.junit.Test;
 
-import junit.framework.Assert;
-
 
 /**
  * Tests the element writer.
diff --git a/package/bin/osmosis.bat b/package/bin/osmosis.bat
index 18a4234..7f7a773 100644
--- a/package/bin/osmosis.bat
+++ b/package/bin/osmosis.bat
@@ -36,6 +36,6 @@ cd /D %SAVEDIR%
 
 set MAINCLASS=org.codehaus.classworlds.Launcher
 set PLEXUS_CP=%MYAPP_HOME%\lib\default\plexus-classworlds-2.4.jar
-SET EXEC=%JAVACMD% %JAVACMD_OPTIONS% -cp "%PLEXUS_CP%" -Dapp.home="%MYAPP_HOME%" -Dclassworlds.conf="%MYAPP_HOME%\config\plexus.conf" %MAINCLASS%  %OSMOSIS_OPTIONS% %*
+SET EXEC="%JAVACMD%" %JAVACMD_OPTIONS% -cp "%PLEXUS_CP%" -Dapp.home="%MYAPP_HOME%" -Dclassworlds.conf="%MYAPP_HOME%\config\plexus.conf" %MAINCLASS%  %OSMOSIS_OPTIONS% %*
 
-%EXEC%
\ No newline at end of file
+%EXEC%
diff --git a/package/changes.txt b/package/changes.txt
index bd4329b..f74e37a 100644
--- a/package/changes.txt
+++ b/package/changes.txt
@@ -1,3 +1,24 @@
+0.44
+Improve default settings and performance of pgsnapshot load scripts.
+Fix remaining 64-bit id tracking problems.
+Increase maximum way node count from 16-bit to 32-bit int.
+Full null pointer exception in --merge-replication-files.
+Fix javadoc errors on JDK 1.8.
+Support spaces in installation path on Windows.
+Set User-Agent header on all HTTP requests.
+Support importing negative ids to apidb.
+Fix one-off error in current way/relation loading.
+Fix query for retrieving way nodes and relation members in pgsnapshot module.
+Prevent reading duplicate way nodes in pgsnapshot module.
+Fix deprecation warnings caused by upgrading to newer dependencies.
+Upgrade to protobuf 2.6.0.
+Fix replicate_osm_file.sh to return the correct exit status, not always -1.
+Add scripts to build a docker image for testing database tasks.
+Update build to download Gradle via https.
+Fix broken console logging in replication lag reader causing a crash.
+Update default replication URLs to match current planet server layout.
+Add IntelliJ IDE support.
+
 0.43.1
 Fix the version number displayed on startup to be up to date.
 Remove RELEASE suffix from version number of release builds.
diff --git a/package/script/contrib/replicate_osm_file.sh b/package/script/contrib/replicate_osm_file.sh
index 4891f16..bfa9546 100755
--- a/package/script/contrib/replicate_osm_file.sh
+++ b/package/script/contrib/replicate_osm_file.sh
@@ -23,11 +23,13 @@ CMD="osmosis -q"
 # Launch the osmosis process.
 $CMD --read-change-interval $WORKING_DIRECTORY --read-xml $OSM_FILE --apply-change --bounding-box left=$LEFT bottom=$BOTTOM right=$RIGHT top=$TOP --write-xml $TEMP_OSM_FILE
 
+STATUS=$?
+
 # Verify that osmosis ran successfully.
-if [ "$?" -ne "0" ]; then
+if [ "$STATUS" -ne "0" ]; then
 	
 	echo "Osmosis failed, aborting."
-	exit -1
+	exit $STATUS
 	
 fi
 
diff --git a/package/script/pgsnapshot_load_0.6.sql b/package/script/pgsnapshot_load_0.6.sql
index 5480738..bfde11c 100644
--- a/package/script/pgsnapshot_load_0.6.sql
+++ b/package/script/pgsnapshot_load_0.6.sql
@@ -1,3 +1,6 @@
+-- Allow data loss (but not corruption) in the case of a power outage. This is okay because we need to re-run the script anyways.
+SET synchronous_commit TO OFF;
+
 -- Drop all primary keys and indexes to improve load speed.
 ALTER TABLE nodes DROP CONSTRAINT pk_nodes;
 ALTER TABLE ways DROP CONSTRAINT pk_ways;
@@ -10,9 +13,13 @@ DROP INDEX idx_relation_members_member_id_and_type;
 DROP INDEX idx_ways_bbox;
 DROP INDEX idx_ways_linestring;
 
--- Comment these out if the COPY files include bbox or linestring column values.
-SELECT DropGeometryColumn('ways', 'bbox');
-SELECT DropGeometryColumn('ways', 'linestring');
+-- Uncomment these out if bbox or linestring columns are needed and the COPY
+-- files do not include them. If you want these columns you should use the
+-- enableBboxBuilder or enableLinestringBuilder options to --write-pgsql-dump
+-- as they are faster than the following SQL.
+
+/*SELECT DropGeometryColumn('ways', 'bbox');
+SELECT DropGeometryColumn('ways', 'linestring');*/
 
 -- Import the table data from the data files using the fast COPY method.
 \copy users FROM 'users.txt'
@@ -32,33 +39,44 @@ CREATE INDEX idx_nodes_geom ON nodes USING gist (geom);
 CREATE INDEX idx_way_nodes_node_id ON way_nodes USING btree (node_id);
 CREATE INDEX idx_relation_members_member_id_and_type ON relation_members USING btree (member_id, member_type);
 
--- Comment these out if the COPY files include bbox or linestring column values.
-SELECT AddGeometryColumn('ways', 'bbox', 4326, 'GEOMETRY', 2);
-SELECT AddGeometryColumn('ways', 'linestring', 4326, 'GEOMETRY', 2);
+ALTER TABLE ONLY nodes CLUSTER ON idx_nodes_geom;
+ALTER TABLE ONLY way_nodes CLUSTER ON pk_way_nodes;
+ALTER TABLE ONLY relation_members CLUSTER ON pk_relation_members;
+
+-- Uncomment these if bbox or linestring columns are needed and the COPY files do not include them.
 
--- Comment these out if the COPY files include bbox or linestring column values.
 -- Update the bbox column of the way table.
+/*SELECT AddGeometryColumn('ways', 'bbox', 4326, 'GEOMETRY', 2);
 UPDATE ways SET bbox = (
 	SELECT ST_Envelope(ST_Collect(geom))
 	FROM nodes JOIN way_nodes ON way_nodes.node_id = nodes.id
 	WHERE way_nodes.way_id = ways.id
-);
+);*/
+
 -- Update the linestring column of the way table.
+/*SELECT AddGeometryColumn('ways', 'linestring', 4326, 'GEOMETRY', 2);
 UPDATE ways w SET linestring = (
 	SELECT ST_MakeLine(c.geom) AS way_line FROM (
 		SELECT n.geom AS geom
 		FROM nodes n INNER JOIN way_nodes wn ON n.id = wn.node_id
 		WHERE (wn.way_id = w.id) ORDER BY wn.sequence_id
 	) c
-);
+);*/
 
--- Index the way bounding box column.
+-- Index the way bounding box column. If you don't have one of these columns, comment out the index
 CREATE INDEX idx_ways_bbox ON ways USING gist (bbox);
 CREATE INDEX idx_ways_linestring ON ways USING gist (linestring);
 
--- Update all clustered tables because it doesn't happen implicitly.
-CLUSTER nodes USING idx_nodes_geom;
-CLUSTER ways USING idx_ways_linestring;
+ALTER TABLE ONLY ways CLUSTER ON idx_ways_bbox;
+ALTER TABLE ONLY ways CLUSTER ON idx_ways_linestring;
+
+-- Optional: CLUSTER imported tables. CLUSTER takes a significant amount of time to run and a 
+-- significant amount of free disk space but speeds up some queries.
+
+--CLUSTER nodes;
+--CLUSTER ways;
+
+-- It is not necessary to CLUSTER way_nodes or relation_members after the initial load but you might want to do so later on
 
 -- Perform database maintenance due to large database changes.
-VACUUM ANALYZE;
+ANALYZE;
diff --git a/package/script/pgsnapshot_schema_0.6.sql b/package/script/pgsnapshot_schema_0.6.sql
index 595d160..14e1f57 100644
--- a/package/script/pgsnapshot_schema_0.6.sql
+++ b/package/script/pgsnapshot_schema_0.6.sql
@@ -108,9 +108,15 @@ CREATE INDEX idx_way_nodes_node_id ON way_nodes USING btree (node_id);
 CREATE INDEX idx_relation_members_member_id_and_type ON relation_members USING btree (member_id, member_type);
 
 
--- Cluster tables by geographical location.
-CLUSTER nodes USING idx_nodes_geom;
+-- Set to cluster nodes by geographical location.
+ALTER TABLE ONLY nodes CLUSTER ON idx_nodes_geom;
 
+-- Set to cluster the tables showing relationship by parent ID and sequence
+ALTER TABLE ONLY way_nodes CLUSTER ON pk_way_nodes;
+ALTER TABLE ONLY relation_members CLUSTER ON pk_relation_members;
+
+-- There are no sensible CLUSTER orders for users or relations.
+-- Depending on geometry columns different clustings of ways may be desired.
 
 -- Create the function that provides "unnest" functionality while remaining compatible with 8.3.
 CREATE OR REPLACE FUNCTION unnest_bbox_way_nodes() RETURNS void AS $$
@@ -136,3 +142,29 @@ DECLARE
 BEGIN
 END;
 $$ LANGUAGE plpgsql;
+
+-- Manually set statistics for the way_nodes and relation_members table
+-- Postgres gets horrible counts of distinct values by sampling random pages
+-- and can be off by an 1-2 orders of magnitude
+
+-- Size of the ways table / size of the way_nodes table
+ALTER TABLE way_nodes ALTER COLUMN way_id SET (n_distinct = -0.08);
+
+-- Size of the nodes table / size of the way_nodes table * 0.998
+-- 0.998 is a factor for nodes not in ways
+ALTER TABLE way_nodes ALTER COLUMN node_id SET (n_distinct = -0.83);
+
+-- API allows a maximum of 2000 nodes/way. Unlikely to impact query plans.
+ALTER TABLE way_nodes ALTER COLUMN sequence_id SET (n_distinct = 2000);
+
+-- Size of the relations table / size of the relation_members table
+ALTER TABLE relation_members ALTER COLUMN relation_id SET (n_distinct = -0.09);
+
+-- Based on June 2013 data
+ALTER TABLE relation_members ALTER COLUMN member_id SET (n_distinct = -0.62);
+
+-- Based on June 2013 data. Unlikely to impact query plans.
+ALTER TABLE relation_members ALTER COLUMN member_role SET (n_distinct = 6500);
+
+-- Based on June 2013 data. Unlikely to impact query plans.
+ALTER TABLE relation_members ALTER COLUMN sequence_id SET (n_distinct = 10000);
diff --git a/settings.gradle b/settings.gradle
index ae02cdf..c3cad8f 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,11 +1,11 @@
-include 'osmosis-apidb'
-include 'osmosis-areafilter'
 include 'build-support'
+include 'db-server'
+include 'osmosis-areafilter'
+include 'osmosis-apidb'
 include 'osmosis-core'
 include 'osmosis-dataset'
 include 'osmosis-extract'
 include 'osmosis-hstore-jdbc'
-include 'package'
 include 'osmosis-osm-binary'
 include 'osmosis-pbf'
 include 'osmosis-pbf2'
@@ -18,3 +18,4 @@ include 'osmosis-tagfilter'
 include 'osmosis-tagtransform'
 include 'osmosis-testutil'
 include 'osmosis-xml'
+include 'package'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmosis.git



More information about the Pkg-grass-devel mailing list