// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: osmformat.proto

package crosby.binary;

public final class Osmformat {
  private Osmformat() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }
  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>
     */
    crosby.binary.Osmformat.HeaderBBox getBbox();

    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    java.util.List<java.lang.String>
        getRequiredFeaturesList();
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    int getRequiredFeaturesCount();
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    java.lang.String getRequiredFeatures(int index);
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    com.google.protobuf.ByteString
        getRequiredFeaturesBytes(int index);

    /**
     * <code>repeated string optional_features = 5;</code>
     */
    java.util.List<java.lang.String>
        getOptionalFeaturesList();
    /**
     * <code>repeated string optional_features = 5;</code>
     */
    int getOptionalFeaturesCount();
    /**
     * <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();
    /**
     * <code>optional string writingprogram = 16;</code>
     */
    java.lang.String getWritingprogram();
    /**
     * <code>optional string writingprogram = 16;</code>
     */
    com.google.protobuf.ByteString
        getWritingprogramBytes();

    /**
     * <pre>
     * From the bbox field.
     * </pre>
     *
     * <code>optional string source = 17;</code>
     */
    boolean hasSource();
    /**
     * <pre>
     * From the bbox field.
     * </pre>
     *
     * <code>optional string source = 17;</code>
     */
    java.lang.String getSource();
    /**
     * <pre>
     * From the bbox field.
     * </pre>
     *
     * <code>optional string source = 17;</code>
     */
    com.google.protobuf.ByteString
        getSourceBytes();

    /**
     * <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>
     *
     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
     */
    boolean hasOsmosisReplicationTimestamp();
    /**
     * <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>
     *
     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
     */
    long getOsmosisReplicationTimestamp();

    /**
     * <pre>
     * replication sequence number (sequenceNumber in state.txt)
     * </pre>
     *
     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
     */
    boolean hasOsmosisReplicationSequenceNumber();
    /**
     * <pre>
     * replication sequence number (sequenceNumber in state.txt)
     * </pre>
     *
     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
     */
    long getOsmosisReplicationSequenceNumber();

    /**
     * <pre>
     * replication base URL (from Osmosis' configuration.txt file)
     * </pre>
     *
     * <code>optional string osmosis_replication_base_url = 34;</code>
     */
    boolean hasOsmosisReplicationBaseUrl();
    /**
     * <pre>
     * replication base URL (from Osmosis' configuration.txt file)
     * </pre>
     *
     * <code>optional string osmosis_replication_base_url = 34;</code>
     */
    java.lang.String getOsmosisReplicationBaseUrl();
    /**
     * <pre>
     * replication base URL (from Osmosis' configuration.txt file)
     * </pre>
     *
     * <code>optional string osmosis_replication_base_url = 34;</code>
     */
    com.google.protobuf.ByteString
        getOsmosisReplicationBaseUrlBytes();
  }
  /**
   * Protobuf type {@code OSMPBF.HeaderBlock}
   */
  public  static final class HeaderBlock extends
      com.google.protobuf.GeneratedMessageLite<
          HeaderBlock, HeaderBlock.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBlock)
      HeaderBlockOrBuilder {
    private HeaderBlock() {
      requiredFeatures_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
      optionalFeatures_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
      writingprogram_ = "";
      source_ = "";
      osmosisReplicationBaseUrl_ = "";
    }
    private int bitField0_;
    public static final int BBOX_FIELD_NUMBER = 1;
    private crosby.binary.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 crosby.binary.Osmformat.HeaderBBox getBbox() {
      return bbox_ == null ? crosby.binary.Osmformat.HeaderBBox.getDefaultInstance() : bbox_;
    }
    /**
     * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
     */
    private void setBbox(crosby.binary.Osmformat.HeaderBBox value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bbox_ = value;
      bitField0_ |= 0x00000001;
      }
    /**
     * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
     */
    private void setBbox(
        crosby.binary.Osmformat.HeaderBBox.Builder builderForValue) {
      bbox_ = builderForValue.build();
      bitField0_ |= 0x00000001;
    }
    /**
     * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
     */
    private void mergeBbox(crosby.binary.Osmformat.HeaderBBox value) {
      if (bbox_ != null &&
          bbox_ != crosby.binary.Osmformat.HeaderBBox.getDefaultInstance()) {
        bbox_ =
          crosby.binary.Osmformat.HeaderBBox.newBuilder(bbox_).mergeFrom(value).buildPartial();
      } else {
        bbox_ = value;
      }
      bitField0_ |= 0x00000001;
    }
    /**
     * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
     */
    private void clearBbox() {  bbox_ = null;
      bitField0_ = (bitField0_ & ~0x00000001);
    }

    public static final int REQUIRED_FEATURES_FIELD_NUMBER = 4;
    private com.google.protobuf.Internal.ProtobufList<java.lang.String> requiredFeatures_;
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    public java.util.List<java.lang.String> getRequiredFeaturesList() {
      return requiredFeatures_;
    }
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    public int getRequiredFeaturesCount() {
      return requiredFeatures_.size();
    }
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    public java.lang.String getRequiredFeatures(int index) {
      return requiredFeatures_.get(index);
    }
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    public com.google.protobuf.ByteString
        getRequiredFeaturesBytes(int index) {
      return com.google.protobuf.ByteString.copyFromUtf8(
          requiredFeatures_.get(index));
    }
    private void ensureRequiredFeaturesIsMutable() {
      if (!requiredFeatures_.isModifiable()) {
        requiredFeatures_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(requiredFeatures_);
       }
    }
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    private void setRequiredFeatures(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureRequiredFeaturesIsMutable();
      requiredFeatures_.set(index, value);
    }
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    private void addRequiredFeatures(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureRequiredFeaturesIsMutable();
      requiredFeatures_.add(value);
    }
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    private void addAllRequiredFeatures(
        java.lang.Iterable<java.lang.String> values) {
      ensureRequiredFeaturesIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, requiredFeatures_);
    }
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    private void clearRequiredFeatures() {
      requiredFeatures_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
    }
    /**
     * <pre>
     * Additional tags to aid in parsing this dataset 
     * </pre>
     *
     * <code>repeated string required_features = 4;</code>
     */
    private void addRequiredFeaturesBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureRequiredFeaturesIsMutable();
      requiredFeatures_.add(value.toStringUtf8());
    }

    public static final int OPTIONAL_FEATURES_FIELD_NUMBER = 5;
    private com.google.protobuf.Internal.ProtobufList<java.lang.String> optionalFeatures_;
    /**
     * <code>repeated string optional_features = 5;</code>
     */
    public java.util.List<java.lang.String> getOptionalFeaturesList() {
      return optionalFeatures_;
    }
    /**
     * <code>repeated string optional_features = 5;</code>
     */
    public int getOptionalFeaturesCount() {
      return optionalFeatures_.size();
    }
    /**
     * <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 com.google.protobuf.ByteString.copyFromUtf8(
          optionalFeatures_.get(index));
    }
    private void ensureOptionalFeaturesIsMutable() {
      if (!optionalFeatures_.isModifiable()) {
        optionalFeatures_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(optionalFeatures_);
       }
    }
    /**
     * <code>repeated string optional_features = 5;</code>
     */
    private void setOptionalFeatures(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureOptionalFeaturesIsMutable();
      optionalFeatures_.set(index, value);
    }
    /**
     * <code>repeated string optional_features = 5;</code>
     */
    private void addOptionalFeatures(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureOptionalFeaturesIsMutable();
      optionalFeatures_.add(value);
    }
    /**
     * <code>repeated string optional_features = 5;</code>
     */
    private void addAllOptionalFeatures(
        java.lang.Iterable<java.lang.String> values) {
      ensureOptionalFeaturesIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, optionalFeatures_);
    }
    /**
     * <code>repeated string optional_features = 5;</code>
     */
    private void clearOptionalFeatures() {
      optionalFeatures_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList();
    }
    /**
     * <code>repeated string optional_features = 5;</code>
     */
    private void addOptionalFeaturesBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureOptionalFeaturesIsMutable();
      optionalFeatures_.add(value.toStringUtf8());
    }

    public static final int WRITINGPROGRAM_FIELD_NUMBER = 16;
    private java.lang.String writingprogram_;
    /**
     * <code>optional string writingprogram = 16;</code>
     */
    public boolean hasWritingprogram() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>optional string writingprogram = 16;</code>
     */
    public java.lang.String getWritingprogram() {
      return writingprogram_;
    }
    /**
     * <code>optional string writingprogram = 16;</code>
     */
    public com.google.protobuf.ByteString
        getWritingprogramBytes() {
      return com.google.protobuf.ByteString.copyFromUtf8(writingprogram_);
    }
    /**
     * <code>optional string writingprogram = 16;</code>
     */
    private void setWritingprogram(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
      writingprogram_ = value;
    }
    /**
     * <code>optional string writingprogram = 16;</code>
     */
    private void clearWritingprogram() {
      bitField0_ = (bitField0_ & ~0x00000002);
      writingprogram_ = getDefaultInstance().getWritingprogram();
    }
    /**
     * <code>optional string writingprogram = 16;</code>
     */
    private void setWritingprogramBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
      writingprogram_ = value.toStringUtf8();
    }

    public static final int SOURCE_FIELD_NUMBER = 17;
    private java.lang.String source_;
    /**
     * <pre>
     * From the bbox field.
     * </pre>
     *
     * <code>optional string source = 17;</code>
     */
    public boolean hasSource() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <pre>
     * From the bbox field.
     * </pre>
     *
     * <code>optional string source = 17;</code>
     */
    public java.lang.String getSource() {
      return source_;
    }
    /**
     * <pre>
     * From the bbox field.
     * </pre>
     *
     * <code>optional string source = 17;</code>
     */
    public com.google.protobuf.ByteString
        getSourceBytes() {
      return com.google.protobuf.ByteString.copyFromUtf8(source_);
    }
    /**
     * <pre>
     * From the bbox field.
     * </pre>
     *
     * <code>optional string source = 17;</code>
     */
    private void setSource(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
      source_ = value;
    }
    /**
     * <pre>
     * From the bbox field.
     * </pre>
     *
     * <code>optional string source = 17;</code>
     */
    private void clearSource() {
      bitField0_ = (bitField0_ & ~0x00000004);
      source_ = getDefaultInstance().getSource();
    }
    /**
     * <pre>
     * From the bbox field.
     * </pre>
     *
     * <code>optional string source = 17;</code>
     */
    private void setSourceBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
      source_ = value.toStringUtf8();
    }

    public static final int OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER = 32;
    private long osmosisReplicationTimestamp_;
    /**
     * <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>
     *
     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
     */
    public boolean hasOsmosisReplicationTimestamp() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    /**
     * <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>
     *
     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
     */
    public long getOsmosisReplicationTimestamp() {
      return osmosisReplicationTimestamp_;
    }
    /**
     * <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>
     *
     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
     */
    private void setOsmosisReplicationTimestamp(long value) {
      bitField0_ |= 0x00000008;
      osmosisReplicationTimestamp_ = value;
    }
    /**
     * <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>
     *
     * <code>optional int64 osmosis_replication_timestamp = 32;</code>
     */
    private void clearOsmosisReplicationTimestamp() {
      bitField0_ = (bitField0_ & ~0x00000008);
      osmosisReplicationTimestamp_ = 0L;
    }

    public static final int OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER = 33;
    private long osmosisReplicationSequenceNumber_;
    /**
     * <pre>
     * replication sequence number (sequenceNumber in state.txt)
     * </pre>
     *
     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
     */
    public boolean hasOsmosisReplicationSequenceNumber() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    /**
     * <pre>
     * replication sequence number (sequenceNumber in state.txt)
     * </pre>
     *
     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
     */
    public long getOsmosisReplicationSequenceNumber() {
      return osmosisReplicationSequenceNumber_;
    }
    /**
     * <pre>
     * replication sequence number (sequenceNumber in state.txt)
     * </pre>
     *
     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
     */
    private void setOsmosisReplicationSequenceNumber(long value) {
      bitField0_ |= 0x00000010;
      osmosisReplicationSequenceNumber_ = value;
    }
    /**
     * <pre>
     * replication sequence number (sequenceNumber in state.txt)
     * </pre>
     *
     * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
     */
    private void clearOsmosisReplicationSequenceNumber() {
      bitField0_ = (bitField0_ & ~0x00000010);
      osmosisReplicationSequenceNumber_ = 0L;
    }

    public static final int OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER = 34;
    private java.lang.String osmosisReplicationBaseUrl_;
    /**
     * <pre>
     * replication base URL (from Osmosis' configuration.txt file)
     * </pre>
     *
     * <code>optional string osmosis_replication_base_url = 34;</code>
     */
    public boolean hasOsmosisReplicationBaseUrl() {
      return ((bitField0_ & 0x00000020) == 0x00000020);
    }
    /**
     * <pre>
     * replication base URL (from Osmosis' configuration.txt file)
     * </pre>
     *
     * <code>optional string osmosis_replication_base_url = 34;</code>
     */
    public java.lang.String getOsmosisReplicationBaseUrl() {
      return osmosisReplicationBaseUrl_;
    }
    /**
     * <pre>
     * replication base URL (from Osmosis' configuration.txt file)
     * </pre>
     *
     * <code>optional string osmosis_replication_base_url = 34;</code>
     */
    public com.google.protobuf.ByteString
        getOsmosisReplicationBaseUrlBytes() {
      return com.google.protobuf.ByteString.copyFromUtf8(osmosisReplicationBaseUrl_);
    }
    /**
     * <pre>
     * replication base URL (from Osmosis' configuration.txt file)
     * </pre>
     *
     * <code>optional string osmosis_replication_base_url = 34;</code>
     */
    private void setOsmosisReplicationBaseUrl(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000020;
      osmosisReplicationBaseUrl_ = value;
    }
    /**
     * <pre>
     * replication base URL (from Osmosis' configuration.txt file)
     * </pre>
     *
     * <code>optional string osmosis_replication_base_url = 34;</code>
     */
    private void clearOsmosisReplicationBaseUrl() {
      bitField0_ = (bitField0_ & ~0x00000020);
      osmosisReplicationBaseUrl_ = getDefaultInstance().getOsmosisReplicationBaseUrl();
    }
    /**
     * <pre>
     * replication base URL (from Osmosis' configuration.txt file)
     * </pre>
     *
     * <code>optional string osmosis_replication_base_url = 34;</code>
     */
    private void setOsmosisReplicationBaseUrlBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000020;
      osmosisReplicationBaseUrl_ = value.toStringUtf8();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(1, getBbox());
      }
      for (int i = 0; i < requiredFeatures_.size(); i++) {
        output.writeString(4, requiredFeatures_.get(i));
      }
      for (int i = 0; i < optionalFeatures_.size(); i++) {
        output.writeString(5, optionalFeatures_.get(i));
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeString(16, getWritingprogram());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeString(17, getSource());
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeInt64(32, osmosisReplicationTimestamp_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeInt64(33, osmosisReplicationSequenceNumber_);
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        output.writeString(34, getOsmosisReplicationBaseUrl());
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getBbox());
      }
      {
        int dataSize = 0;
        for (int i = 0; i < requiredFeatures_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeStringSizeNoTag(requiredFeatures_.get(i));
        }
        size += dataSize;
        size += 1 * getRequiredFeaturesList().size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < optionalFeatures_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeStringSizeNoTag(optionalFeatures_.get(i));
        }
        size += dataSize;
        size += 1 * getOptionalFeaturesList().size();
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(16, getWritingprogram());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(17, getSource());
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(32, osmosisReplicationTimestamp_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(33, osmosisReplicationSequenceNumber_);
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(34, getOsmosisReplicationBaseUrl());
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.HeaderBlock parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.HeaderBlock parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.HeaderBlock prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code OSMPBF.HeaderBlock}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.HeaderBlock, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBlock)
        crosby.binary.Osmformat.HeaderBlockOrBuilder {
      // Construct using crosby.binary.Osmformat.HeaderBlock.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
       */
      public boolean hasBbox() {
        return instance.hasBbox();
      }
      /**
       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
       */
      public crosby.binary.Osmformat.HeaderBBox getBbox() {
        return instance.getBbox();
      }
      /**
       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
       */
      public Builder setBbox(crosby.binary.Osmformat.HeaderBBox value) {
        copyOnWrite();
        instance.setBbox(value);
        return this;
        }
      /**
       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
       */
      public Builder setBbox(
          crosby.binary.Osmformat.HeaderBBox.Builder builderForValue) {
        copyOnWrite();
        instance.setBbox(builderForValue);
        return this;
      }
      /**
       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
       */
      public Builder mergeBbox(crosby.binary.Osmformat.HeaderBBox value) {
        copyOnWrite();
        instance.mergeBbox(value);
        return this;
      }
      /**
       * <code>optional .OSMPBF.HeaderBBox bbox = 1;</code>
       */
      public Builder clearBbox() {  copyOnWrite();
        instance.clearBbox();
        return this;
      }

      /**
       * <pre>
       * Additional tags to aid in parsing this dataset 
       * </pre>
       *
       * <code>repeated string required_features = 4;</code>
       */
      public java.util.List<java.lang.String>
          getRequiredFeaturesList() {
        return java.util.Collections.unmodifiableList(
            instance.getRequiredFeaturesList());
      }
      /**
       * <pre>
       * Additional tags to aid in parsing this dataset 
       * </pre>
       *
       * <code>repeated string required_features = 4;</code>
       */
      public int getRequiredFeaturesCount() {
        return instance.getRequiredFeaturesCount();
      }
      /**
       * <pre>
       * Additional tags to aid in parsing this dataset 
       * </pre>
       *
       * <code>repeated string required_features = 4;</code>
       */
      public java.lang.String getRequiredFeatures(int index) {
        return instance.getRequiredFeatures(index);
      }
      /**
       * <pre>
       * Additional tags to aid in parsing this dataset 
       * </pre>
       *
       * <code>repeated string required_features = 4;</code>
       */
      public com.google.protobuf.ByteString
          getRequiredFeaturesBytes(int index) {
        return instance.getRequiredFeaturesBytes(index);
      }
      /**
       * <pre>
       * Additional tags to aid in parsing this dataset 
       * </pre>
       *
       * <code>repeated string required_features = 4;</code>
       */
      public Builder setRequiredFeatures(
          int index, java.lang.String value) {
        copyOnWrite();
        instance.setRequiredFeatures(index, value);
        return this;
      }
      /**
       * <pre>
       * Additional tags to aid in parsing this dataset 
       * </pre>
       *
       * <code>repeated string required_features = 4;</code>
       */
      public Builder addRequiredFeatures(
          java.lang.String value) {
        copyOnWrite();
        instance.addRequiredFeatures(value);
        return this;
      }
      /**
       * <pre>
       * Additional tags to aid in parsing this dataset 
       * </pre>
       *
       * <code>repeated string required_features = 4;</code>
       */
      public Builder addAllRequiredFeatures(
          java.lang.Iterable<java.lang.String> values) {
        copyOnWrite();
        instance.addAllRequiredFeatures(values);
        return this;
      }
      /**
       * <pre>
       * Additional tags to aid in parsing this dataset 
       * </pre>
       *
       * <code>repeated string required_features = 4;</code>
       */
      public Builder clearRequiredFeatures() {
        copyOnWrite();
        instance.clearRequiredFeatures();
        return this;
      }
      /**
       * <pre>
       * Additional tags to aid in parsing this dataset 
       * </pre>
       *
       * <code>repeated string required_features = 4;</code>
       */
      public Builder addRequiredFeaturesBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.addRequiredFeaturesBytes(value);
        return this;
      }

      /**
       * <code>repeated string optional_features = 5;</code>
       */
      public java.util.List<java.lang.String>
          getOptionalFeaturesList() {
        return java.util.Collections.unmodifiableList(
            instance.getOptionalFeaturesList());
      }
      /**
       * <code>repeated string optional_features = 5;</code>
       */
      public int getOptionalFeaturesCount() {
        return instance.getOptionalFeaturesCount();
      }
      /**
       * <code>repeated string optional_features = 5;</code>
       */
      public java.lang.String getOptionalFeatures(int index) {
        return instance.getOptionalFeatures(index);
      }
      /**
       * <code>repeated string optional_features = 5;</code>
       */
      public com.google.protobuf.ByteString
          getOptionalFeaturesBytes(int index) {
        return instance.getOptionalFeaturesBytes(index);
      }
      /**
       * <code>repeated string optional_features = 5;</code>
       */
      public Builder setOptionalFeatures(
          int index, java.lang.String value) {
        copyOnWrite();
        instance.setOptionalFeatures(index, value);
        return this;
      }
      /**
       * <code>repeated string optional_features = 5;</code>
       */
      public Builder addOptionalFeatures(
          java.lang.String value) {
        copyOnWrite();
        instance.addOptionalFeatures(value);
        return this;
      }
      /**
       * <code>repeated string optional_features = 5;</code>
       */
      public Builder addAllOptionalFeatures(
          java.lang.Iterable<java.lang.String> values) {
        copyOnWrite();
        instance.addAllOptionalFeatures(values);
        return this;
      }
      /**
       * <code>repeated string optional_features = 5;</code>
       */
      public Builder clearOptionalFeatures() {
        copyOnWrite();
        instance.clearOptionalFeatures();
        return this;
      }
      /**
       * <code>repeated string optional_features = 5;</code>
       */
      public Builder addOptionalFeaturesBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.addOptionalFeaturesBytes(value);
        return this;
      }

      /**
       * <code>optional string writingprogram = 16;</code>
       */
      public boolean hasWritingprogram() {
        return instance.hasWritingprogram();
      }
      /**
       * <code>optional string writingprogram = 16;</code>
       */
      public java.lang.String getWritingprogram() {
        return instance.getWritingprogram();
      }
      /**
       * <code>optional string writingprogram = 16;</code>
       */
      public com.google.protobuf.ByteString
          getWritingprogramBytes() {
        return instance.getWritingprogramBytes();
      }
      /**
       * <code>optional string writingprogram = 16;</code>
       */
      public Builder setWritingprogram(
          java.lang.String value) {
        copyOnWrite();
        instance.setWritingprogram(value);
        return this;
      }
      /**
       * <code>optional string writingprogram = 16;</code>
       */
      public Builder clearWritingprogram() {
        copyOnWrite();
        instance.clearWritingprogram();
        return this;
      }
      /**
       * <code>optional string writingprogram = 16;</code>
       */
      public Builder setWritingprogramBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setWritingprogramBytes(value);
        return this;
      }

      /**
       * <pre>
       * From the bbox field.
       * </pre>
       *
       * <code>optional string source = 17;</code>
       */
      public boolean hasSource() {
        return instance.hasSource();
      }
      /**
       * <pre>
       * From the bbox field.
       * </pre>
       *
       * <code>optional string source = 17;</code>
       */
      public java.lang.String getSource() {
        return instance.getSource();
      }
      /**
       * <pre>
       * From the bbox field.
       * </pre>
       *
       * <code>optional string source = 17;</code>
       */
      public com.google.protobuf.ByteString
          getSourceBytes() {
        return instance.getSourceBytes();
      }
      /**
       * <pre>
       * From the bbox field.
       * </pre>
       *
       * <code>optional string source = 17;</code>
       */
      public Builder setSource(
          java.lang.String value) {
        copyOnWrite();
        instance.setSource(value);
        return this;
      }
      /**
       * <pre>
       * From the bbox field.
       * </pre>
       *
       * <code>optional string source = 17;</code>
       */
      public Builder clearSource() {
        copyOnWrite();
        instance.clearSource();
        return this;
      }
      /**
       * <pre>
       * From the bbox field.
       * </pre>
       *
       * <code>optional string source = 17;</code>
       */
      public Builder setSourceBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setSourceBytes(value);
        return this;
      }

      /**
       * <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>
       *
       * <code>optional int64 osmosis_replication_timestamp = 32;</code>
       */
      public boolean hasOsmosisReplicationTimestamp() {
        return instance.hasOsmosisReplicationTimestamp();
      }
      /**
       * <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>
       *
       * <code>optional int64 osmosis_replication_timestamp = 32;</code>
       */
      public long getOsmosisReplicationTimestamp() {
        return instance.getOsmosisReplicationTimestamp();
      }
      /**
       * <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>
       *
       * <code>optional int64 osmosis_replication_timestamp = 32;</code>
       */
      public Builder setOsmosisReplicationTimestamp(long value) {
        copyOnWrite();
        instance.setOsmosisReplicationTimestamp(value);
        return this;
      }
      /**
       * <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>
       *
       * <code>optional int64 osmosis_replication_timestamp = 32;</code>
       */
      public Builder clearOsmosisReplicationTimestamp() {
        copyOnWrite();
        instance.clearOsmosisReplicationTimestamp();
        return this;
      }

      /**
       * <pre>
       * replication sequence number (sequenceNumber in state.txt)
       * </pre>
       *
       * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
       */
      public boolean hasOsmosisReplicationSequenceNumber() {
        return instance.hasOsmosisReplicationSequenceNumber();
      }
      /**
       * <pre>
       * replication sequence number (sequenceNumber in state.txt)
       * </pre>
       *
       * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
       */
      public long getOsmosisReplicationSequenceNumber() {
        return instance.getOsmosisReplicationSequenceNumber();
      }
      /**
       * <pre>
       * replication sequence number (sequenceNumber in state.txt)
       * </pre>
       *
       * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
       */
      public Builder setOsmosisReplicationSequenceNumber(long value) {
        copyOnWrite();
        instance.setOsmosisReplicationSequenceNumber(value);
        return this;
      }
      /**
       * <pre>
       * replication sequence number (sequenceNumber in state.txt)
       * </pre>
       *
       * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
       */
      public Builder clearOsmosisReplicationSequenceNumber() {
        copyOnWrite();
        instance.clearOsmosisReplicationSequenceNumber();
        return this;
      }

      /**
       * <pre>
       * replication base URL (from Osmosis' configuration.txt file)
       * </pre>
       *
       * <code>optional string osmosis_replication_base_url = 34;</code>
       */
      public boolean hasOsmosisReplicationBaseUrl() {
        return instance.hasOsmosisReplicationBaseUrl();
      }
      /**
       * <pre>
       * replication base URL (from Osmosis' configuration.txt file)
       * </pre>
       *
       * <code>optional string osmosis_replication_base_url = 34;</code>
       */
      public java.lang.String getOsmosisReplicationBaseUrl() {
        return instance.getOsmosisReplicationBaseUrl();
      }
      /**
       * <pre>
       * replication base URL (from Osmosis' configuration.txt file)
       * </pre>
       *
       * <code>optional string osmosis_replication_base_url = 34;</code>
       */
      public com.google.protobuf.ByteString
          getOsmosisReplicationBaseUrlBytes() {
        return instance.getOsmosisReplicationBaseUrlBytes();
      }
      /**
       * <pre>
       * replication base URL (from Osmosis' configuration.txt file)
       * </pre>
       *
       * <code>optional string osmosis_replication_base_url = 34;</code>
       */
      public Builder setOsmosisReplicationBaseUrl(
          java.lang.String value) {
        copyOnWrite();
        instance.setOsmosisReplicationBaseUrl(value);
        return this;
      }
      /**
       * <pre>
       * replication base URL (from Osmosis' configuration.txt file)
       * </pre>
       *
       * <code>optional string osmosis_replication_base_url = 34;</code>
       */
      public Builder clearOsmosisReplicationBaseUrl() {
        copyOnWrite();
        instance.clearOsmosisReplicationBaseUrl();
        return this;
      }
      /**
       * <pre>
       * replication base URL (from Osmosis' configuration.txt file)
       * </pre>
       *
       * <code>optional string osmosis_replication_base_url = 34;</code>
       */
      public Builder setOsmosisReplicationBaseUrlBytes(
          com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setOsmosisReplicationBaseUrlBytes(value);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBlock)
    }
    private byte memoizedIsInitialized = -1;
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.HeaderBlock();
        }
        case IS_INITIALIZED: {
          byte isInitialized = memoizedIsInitialized;
          if (isInitialized == 1) return DEFAULT_INSTANCE;
          if (isInitialized == 0) return null;

          boolean shouldMemoize = ((Boolean) arg0).booleanValue();
          if (hasBbox()) {
            if (!getBbox().isInitialized()) {
              if (shouldMemoize) {
                memoizedIsInitialized = 0;
              }
              return null;
            }
          }
          if (shouldMemoize) memoizedIsInitialized = 1;
          return DEFAULT_INSTANCE;

        }
        case MAKE_IMMUTABLE: {
          requiredFeatures_.makeImmutable();
          optionalFeatures_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.HeaderBlock other = (crosby.binary.Osmformat.HeaderBlock) arg1;
          bbox_ = visitor.visitMessage(bbox_, other.bbox_);
          requiredFeatures_= visitor.visitList(requiredFeatures_, other.requiredFeatures_);
          optionalFeatures_= visitor.visitList(optionalFeatures_, other.optionalFeatures_);
          writingprogram_ = visitor.visitString(
              hasWritingprogram(), writingprogram_,
              other.hasWritingprogram(), other.writingprogram_);
          source_ = visitor.visitString(
              hasSource(), source_,
              other.hasSource(), other.source_);
          osmosisReplicationTimestamp_ = visitor.visitLong(
              hasOsmosisReplicationTimestamp(), osmosisReplicationTimestamp_,
              other.hasOsmosisReplicationTimestamp(), other.osmosisReplicationTimestamp_);
          osmosisReplicationSequenceNumber_ = visitor.visitLong(
              hasOsmosisReplicationSequenceNumber(), osmosisReplicationSequenceNumber_,
              other.hasOsmosisReplicationSequenceNumber(), other.osmosisReplicationSequenceNumber_);
          osmosisReplicationBaseUrl_ = visitor.visitString(
              hasOsmosisReplicationBaseUrl(), osmosisReplicationBaseUrl_,
              other.hasOsmosisReplicationBaseUrl(), other.osmosisReplicationBaseUrl_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 10: {
                  crosby.binary.Osmformat.HeaderBBox.Builder subBuilder = null;
                  if (((bitField0_ & 0x00000001) == 0x00000001)) {
                    subBuilder = bbox_.toBuilder();
                  }
                  bbox_ = input.readMessage(crosby.binary.Osmformat.HeaderBBox.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(bbox_);
                    bbox_ = subBuilder.buildPartial();
                  }
                  bitField0_ |= 0x00000001;
                  break;
                }
                case 34: {
                  java.lang.String s = input.readString();
                  if (!requiredFeatures_.isModifiable()) {
                    requiredFeatures_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(requiredFeatures_);
                  }
                  requiredFeatures_.add(s);
                  break;
                }
                case 42: {
                  java.lang.String s = input.readString();
                  if (!optionalFeatures_.isModifiable()) {
                    optionalFeatures_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(optionalFeatures_);
                  }
                  optionalFeatures_.add(s);
                  break;
                }
                case 130: {
                  java.lang.String s = input.readString();
                  bitField0_ |= 0x00000002;
                  writingprogram_ = s;
                  break;
                }
                case 138: {
                  java.lang.String s = input.readString();
                  bitField0_ |= 0x00000004;
                  source_ = s;
                  break;
                }
                case 256: {
                  bitField0_ |= 0x00000008;
                  osmosisReplicationTimestamp_ = input.readInt64();
                  break;
                }
                case 264: {
                  bitField0_ |= 0x00000010;
                  osmosisReplicationSequenceNumber_ = input.readInt64();
                  break;
                }
                case 274: {
                  java.lang.String s = input.readString();
                  bitField0_ |= 0x00000020;
                  osmosisReplicationBaseUrl_ = s;
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.HeaderBlock.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBlock)
    private static final crosby.binary.Osmformat.HeaderBlock DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new HeaderBlock();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.HeaderBlock getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<HeaderBlock> PARSER;

    public static com.google.protobuf.Parser<HeaderBlock> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  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();

    /**
     * <code>required sint64 right = 2;</code>
     */
    boolean hasRight();
    /**
     * <code>required sint64 right = 2;</code>
     */
    long getRight();

    /**
     * <code>required sint64 top = 3;</code>
     */
    boolean hasTop();
    /**
     * <code>required sint64 top = 3;</code>
     */
    long getTop();

    /**
     * <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<
          HeaderBBox, HeaderBBox.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBBox)
      HeaderBBoxOrBuilder {
    private HeaderBBox() {
    }
    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_;
    }
    /**
     * <code>required sint64 left = 1;</code>
     */
    private void setLeft(long value) {
      bitField0_ |= 0x00000001;
      left_ = value;
    }
    /**
     * <code>required sint64 left = 1;</code>
     */
    private void clearLeft() {
      bitField0_ = (bitField0_ & ~0x00000001);
      left_ = 0L;
    }

    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_;
    }
    /**
     * <code>required sint64 right = 2;</code>
     */
    private void setRight(long value) {
      bitField0_ |= 0x00000002;
      right_ = value;
    }
    /**
     * <code>required sint64 right = 2;</code>
     */
    private void clearRight() {
      bitField0_ = (bitField0_ & ~0x00000002);
      right_ = 0L;
    }

    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_;
    }
    /**
     * <code>required sint64 top = 3;</code>
     */
    private void setTop(long value) {
      bitField0_ |= 0x00000004;
      top_ = value;
    }
    /**
     * <code>required sint64 top = 3;</code>
     */
    private void clearTop() {
      bitField0_ = (bitField0_ & ~0x00000004);
      top_ = 0L;
    }

    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_;
    }
    /**
     * <code>required sint64 bottom = 4;</code>
     */
    private void setBottom(long value) {
      bitField0_ |= 0x00000008;
      bottom_ = value;
    }
    /**
     * <code>required sint64 bottom = 4;</code>
     */
    private void clearBottom() {
      bitField0_ = (bitField0_ & ~0x00000008);
      bottom_ = 0L;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeSInt64(1, left_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeSInt64(2, right_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeSInt64(3, top_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeSInt64(4, bottom_);
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSInt64Size(1, left_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSInt64Size(2, right_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSInt64Size(3, top_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSInt64Size(4, bottom_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.HeaderBBox parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.HeaderBBox parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.HeaderBBox prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code OSMPBF.HeaderBBox}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.HeaderBBox, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBBox)
        crosby.binary.Osmformat.HeaderBBoxOrBuilder {
      // Construct using crosby.binary.Osmformat.HeaderBBox.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>required sint64 left = 1;</code>
       */
      public boolean hasLeft() {
        return instance.hasLeft();
      }
      /**
       * <code>required sint64 left = 1;</code>
       */
      public long getLeft() {
        return instance.getLeft();
      }
      /**
       * <code>required sint64 left = 1;</code>
       */
      public Builder setLeft(long value) {
        copyOnWrite();
        instance.setLeft(value);
        return this;
      }
      /**
       * <code>required sint64 left = 1;</code>
       */
      public Builder clearLeft() {
        copyOnWrite();
        instance.clearLeft();
        return this;
      }

      /**
       * <code>required sint64 right = 2;</code>
       */
      public boolean hasRight() {
        return instance.hasRight();
      }
      /**
       * <code>required sint64 right = 2;</code>
       */
      public long getRight() {
        return instance.getRight();
      }
      /**
       * <code>required sint64 right = 2;</code>
       */
      public Builder setRight(long value) {
        copyOnWrite();
        instance.setRight(value);
        return this;
      }
      /**
       * <code>required sint64 right = 2;</code>
       */
      public Builder clearRight() {
        copyOnWrite();
        instance.clearRight();
        return this;
      }

      /**
       * <code>required sint64 top = 3;</code>
       */
      public boolean hasTop() {
        return instance.hasTop();
      }
      /**
       * <code>required sint64 top = 3;</code>
       */
      public long getTop() {
        return instance.getTop();
      }
      /**
       * <code>required sint64 top = 3;</code>
       */
      public Builder setTop(long value) {
        copyOnWrite();
        instance.setTop(value);
        return this;
      }
      /**
       * <code>required sint64 top = 3;</code>
       */
      public Builder clearTop() {
        copyOnWrite();
        instance.clearTop();
        return this;
      }

      /**
       * <code>required sint64 bottom = 4;</code>
       */
      public boolean hasBottom() {
        return instance.hasBottom();
      }
      /**
       * <code>required sint64 bottom = 4;</code>
       */
      public long getBottom() {
        return instance.getBottom();
      }
      /**
       * <code>required sint64 bottom = 4;</code>
       */
      public Builder setBottom(long value) {
        copyOnWrite();
        instance.setBottom(value);
        return this;
      }
      /**
       * <code>required sint64 bottom = 4;</code>
       */
      public Builder clearBottom() {
        copyOnWrite();
        instance.clearBottom();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBBox)
    }
    private byte memoizedIsInitialized = -1;
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.HeaderBBox();
        }
        case IS_INITIALIZED: {
          byte isInitialized = memoizedIsInitialized;
          if (isInitialized == 1) return DEFAULT_INSTANCE;
          if (isInitialized == 0) return null;

          boolean shouldMemoize = ((Boolean) arg0).booleanValue();
          if (!hasLeft()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (!hasRight()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (!hasTop()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (!hasBottom()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (shouldMemoize) memoizedIsInitialized = 1;
          return DEFAULT_INSTANCE;

        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.HeaderBBox other = (crosby.binary.Osmformat.HeaderBBox) arg1;
          left_ = visitor.visitLong(
              hasLeft(), left_,
              other.hasLeft(), other.left_);
          right_ = visitor.visitLong(
              hasRight(), right_,
              other.hasRight(), other.right_);
          top_ = visitor.visitLong(
              hasTop(), top_,
              other.hasTop(), other.top_);
          bottom_ = visitor.visitLong(
              hasBottom(), bottom_,
              other.hasBottom(), other.bottom_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    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 new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.HeaderBBox.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBBox)
    private static final crosby.binary.Osmformat.HeaderBBox DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new HeaderBBox();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.HeaderBBox getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<HeaderBBox> PARSER;

    public static com.google.protobuf.Parser<HeaderBBox> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  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>
     */
    crosby.binary.Osmformat.StringTable getStringtable();

    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    java.util.List<crosby.binary.Osmformat.PrimitiveGroup> 
        getPrimitivegroupList();
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    crosby.binary.Osmformat.PrimitiveGroup getPrimitivegroup(int index);
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    int getPrimitivegroupCount();

    /**
     * <pre>
     * Granularity, units of nanodegrees, used to store coordinates in this block
     * </pre>
     *
     * <code>optional int32 granularity = 17 [default = 100];</code>
     */
    boolean hasGranularity();
    /**
     * <pre>
     * Granularity, units of nanodegrees, used to store coordinates in this block
     * </pre>
     *
     * <code>optional int32 granularity = 17 [default = 100];</code>
     */
    int getGranularity();

    /**
     * <pre>
     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
     * </pre>
     *
     * <code>optional int64 lat_offset = 19 [default = 0];</code>
     */
    boolean hasLatOffset();
    /**
     * <pre>
     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
     * </pre>
     *
     * <code>optional int64 lat_offset = 19 [default = 0];</code>
     */
    long getLatOffset();

    /**
     * <code>optional int64 lon_offset = 20 [default = 0];</code>
     */
    boolean hasLonOffset();
    /**
     * <code>optional int64 lon_offset = 20 [default = 0];</code>
     */
    long getLonOffset();

    /**
     * <pre>
     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
     * </pre>
     *
     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
     */
    boolean hasDateGranularity();
    /**
     * <pre>
     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
     * </pre>
     *
     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
     */
    int getDateGranularity();
  }
  /**
   * Protobuf type {@code OSMPBF.PrimitiveBlock}
   */
  public  static final class PrimitiveBlock extends
      com.google.protobuf.GeneratedMessageLite<
          PrimitiveBlock, PrimitiveBlock.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveBlock)
      PrimitiveBlockOrBuilder {
    private PrimitiveBlock() {
      primitivegroup_ = emptyProtobufList();
      granularity_ = 100;
      dateGranularity_ = 1000;
    }
    private int bitField0_;
    public static final int STRINGTABLE_FIELD_NUMBER = 1;
    private crosby.binary.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 crosby.binary.Osmformat.StringTable getStringtable() {
      return stringtable_ == null ? crosby.binary.Osmformat.StringTable.getDefaultInstance() : stringtable_;
    }
    /**
     * <code>required .OSMPBF.StringTable stringtable = 1;</code>
     */
    private void setStringtable(crosby.binary.Osmformat.StringTable value) {
      if (value == null) {
        throw new NullPointerException();
      }
      stringtable_ = value;
      bitField0_ |= 0x00000001;
      }
    /**
     * <code>required .OSMPBF.StringTable stringtable = 1;</code>
     */
    private void setStringtable(
        crosby.binary.Osmformat.StringTable.Builder builderForValue) {
      stringtable_ = builderForValue.build();
      bitField0_ |= 0x00000001;
    }
    /**
     * <code>required .OSMPBF.StringTable stringtable = 1;</code>
     */
    private void mergeStringtable(crosby.binary.Osmformat.StringTable value) {
      if (stringtable_ != null &&
          stringtable_ != crosby.binary.Osmformat.StringTable.getDefaultInstance()) {
        stringtable_ =
          crosby.binary.Osmformat.StringTable.newBuilder(stringtable_).mergeFrom(value).buildPartial();
      } else {
        stringtable_ = value;
      }
      bitField0_ |= 0x00000001;
    }
    /**
     * <code>required .OSMPBF.StringTable stringtable = 1;</code>
     */
    private void clearStringtable() {  stringtable_ = null;
      bitField0_ = (bitField0_ & ~0x00000001);
    }

    public static final int PRIMITIVEGROUP_FIELD_NUMBER = 2;
    private com.google.protobuf.Internal.ProtobufList<crosby.binary.Osmformat.PrimitiveGroup> primitivegroup_;
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    public java.util.List<crosby.binary.Osmformat.PrimitiveGroup> getPrimitivegroupList() {
      return primitivegroup_;
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    public java.util.List<? extends crosby.binary.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 crosby.binary.Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
      return primitivegroup_.get(index);
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    public crosby.binary.Osmformat.PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(
        int index) {
      return primitivegroup_.get(index);
    }
    private void ensurePrimitivegroupIsMutable() {
      if (!primitivegroup_.isModifiable()) {
        primitivegroup_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(primitivegroup_);
       }
    }

    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    private void setPrimitivegroup(
        int index, crosby.binary.Osmformat.PrimitiveGroup value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensurePrimitivegroupIsMutable();
      primitivegroup_.set(index, value);
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    private void setPrimitivegroup(
        int index, crosby.binary.Osmformat.PrimitiveGroup.Builder builderForValue) {
      ensurePrimitivegroupIsMutable();
      primitivegroup_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    private void addPrimitivegroup(crosby.binary.Osmformat.PrimitiveGroup value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensurePrimitivegroupIsMutable();
      primitivegroup_.add(value);
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    private void addPrimitivegroup(
        int index, crosby.binary.Osmformat.PrimitiveGroup value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensurePrimitivegroupIsMutable();
      primitivegroup_.add(index, value);
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    private void addPrimitivegroup(
        crosby.binary.Osmformat.PrimitiveGroup.Builder builderForValue) {
      ensurePrimitivegroupIsMutable();
      primitivegroup_.add(builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    private void addPrimitivegroup(
        int index, crosby.binary.Osmformat.PrimitiveGroup.Builder builderForValue) {
      ensurePrimitivegroupIsMutable();
      primitivegroup_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    private void addAllPrimitivegroup(
        java.lang.Iterable<? extends crosby.binary.Osmformat.PrimitiveGroup> values) {
      ensurePrimitivegroupIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, primitivegroup_);
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    private void clearPrimitivegroup() {
      primitivegroup_ = emptyProtobufList();
    }
    /**
     * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
     */
    private void removePrimitivegroup(int index) {
      ensurePrimitivegroupIsMutable();
      primitivegroup_.remove(index);
    }

    public static final int GRANULARITY_FIELD_NUMBER = 17;
    private int granularity_;
    /**
     * <pre>
     * Granularity, units of nanodegrees, used to store coordinates in this block
     * </pre>
     *
     * <code>optional int32 granularity = 17 [default = 100];</code>
     */
    public boolean hasGranularity() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <pre>
     * Granularity, units of nanodegrees, used to store coordinates in this block
     * </pre>
     *
     * <code>optional int32 granularity = 17 [default = 100];</code>
     */
    public int getGranularity() {
      return granularity_;
    }
    /**
     * <pre>
     * Granularity, units of nanodegrees, used to store coordinates in this block
     * </pre>
     *
     * <code>optional int32 granularity = 17 [default = 100];</code>
     */
    private void setGranularity(int value) {
      bitField0_ |= 0x00000002;
      granularity_ = value;
    }
    /**
     * <pre>
     * Granularity, units of nanodegrees, used to store coordinates in this block
     * </pre>
     *
     * <code>optional int32 granularity = 17 [default = 100];</code>
     */
    private void clearGranularity() {
      bitField0_ = (bitField0_ & ~0x00000002);
      granularity_ = 100;
    }

    public static final int LAT_OFFSET_FIELD_NUMBER = 19;
    private long latOffset_;
    /**
     * <pre>
     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
     * </pre>
     *
     * <code>optional int64 lat_offset = 19 [default = 0];</code>
     */
    public boolean hasLatOffset() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <pre>
     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
     * </pre>
     *
     * <code>optional int64 lat_offset = 19 [default = 0];</code>
     */
    public long getLatOffset() {
      return latOffset_;
    }
    /**
     * <pre>
     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
     * </pre>
     *
     * <code>optional int64 lat_offset = 19 [default = 0];</code>
     */
    private void setLatOffset(long value) {
      bitField0_ |= 0x00000004;
      latOffset_ = value;
    }
    /**
     * <pre>
     * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
     * </pre>
     *
     * <code>optional int64 lat_offset = 19 [default = 0];</code>
     */
    private void clearLatOffset() {
      bitField0_ = (bitField0_ & ~0x00000004);
      latOffset_ = 0L;
    }

    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_;
    }
    /**
     * <code>optional int64 lon_offset = 20 [default = 0];</code>
     */
    private void setLonOffset(long value) {
      bitField0_ |= 0x00000008;
      lonOffset_ = value;
    }
    /**
     * <code>optional int64 lon_offset = 20 [default = 0];</code>
     */
    private void clearLonOffset() {
      bitField0_ = (bitField0_ & ~0x00000008);
      lonOffset_ = 0L;
    }

    public static final int DATE_GRANULARITY_FIELD_NUMBER = 18;
    private int dateGranularity_;
    /**
     * <pre>
     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
     * </pre>
     *
     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
     */
    public boolean hasDateGranularity() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    /**
     * <pre>
     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
     * </pre>
     *
     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
     */
    public int getDateGranularity() {
      return dateGranularity_;
    }
    /**
     * <pre>
     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
     * </pre>
     *
     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
     */
    private void setDateGranularity(int value) {
      bitField0_ |= 0x00000010;
      dateGranularity_ = value;
    }
    /**
     * <pre>
     * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
     * </pre>
     *
     * <code>optional int32 date_granularity = 18 [default = 1000];</code>
     */
    private void clearDateGranularity() {
      bitField0_ = (bitField0_ & ~0x00000010);
      dateGranularity_ = 1000;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(1, getStringtable());
      }
      for (int i = 0; i < primitivegroup_.size(); i++) {
        output.writeMessage(2, primitivegroup_.get(i));
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeInt32(17, granularity_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeInt32(18, dateGranularity_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt64(19, latOffset_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeInt64(20, lonOffset_);
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getStringtable());
      }
      for (int i = 0; i < primitivegroup_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, primitivegroup_.get(i));
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(17, granularity_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(18, dateGranularity_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(19, latOffset_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(20, lonOffset_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.PrimitiveBlock parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.PrimitiveBlock prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code OSMPBF.PrimitiveBlock}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.PrimitiveBlock, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveBlock)
        crosby.binary.Osmformat.PrimitiveBlockOrBuilder {
      // Construct using crosby.binary.Osmformat.PrimitiveBlock.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
       */
      public boolean hasStringtable() {
        return instance.hasStringtable();
      }
      /**
       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
       */
      public crosby.binary.Osmformat.StringTable getStringtable() {
        return instance.getStringtable();
      }
      /**
       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
       */
      public Builder setStringtable(crosby.binary.Osmformat.StringTable value) {
        copyOnWrite();
        instance.setStringtable(value);
        return this;
        }
      /**
       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
       */
      public Builder setStringtable(
          crosby.binary.Osmformat.StringTable.Builder builderForValue) {
        copyOnWrite();
        instance.setStringtable(builderForValue);
        return this;
      }
      /**
       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
       */
      public Builder mergeStringtable(crosby.binary.Osmformat.StringTable value) {
        copyOnWrite();
        instance.mergeStringtable(value);
        return this;
      }
      /**
       * <code>required .OSMPBF.StringTable stringtable = 1;</code>
       */
      public Builder clearStringtable() {  copyOnWrite();
        instance.clearStringtable();
        return this;
      }

      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public java.util.List<crosby.binary.Osmformat.PrimitiveGroup> getPrimitivegroupList() {
        return java.util.Collections.unmodifiableList(
            instance.getPrimitivegroupList());
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public int getPrimitivegroupCount() {
        return instance.getPrimitivegroupCount();
      }/**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public crosby.binary.Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
        return instance.getPrimitivegroup(index);
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public Builder setPrimitivegroup(
          int index, crosby.binary.Osmformat.PrimitiveGroup value) {
        copyOnWrite();
        instance.setPrimitivegroup(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public Builder setPrimitivegroup(
          int index, crosby.binary.Osmformat.PrimitiveGroup.Builder builderForValue) {
        copyOnWrite();
        instance.setPrimitivegroup(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public Builder addPrimitivegroup(crosby.binary.Osmformat.PrimitiveGroup value) {
        copyOnWrite();
        instance.addPrimitivegroup(value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public Builder addPrimitivegroup(
          int index, crosby.binary.Osmformat.PrimitiveGroup value) {
        copyOnWrite();
        instance.addPrimitivegroup(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public Builder addPrimitivegroup(
          crosby.binary.Osmformat.PrimitiveGroup.Builder builderForValue) {
        copyOnWrite();
        instance.addPrimitivegroup(builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public Builder addPrimitivegroup(
          int index, crosby.binary.Osmformat.PrimitiveGroup.Builder builderForValue) {
        copyOnWrite();
        instance.addPrimitivegroup(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public Builder addAllPrimitivegroup(
          java.lang.Iterable<? extends crosby.binary.Osmformat.PrimitiveGroup> values) {
        copyOnWrite();
        instance.addAllPrimitivegroup(values);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public Builder clearPrimitivegroup() {
        copyOnWrite();
        instance.clearPrimitivegroup();
        return this;
      }
      /**
       * <code>repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;</code>
       */
      public Builder removePrimitivegroup(int index) {
        copyOnWrite();
        instance.removePrimitivegroup(index);
        return this;
      }

      /**
       * <pre>
       * Granularity, units of nanodegrees, used to store coordinates in this block
       * </pre>
       *
       * <code>optional int32 granularity = 17 [default = 100];</code>
       */
      public boolean hasGranularity() {
        return instance.hasGranularity();
      }
      /**
       * <pre>
       * Granularity, units of nanodegrees, used to store coordinates in this block
       * </pre>
       *
       * <code>optional int32 granularity = 17 [default = 100];</code>
       */
      public int getGranularity() {
        return instance.getGranularity();
      }
      /**
       * <pre>
       * Granularity, units of nanodegrees, used to store coordinates in this block
       * </pre>
       *
       * <code>optional int32 granularity = 17 [default = 100];</code>
       */
      public Builder setGranularity(int value) {
        copyOnWrite();
        instance.setGranularity(value);
        return this;
      }
      /**
       * <pre>
       * Granularity, units of nanodegrees, used to store coordinates in this block
       * </pre>
       *
       * <code>optional int32 granularity = 17 [default = 100];</code>
       */
      public Builder clearGranularity() {
        copyOnWrite();
        instance.clearGranularity();
        return this;
      }

      /**
       * <pre>
       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
       * </pre>
       *
       * <code>optional int64 lat_offset = 19 [default = 0];</code>
       */
      public boolean hasLatOffset() {
        return instance.hasLatOffset();
      }
      /**
       * <pre>
       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
       * </pre>
       *
       * <code>optional int64 lat_offset = 19 [default = 0];</code>
       */
      public long getLatOffset() {
        return instance.getLatOffset();
      }
      /**
       * <pre>
       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
       * </pre>
       *
       * <code>optional int64 lat_offset = 19 [default = 0];</code>
       */
      public Builder setLatOffset(long value) {
        copyOnWrite();
        instance.setLatOffset(value);
        return this;
      }
      /**
       * <pre>
       * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
       * </pre>
       *
       * <code>optional int64 lat_offset = 19 [default = 0];</code>
       */
      public Builder clearLatOffset() {
        copyOnWrite();
        instance.clearLatOffset();
        return this;
      }

      /**
       * <code>optional int64 lon_offset = 20 [default = 0];</code>
       */
      public boolean hasLonOffset() {
        return instance.hasLonOffset();
      }
      /**
       * <code>optional int64 lon_offset = 20 [default = 0];</code>
       */
      public long getLonOffset() {
        return instance.getLonOffset();
      }
      /**
       * <code>optional int64 lon_offset = 20 [default = 0];</code>
       */
      public Builder setLonOffset(long value) {
        copyOnWrite();
        instance.setLonOffset(value);
        return this;
      }
      /**
       * <code>optional int64 lon_offset = 20 [default = 0];</code>
       */
      public Builder clearLonOffset() {
        copyOnWrite();
        instance.clearLonOffset();
        return this;
      }

      /**
       * <pre>
       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
       * </pre>
       *
       * <code>optional int32 date_granularity = 18 [default = 1000];</code>
       */
      public boolean hasDateGranularity() {
        return instance.hasDateGranularity();
      }
      /**
       * <pre>
       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
       * </pre>
       *
       * <code>optional int32 date_granularity = 18 [default = 1000];</code>
       */
      public int getDateGranularity() {
        return instance.getDateGranularity();
      }
      /**
       * <pre>
       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
       * </pre>
       *
       * <code>optional int32 date_granularity = 18 [default = 1000];</code>
       */
      public Builder setDateGranularity(int value) {
        copyOnWrite();
        instance.setDateGranularity(value);
        return this;
      }
      /**
       * <pre>
       * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
       * </pre>
       *
       * <code>optional int32 date_granularity = 18 [default = 1000];</code>
       */
      public Builder clearDateGranularity() {
        copyOnWrite();
        instance.clearDateGranularity();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveBlock)
    }
    private byte memoizedIsInitialized = -1;
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.PrimitiveBlock();
        }
        case IS_INITIALIZED: {
          byte isInitialized = memoizedIsInitialized;
          if (isInitialized == 1) return DEFAULT_INSTANCE;
          if (isInitialized == 0) return null;

          boolean shouldMemoize = ((Boolean) arg0).booleanValue();
          if (!hasStringtable()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          for (int i = 0; i < getPrimitivegroupCount(); i++) {
            if (!getPrimitivegroup(i).isInitialized()) {
              if (shouldMemoize) {
                memoizedIsInitialized = 0;
              }
              return null;
            }
          }
          if (shouldMemoize) memoizedIsInitialized = 1;
          return DEFAULT_INSTANCE;

        }
        case MAKE_IMMUTABLE: {
          primitivegroup_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.PrimitiveBlock other = (crosby.binary.Osmformat.PrimitiveBlock) arg1;
          stringtable_ = visitor.visitMessage(stringtable_, other.stringtable_);
          primitivegroup_= visitor.visitList(primitivegroup_, other.primitivegroup_);
          granularity_ = visitor.visitInt(
              hasGranularity(), granularity_,
              other.hasGranularity(), other.granularity_);
          latOffset_ = visitor.visitLong(
              hasLatOffset(), latOffset_,
              other.hasLatOffset(), other.latOffset_);
          lonOffset_ = visitor.visitLong(
              hasLonOffset(), lonOffset_,
              other.hasLonOffset(), other.lonOffset_);
          dateGranularity_ = visitor.visitInt(
              hasDateGranularity(), dateGranularity_,
              other.hasDateGranularity(), other.dateGranularity_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 10: {
                  crosby.binary.Osmformat.StringTable.Builder subBuilder = null;
                  if (((bitField0_ & 0x00000001) == 0x00000001)) {
                    subBuilder = stringtable_.toBuilder();
                  }
                  stringtable_ = input.readMessage(crosby.binary.Osmformat.StringTable.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(stringtable_);
                    stringtable_ = subBuilder.buildPartial();
                  }
                  bitField0_ |= 0x00000001;
                  break;
                }
                case 18: {
                  if (!primitivegroup_.isModifiable()) {
                    primitivegroup_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(primitivegroup_);
                  }
                  primitivegroup_.add(
                      input.readMessage(crosby.binary.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 new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.PrimitiveBlock.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveBlock)
    private static final crosby.binary.Osmformat.PrimitiveBlock DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new PrimitiveBlock();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.PrimitiveBlock getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<PrimitiveBlock> PARSER;

    public static com.google.protobuf.Parser<PrimitiveBlock> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  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<crosby.binary.Osmformat.Node> 
        getNodesList();
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    crosby.binary.Osmformat.Node getNodes(int index);
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    int getNodesCount();

    /**
     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
     */
    boolean hasDense();
    /**
     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
     */
    crosby.binary.Osmformat.DenseNodes getDense();

    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    java.util.List<crosby.binary.Osmformat.Way> 
        getWaysList();
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    crosby.binary.Osmformat.Way getWays(int index);
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    int getWaysCount();

    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    java.util.List<crosby.binary.Osmformat.Relation> 
        getRelationsList();
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    crosby.binary.Osmformat.Relation getRelations(int index);
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    int getRelationsCount();

    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    java.util.List<crosby.binary.Osmformat.ChangeSet> 
        getChangesetsList();
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    crosby.binary.Osmformat.ChangeSet getChangesets(int index);
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    int getChangesetsCount();
  }
  /**
   * <pre>
   * Group of OSMPrimitives. All primitives in a group must be the same type.
   * </pre>
   *
   * Protobuf type {@code OSMPBF.PrimitiveGroup}
   */
  public  static final class PrimitiveGroup extends
      com.google.protobuf.GeneratedMessageLite<
          PrimitiveGroup, PrimitiveGroup.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveGroup)
      PrimitiveGroupOrBuilder {
    private PrimitiveGroup() {
      nodes_ = emptyProtobufList();
      ways_ = emptyProtobufList();
      relations_ = emptyProtobufList();
      changesets_ = emptyProtobufList();
    }
    private int bitField0_;
    public static final int NODES_FIELD_NUMBER = 1;
    private com.google.protobuf.Internal.ProtobufList<crosby.binary.Osmformat.Node> nodes_;
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    public java.util.List<crosby.binary.Osmformat.Node> getNodesList() {
      return nodes_;
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    public java.util.List<? extends crosby.binary.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 crosby.binary.Osmformat.Node getNodes(int index) {
      return nodes_.get(index);
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    public crosby.binary.Osmformat.NodeOrBuilder getNodesOrBuilder(
        int index) {
      return nodes_.get(index);
    }
    private void ensureNodesIsMutable() {
      if (!nodes_.isModifiable()) {
        nodes_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(nodes_);
       }
    }

    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    private void setNodes(
        int index, crosby.binary.Osmformat.Node value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureNodesIsMutable();
      nodes_.set(index, value);
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    private void setNodes(
        int index, crosby.binary.Osmformat.Node.Builder builderForValue) {
      ensureNodesIsMutable();
      nodes_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    private void addNodes(crosby.binary.Osmformat.Node value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureNodesIsMutable();
      nodes_.add(value);
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    private void addNodes(
        int index, crosby.binary.Osmformat.Node value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureNodesIsMutable();
      nodes_.add(index, value);
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    private void addNodes(
        crosby.binary.Osmformat.Node.Builder builderForValue) {
      ensureNodesIsMutable();
      nodes_.add(builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    private void addNodes(
        int index, crosby.binary.Osmformat.Node.Builder builderForValue) {
      ensureNodesIsMutable();
      nodes_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    private void addAllNodes(
        java.lang.Iterable<? extends crosby.binary.Osmformat.Node> values) {
      ensureNodesIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, nodes_);
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    private void clearNodes() {
      nodes_ = emptyProtobufList();
    }
    /**
     * <code>repeated .OSMPBF.Node nodes = 1;</code>
     */
    private void removeNodes(int index) {
      ensureNodesIsMutable();
      nodes_.remove(index);
    }

    public static final int DENSE_FIELD_NUMBER = 2;
    private crosby.binary.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 crosby.binary.Osmformat.DenseNodes getDense() {
      return dense_ == null ? crosby.binary.Osmformat.DenseNodes.getDefaultInstance() : dense_;
    }
    /**
     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
     */
    private void setDense(crosby.binary.Osmformat.DenseNodes value) {
      if (value == null) {
        throw new NullPointerException();
      }
      dense_ = value;
      bitField0_ |= 0x00000001;
      }
    /**
     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
     */
    private void setDense(
        crosby.binary.Osmformat.DenseNodes.Builder builderForValue) {
      dense_ = builderForValue.build();
      bitField0_ |= 0x00000001;
    }
    /**
     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
     */
    private void mergeDense(crosby.binary.Osmformat.DenseNodes value) {
      if (dense_ != null &&
          dense_ != crosby.binary.Osmformat.DenseNodes.getDefaultInstance()) {
        dense_ =
          crosby.binary.Osmformat.DenseNodes.newBuilder(dense_).mergeFrom(value).buildPartial();
      } else {
        dense_ = value;
      }
      bitField0_ |= 0x00000001;
    }
    /**
     * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
     */
    private void clearDense() {  dense_ = null;
      bitField0_ = (bitField0_ & ~0x00000001);
    }

    public static final int WAYS_FIELD_NUMBER = 3;
    private com.google.protobuf.Internal.ProtobufList<crosby.binary.Osmformat.Way> ways_;
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    public java.util.List<crosby.binary.Osmformat.Way> getWaysList() {
      return ways_;
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    public java.util.List<? extends crosby.binary.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 crosby.binary.Osmformat.Way getWays(int index) {
      return ways_.get(index);
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    public crosby.binary.Osmformat.WayOrBuilder getWaysOrBuilder(
        int index) {
      return ways_.get(index);
    }
    private void ensureWaysIsMutable() {
      if (!ways_.isModifiable()) {
        ways_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(ways_);
       }
    }

    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    private void setWays(
        int index, crosby.binary.Osmformat.Way value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureWaysIsMutable();
      ways_.set(index, value);
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    private void setWays(
        int index, crosby.binary.Osmformat.Way.Builder builderForValue) {
      ensureWaysIsMutable();
      ways_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    private void addWays(crosby.binary.Osmformat.Way value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureWaysIsMutable();
      ways_.add(value);
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    private void addWays(
        int index, crosby.binary.Osmformat.Way value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureWaysIsMutable();
      ways_.add(index, value);
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    private void addWays(
        crosby.binary.Osmformat.Way.Builder builderForValue) {
      ensureWaysIsMutable();
      ways_.add(builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    private void addWays(
        int index, crosby.binary.Osmformat.Way.Builder builderForValue) {
      ensureWaysIsMutable();
      ways_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    private void addAllWays(
        java.lang.Iterable<? extends crosby.binary.Osmformat.Way> values) {
      ensureWaysIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, ways_);
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    private void clearWays() {
      ways_ = emptyProtobufList();
    }
    /**
     * <code>repeated .OSMPBF.Way ways = 3;</code>
     */
    private void removeWays(int index) {
      ensureWaysIsMutable();
      ways_.remove(index);
    }

    public static final int RELATIONS_FIELD_NUMBER = 4;
    private com.google.protobuf.Internal.ProtobufList<crosby.binary.Osmformat.Relation> relations_;
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    public java.util.List<crosby.binary.Osmformat.Relation> getRelationsList() {
      return relations_;
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    public java.util.List<? extends crosby.binary.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 crosby.binary.Osmformat.Relation getRelations(int index) {
      return relations_.get(index);
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    public crosby.binary.Osmformat.RelationOrBuilder getRelationsOrBuilder(
        int index) {
      return relations_.get(index);
    }
    private void ensureRelationsIsMutable() {
      if (!relations_.isModifiable()) {
        relations_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(relations_);
       }
    }

    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    private void setRelations(
        int index, crosby.binary.Osmformat.Relation value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureRelationsIsMutable();
      relations_.set(index, value);
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    private void setRelations(
        int index, crosby.binary.Osmformat.Relation.Builder builderForValue) {
      ensureRelationsIsMutable();
      relations_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    private void addRelations(crosby.binary.Osmformat.Relation value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureRelationsIsMutable();
      relations_.add(value);
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    private void addRelations(
        int index, crosby.binary.Osmformat.Relation value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureRelationsIsMutable();
      relations_.add(index, value);
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    private void addRelations(
        crosby.binary.Osmformat.Relation.Builder builderForValue) {
      ensureRelationsIsMutable();
      relations_.add(builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    private void addRelations(
        int index, crosby.binary.Osmformat.Relation.Builder builderForValue) {
      ensureRelationsIsMutable();
      relations_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    private void addAllRelations(
        java.lang.Iterable<? extends crosby.binary.Osmformat.Relation> values) {
      ensureRelationsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, relations_);
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    private void clearRelations() {
      relations_ = emptyProtobufList();
    }
    /**
     * <code>repeated .OSMPBF.Relation relations = 4;</code>
     */
    private void removeRelations(int index) {
      ensureRelationsIsMutable();
      relations_.remove(index);
    }

    public static final int CHANGESETS_FIELD_NUMBER = 5;
    private com.google.protobuf.Internal.ProtobufList<crosby.binary.Osmformat.ChangeSet> changesets_;
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    public java.util.List<crosby.binary.Osmformat.ChangeSet> getChangesetsList() {
      return changesets_;
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    public java.util.List<? extends crosby.binary.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 crosby.binary.Osmformat.ChangeSet getChangesets(int index) {
      return changesets_.get(index);
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    public crosby.binary.Osmformat.ChangeSetOrBuilder getChangesetsOrBuilder(
        int index) {
      return changesets_.get(index);
    }
    private void ensureChangesetsIsMutable() {
      if (!changesets_.isModifiable()) {
        changesets_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(changesets_);
       }
    }

    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    private void setChangesets(
        int index, crosby.binary.Osmformat.ChangeSet value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureChangesetsIsMutable();
      changesets_.set(index, value);
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    private void setChangesets(
        int index, crosby.binary.Osmformat.ChangeSet.Builder builderForValue) {
      ensureChangesetsIsMutable();
      changesets_.set(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    private void addChangesets(crosby.binary.Osmformat.ChangeSet value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureChangesetsIsMutable();
      changesets_.add(value);
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    private void addChangesets(
        int index, crosby.binary.Osmformat.ChangeSet value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureChangesetsIsMutable();
      changesets_.add(index, value);
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    private void addChangesets(
        crosby.binary.Osmformat.ChangeSet.Builder builderForValue) {
      ensureChangesetsIsMutable();
      changesets_.add(builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    private void addChangesets(
        int index, crosby.binary.Osmformat.ChangeSet.Builder builderForValue) {
      ensureChangesetsIsMutable();
      changesets_.add(index, builderForValue.build());
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    private void addAllChangesets(
        java.lang.Iterable<? extends crosby.binary.Osmformat.ChangeSet> values) {
      ensureChangesetsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, changesets_);
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    private void clearChangesets() {
      changesets_ = emptyProtobufList();
    }
    /**
     * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
     */
    private void removeChangesets(int index) {
      ensureChangesetsIsMutable();
      changesets_.remove(index);
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      for (int i = 0; i < nodes_.size(); i++) {
        output.writeMessage(1, nodes_.get(i));
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(2, getDense());
      }
      for (int i = 0; i < ways_.size(); i++) {
        output.writeMessage(3, ways_.get(i));
      }
      for (int i = 0; i < relations_.size(); i++) {
        output.writeMessage(4, relations_.get(i));
      }
      for (int i = 0; i < changesets_.size(); i++) {
        output.writeMessage(5, changesets_.get(i));
      }
      unknownFields.writeTo(output);
    }

    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
          .computeMessageSize(1, nodes_.get(i));
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getDense());
      }
      for (int i = 0; i < ways_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, ways_.get(i));
      }
      for (int i = 0; i < relations_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, relations_.get(i));
      }
      for (int i = 0; i < changesets_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, changesets_.get(i));
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.PrimitiveGroup parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.PrimitiveGroup prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * <pre>
     * Group of OSMPrimitives. All primitives in a group must be the same type.
     * </pre>
     *
     * Protobuf type {@code OSMPBF.PrimitiveGroup}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.PrimitiveGroup, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveGroup)
        crosby.binary.Osmformat.PrimitiveGroupOrBuilder {
      // Construct using crosby.binary.Osmformat.PrimitiveGroup.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public java.util.List<crosby.binary.Osmformat.Node> getNodesList() {
        return java.util.Collections.unmodifiableList(
            instance.getNodesList());
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public int getNodesCount() {
        return instance.getNodesCount();
      }/**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public crosby.binary.Osmformat.Node getNodes(int index) {
        return instance.getNodes(index);
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public Builder setNodes(
          int index, crosby.binary.Osmformat.Node value) {
        copyOnWrite();
        instance.setNodes(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public Builder setNodes(
          int index, crosby.binary.Osmformat.Node.Builder builderForValue) {
        copyOnWrite();
        instance.setNodes(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public Builder addNodes(crosby.binary.Osmformat.Node value) {
        copyOnWrite();
        instance.addNodes(value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public Builder addNodes(
          int index, crosby.binary.Osmformat.Node value) {
        copyOnWrite();
        instance.addNodes(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public Builder addNodes(
          crosby.binary.Osmformat.Node.Builder builderForValue) {
        copyOnWrite();
        instance.addNodes(builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public Builder addNodes(
          int index, crosby.binary.Osmformat.Node.Builder builderForValue) {
        copyOnWrite();
        instance.addNodes(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public Builder addAllNodes(
          java.lang.Iterable<? extends crosby.binary.Osmformat.Node> values) {
        copyOnWrite();
        instance.addAllNodes(values);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public Builder clearNodes() {
        copyOnWrite();
        instance.clearNodes();
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Node nodes = 1;</code>
       */
      public Builder removeNodes(int index) {
        copyOnWrite();
        instance.removeNodes(index);
        return this;
      }

      /**
       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
       */
      public boolean hasDense() {
        return instance.hasDense();
      }
      /**
       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
       */
      public crosby.binary.Osmformat.DenseNodes getDense() {
        return instance.getDense();
      }
      /**
       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
       */
      public Builder setDense(crosby.binary.Osmformat.DenseNodes value) {
        copyOnWrite();
        instance.setDense(value);
        return this;
        }
      /**
       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
       */
      public Builder setDense(
          crosby.binary.Osmformat.DenseNodes.Builder builderForValue) {
        copyOnWrite();
        instance.setDense(builderForValue);
        return this;
      }
      /**
       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
       */
      public Builder mergeDense(crosby.binary.Osmformat.DenseNodes value) {
        copyOnWrite();
        instance.mergeDense(value);
        return this;
      }
      /**
       * <code>optional .OSMPBF.DenseNodes dense = 2;</code>
       */
      public Builder clearDense() {  copyOnWrite();
        instance.clearDense();
        return this;
      }

      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public java.util.List<crosby.binary.Osmformat.Way> getWaysList() {
        return java.util.Collections.unmodifiableList(
            instance.getWaysList());
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public int getWaysCount() {
        return instance.getWaysCount();
      }/**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public crosby.binary.Osmformat.Way getWays(int index) {
        return instance.getWays(index);
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public Builder setWays(
          int index, crosby.binary.Osmformat.Way value) {
        copyOnWrite();
        instance.setWays(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public Builder setWays(
          int index, crosby.binary.Osmformat.Way.Builder builderForValue) {
        copyOnWrite();
        instance.setWays(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public Builder addWays(crosby.binary.Osmformat.Way value) {
        copyOnWrite();
        instance.addWays(value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public Builder addWays(
          int index, crosby.binary.Osmformat.Way value) {
        copyOnWrite();
        instance.addWays(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public Builder addWays(
          crosby.binary.Osmformat.Way.Builder builderForValue) {
        copyOnWrite();
        instance.addWays(builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public Builder addWays(
          int index, crosby.binary.Osmformat.Way.Builder builderForValue) {
        copyOnWrite();
        instance.addWays(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public Builder addAllWays(
          java.lang.Iterable<? extends crosby.binary.Osmformat.Way> values) {
        copyOnWrite();
        instance.addAllWays(values);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public Builder clearWays() {
        copyOnWrite();
        instance.clearWays();
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Way ways = 3;</code>
       */
      public Builder removeWays(int index) {
        copyOnWrite();
        instance.removeWays(index);
        return this;
      }

      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public java.util.List<crosby.binary.Osmformat.Relation> getRelationsList() {
        return java.util.Collections.unmodifiableList(
            instance.getRelationsList());
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public int getRelationsCount() {
        return instance.getRelationsCount();
      }/**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public crosby.binary.Osmformat.Relation getRelations(int index) {
        return instance.getRelations(index);
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public Builder setRelations(
          int index, crosby.binary.Osmformat.Relation value) {
        copyOnWrite();
        instance.setRelations(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public Builder setRelations(
          int index, crosby.binary.Osmformat.Relation.Builder builderForValue) {
        copyOnWrite();
        instance.setRelations(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public Builder addRelations(crosby.binary.Osmformat.Relation value) {
        copyOnWrite();
        instance.addRelations(value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public Builder addRelations(
          int index, crosby.binary.Osmformat.Relation value) {
        copyOnWrite();
        instance.addRelations(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public Builder addRelations(
          crosby.binary.Osmformat.Relation.Builder builderForValue) {
        copyOnWrite();
        instance.addRelations(builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public Builder addRelations(
          int index, crosby.binary.Osmformat.Relation.Builder builderForValue) {
        copyOnWrite();
        instance.addRelations(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public Builder addAllRelations(
          java.lang.Iterable<? extends crosby.binary.Osmformat.Relation> values) {
        copyOnWrite();
        instance.addAllRelations(values);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public Builder clearRelations() {
        copyOnWrite();
        instance.clearRelations();
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation relations = 4;</code>
       */
      public Builder removeRelations(int index) {
        copyOnWrite();
        instance.removeRelations(index);
        return this;
      }

      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public java.util.List<crosby.binary.Osmformat.ChangeSet> getChangesetsList() {
        return java.util.Collections.unmodifiableList(
            instance.getChangesetsList());
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public int getChangesetsCount() {
        return instance.getChangesetsCount();
      }/**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public crosby.binary.Osmformat.ChangeSet getChangesets(int index) {
        return instance.getChangesets(index);
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public Builder setChangesets(
          int index, crosby.binary.Osmformat.ChangeSet value) {
        copyOnWrite();
        instance.setChangesets(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public Builder setChangesets(
          int index, crosby.binary.Osmformat.ChangeSet.Builder builderForValue) {
        copyOnWrite();
        instance.setChangesets(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public Builder addChangesets(crosby.binary.Osmformat.ChangeSet value) {
        copyOnWrite();
        instance.addChangesets(value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public Builder addChangesets(
          int index, crosby.binary.Osmformat.ChangeSet value) {
        copyOnWrite();
        instance.addChangesets(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public Builder addChangesets(
          crosby.binary.Osmformat.ChangeSet.Builder builderForValue) {
        copyOnWrite();
        instance.addChangesets(builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public Builder addChangesets(
          int index, crosby.binary.Osmformat.ChangeSet.Builder builderForValue) {
        copyOnWrite();
        instance.addChangesets(index, builderForValue);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public Builder addAllChangesets(
          java.lang.Iterable<? extends crosby.binary.Osmformat.ChangeSet> values) {
        copyOnWrite();
        instance.addAllChangesets(values);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public Builder clearChangesets() {
        copyOnWrite();
        instance.clearChangesets();
        return this;
      }
      /**
       * <code>repeated .OSMPBF.ChangeSet changesets = 5;</code>
       */
      public Builder removeChangesets(int index) {
        copyOnWrite();
        instance.removeChangesets(index);
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveGroup)
    }
    private byte memoizedIsInitialized = -1;
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.PrimitiveGroup();
        }
        case IS_INITIALIZED: {
          byte isInitialized = memoizedIsInitialized;
          if (isInitialized == 1) return DEFAULT_INSTANCE;
          if (isInitialized == 0) return null;

          boolean shouldMemoize = ((Boolean) arg0).booleanValue();
          for (int i = 0; i < getNodesCount(); i++) {
            if (!getNodes(i).isInitialized()) {
              if (shouldMemoize) {
                memoizedIsInitialized = 0;
              }
              return null;
            }
          }
          for (int i = 0; i < getWaysCount(); i++) {
            if (!getWays(i).isInitialized()) {
              if (shouldMemoize) {
                memoizedIsInitialized = 0;
              }
              return null;
            }
          }
          for (int i = 0; i < getRelationsCount(); i++) {
            if (!getRelations(i).isInitialized()) {
              if (shouldMemoize) {
                memoizedIsInitialized = 0;
              }
              return null;
            }
          }
          for (int i = 0; i < getChangesetsCount(); i++) {
            if (!getChangesets(i).isInitialized()) {
              if (shouldMemoize) {
                memoizedIsInitialized = 0;
              }
              return null;
            }
          }
          if (shouldMemoize) memoizedIsInitialized = 1;
          return DEFAULT_INSTANCE;

        }
        case MAKE_IMMUTABLE: {
          nodes_.makeImmutable();
          ways_.makeImmutable();
          relations_.makeImmutable();
          changesets_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.PrimitiveGroup other = (crosby.binary.Osmformat.PrimitiveGroup) arg1;
          nodes_= visitor.visitList(nodes_, other.nodes_);
          dense_ = visitor.visitMessage(dense_, other.dense_);
          ways_= visitor.visitList(ways_, other.ways_);
          relations_= visitor.visitList(relations_, other.relations_);
          changesets_= visitor.visitList(changesets_, other.changesets_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 10: {
                  if (!nodes_.isModifiable()) {
                    nodes_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(nodes_);
                  }
                  nodes_.add(
                      input.readMessage(crosby.binary.Osmformat.Node.parser(), extensionRegistry));
                  break;
                }
                case 18: {
                  crosby.binary.Osmformat.DenseNodes.Builder subBuilder = null;
                  if (((bitField0_ & 0x00000001) == 0x00000001)) {
                    subBuilder = dense_.toBuilder();
                  }
                  dense_ = input.readMessage(crosby.binary.Osmformat.DenseNodes.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(dense_);
                    dense_ = subBuilder.buildPartial();
                  }
                  bitField0_ |= 0x00000001;
                  break;
                }
                case 26: {
                  if (!ways_.isModifiable()) {
                    ways_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(ways_);
                  }
                  ways_.add(
                      input.readMessage(crosby.binary.Osmformat.Way.parser(), extensionRegistry));
                  break;
                }
                case 34: {
                  if (!relations_.isModifiable()) {
                    relations_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(relations_);
                  }
                  relations_.add(
                      input.readMessage(crosby.binary.Osmformat.Relation.parser(), extensionRegistry));
                  break;
                }
                case 42: {
                  if (!changesets_.isModifiable()) {
                    changesets_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(changesets_);
                  }
                  changesets_.add(
                      input.readMessage(crosby.binary.Osmformat.ChangeSet.parser(), extensionRegistry));
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.PrimitiveGroup.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveGroup)
    private static final crosby.binary.Osmformat.PrimitiveGroup DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new PrimitiveGroup();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.PrimitiveGroup getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<PrimitiveGroup> PARSER;

    public static com.google.protobuf.Parser<PrimitiveGroup> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  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);
  }
  /**
   * <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>
   *
   * Protobuf type {@code OSMPBF.StringTable}
   */
  public  static final class StringTable extends
      com.google.protobuf.GeneratedMessageLite<
          StringTable, StringTable.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.StringTable)
      StringTableOrBuilder {
    private StringTable() {
      s_ = emptyProtobufList();
    }
    public static final int S_FIELD_NUMBER = 1;
    private com.google.protobuf.Internal.ProtobufList<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 ensureSIsMutable() {
      if (!s_.isModifiable()) {
        s_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(s_);
       }
    }
    /**
     * <code>repeated bytes s = 1;</code>
     */
    private void setS(
        int index, com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureSIsMutable();
      s_.set(index, value);
    }
    /**
     * <code>repeated bytes s = 1;</code>
     */
    private void addS(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureSIsMutable();
      s_.add(value);
    }
    /**
     * <code>repeated bytes s = 1;</code>
     */
    private void addAllS(
        java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
      ensureSIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, s_);
    }
    /**
     * <code>repeated bytes s = 1;</code>
     */
    private void clearS() {
      s_ = emptyProtobufList();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      for (int i = 0; i < s_.size(); i++) {
        output.writeBytes(1, s_.get(i));
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      {
        int dataSize = 0;
        for (int i = 0; i < s_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(s_.get(i));
        }
        size += dataSize;
        size += 1 * getSList().size();
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.StringTable parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.StringTable parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.StringTable parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.StringTable parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.StringTable parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.StringTable parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.StringTable parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.StringTable parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.StringTable parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.StringTable parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.StringTable parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.StringTable parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.StringTable prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * <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>
     *
     * Protobuf type {@code OSMPBF.StringTable}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.StringTable, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.StringTable)
        crosby.binary.Osmformat.StringTableOrBuilder {
      // Construct using crosby.binary.Osmformat.StringTable.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>repeated bytes s = 1;</code>
       */
      public java.util.List<com.google.protobuf.ByteString>
          getSList() {
        return java.util.Collections.unmodifiableList(
            instance.getSList());
      }
      /**
       * <code>repeated bytes s = 1;</code>
       */
      public int getSCount() {
        return instance.getSCount();
      }
      /**
       * <code>repeated bytes s = 1;</code>
       */
      public com.google.protobuf.ByteString getS(int index) {
        return instance.getS(index);
      }
      /**
       * <code>repeated bytes s = 1;</code>
       */
      public Builder setS(
          int index, com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setS(index, value);
        return this;
      }
      /**
       * <code>repeated bytes s = 1;</code>
       */
      public Builder addS(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.addS(value);
        return this;
      }
      /**
       * <code>repeated bytes s = 1;</code>
       */
      public Builder addAllS(
          java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
        copyOnWrite();
        instance.addAllS(values);
        return this;
      }
      /**
       * <code>repeated bytes s = 1;</code>
       */
      public Builder clearS() {
        copyOnWrite();
        instance.clearS();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.StringTable)
    }
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.StringTable();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          s_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.StringTable other = (crosby.binary.Osmformat.StringTable) arg1;
          s_= visitor.visitList(s_, other.s_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 10: {
                  if (!s_.isModifiable()) {
                    s_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(s_);
                  }
                  s_.add(input.readBytes());
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.StringTable.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.StringTable)
    private static final crosby.binary.Osmformat.StringTable DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new StringTable();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.StringTable getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<StringTable> PARSER;

    public static com.google.protobuf.Parser<StringTable> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  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();

    /**
     * <code>optional int64 timestamp = 2;</code>
     */
    boolean hasTimestamp();
    /**
     * <code>optional int64 timestamp = 2;</code>
     */
    long getTimestamp();

    /**
     * <code>optional int64 changeset = 3;</code>
     */
    boolean hasChangeset();
    /**
     * <code>optional int64 changeset = 3;</code>
     */
    long getChangeset();

    /**
     * <code>optional int32 uid = 4;</code>
     */
    boolean hasUid();
    /**
     * <code>optional int32 uid = 4;</code>
     */
    int getUid();

    /**
     * <pre>
     * String IDs
     * </pre>
     *
     * <code>optional uint32 user_sid = 5;</code>
     */
    boolean hasUserSid();
    /**
     * <pre>
     * String IDs
     * </pre>
     *
     * <code>optional uint32 user_sid = 5;</code>
     */
    int getUserSid();

    /**
     * <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>
     *
     * <code>optional bool visible = 6;</code>
     */
    boolean hasVisible();
    /**
     * <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>
     *
     * <code>optional bool visible = 6;</code>
     */
    boolean getVisible();
  }
  /**
   * <pre>
   * Optional metadata that may be included into each primitive. 
   * </pre>
   *
   * Protobuf type {@code OSMPBF.Info}
   */
  public  static final class Info extends
      com.google.protobuf.GeneratedMessageLite<
          Info, Info.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.Info)
      InfoOrBuilder {
    private Info() {
      version_ = -1;
    }
    private int bitField0_;
    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_;
    }
    /**
     * <code>optional int32 version = 1 [default = -1];</code>
     */
    private void setVersion(int value) {
      bitField0_ |= 0x00000001;
      version_ = value;
    }
    /**
     * <code>optional int32 version = 1 [default = -1];</code>
     */
    private void clearVersion() {
      bitField0_ = (bitField0_ & ~0x00000001);
      version_ = -1;
    }

    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_;
    }
    /**
     * <code>optional int64 timestamp = 2;</code>
     */
    private void setTimestamp(long value) {
      bitField0_ |= 0x00000002;
      timestamp_ = value;
    }
    /**
     * <code>optional int64 timestamp = 2;</code>
     */
    private void clearTimestamp() {
      bitField0_ = (bitField0_ & ~0x00000002);
      timestamp_ = 0L;
    }

    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_;
    }
    /**
     * <code>optional int64 changeset = 3;</code>
     */
    private void setChangeset(long value) {
      bitField0_ |= 0x00000004;
      changeset_ = value;
    }
    /**
     * <code>optional int64 changeset = 3;</code>
     */
    private void clearChangeset() {
      bitField0_ = (bitField0_ & ~0x00000004);
      changeset_ = 0L;
    }

    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_;
    }
    /**
     * <code>optional int32 uid = 4;</code>
     */
    private void setUid(int value) {
      bitField0_ |= 0x00000008;
      uid_ = value;
    }
    /**
     * <code>optional int32 uid = 4;</code>
     */
    private void clearUid() {
      bitField0_ = (bitField0_ & ~0x00000008);
      uid_ = 0;
    }

    public static final int USER_SID_FIELD_NUMBER = 5;
    private int userSid_;
    /**
     * <pre>
     * String IDs
     * </pre>
     *
     * <code>optional uint32 user_sid = 5;</code>
     */
    public boolean hasUserSid() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    /**
     * <pre>
     * String IDs
     * </pre>
     *
     * <code>optional uint32 user_sid = 5;</code>
     */
    public int getUserSid() {
      return userSid_;
    }
    /**
     * <pre>
     * String IDs
     * </pre>
     *
     * <code>optional uint32 user_sid = 5;</code>
     */
    private void setUserSid(int value) {
      bitField0_ |= 0x00000010;
      userSid_ = value;
    }
    /**
     * <pre>
     * String IDs
     * </pre>
     *
     * <code>optional uint32 user_sid = 5;</code>
     */
    private void clearUserSid() {
      bitField0_ = (bitField0_ & ~0x00000010);
      userSid_ = 0;
    }

    public static final int VISIBLE_FIELD_NUMBER = 6;
    private boolean visible_;
    /**
     * <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>
     *
     * <code>optional bool visible = 6;</code>
     */
    public boolean hasVisible() {
      return ((bitField0_ & 0x00000020) == 0x00000020);
    }
    /**
     * <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>
     *
     * <code>optional bool visible = 6;</code>
     */
    public boolean getVisible() {
      return visible_;
    }
    /**
     * <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>
     *
     * <code>optional bool visible = 6;</code>
     */
    private void setVisible(boolean value) {
      bitField0_ |= 0x00000020;
      visible_ = value;
    }
    /**
     * <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>
     *
     * <code>optional bool visible = 6;</code>
     */
    private void clearVisible() {
      bitField0_ = (bitField0_ & ~0x00000020);
      visible_ = false;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeInt32(1, version_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeInt64(2, timestamp_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt64(3, changeset_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeInt32(4, uid_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeUInt32(5, userSid_);
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        output.writeBool(6, visible_);
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, version_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(2, timestamp_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(3, changeset_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(4, uid_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(5, userSid_);
      }
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(6, visible_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.Info parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Info parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Info parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Info parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Info parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Info parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Info parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Info parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Info parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Info parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Info parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Info parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.Info prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * <pre>
     * Optional metadata that may be included into each primitive. 
     * </pre>
     *
     * Protobuf type {@code OSMPBF.Info}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.Info, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.Info)
        crosby.binary.Osmformat.InfoOrBuilder {
      // Construct using crosby.binary.Osmformat.Info.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>optional int32 version = 1 [default = -1];</code>
       */
      public boolean hasVersion() {
        return instance.hasVersion();
      }
      /**
       * <code>optional int32 version = 1 [default = -1];</code>
       */
      public int getVersion() {
        return instance.getVersion();
      }
      /**
       * <code>optional int32 version = 1 [default = -1];</code>
       */
      public Builder setVersion(int value) {
        copyOnWrite();
        instance.setVersion(value);
        return this;
      }
      /**
       * <code>optional int32 version = 1 [default = -1];</code>
       */
      public Builder clearVersion() {
        copyOnWrite();
        instance.clearVersion();
        return this;
      }

      /**
       * <code>optional int64 timestamp = 2;</code>
       */
      public boolean hasTimestamp() {
        return instance.hasTimestamp();
      }
      /**
       * <code>optional int64 timestamp = 2;</code>
       */
      public long getTimestamp() {
        return instance.getTimestamp();
      }
      /**
       * <code>optional int64 timestamp = 2;</code>
       */
      public Builder setTimestamp(long value) {
        copyOnWrite();
        instance.setTimestamp(value);
        return this;
      }
      /**
       * <code>optional int64 timestamp = 2;</code>
       */
      public Builder clearTimestamp() {
        copyOnWrite();
        instance.clearTimestamp();
        return this;
      }

      /**
       * <code>optional int64 changeset = 3;</code>
       */
      public boolean hasChangeset() {
        return instance.hasChangeset();
      }
      /**
       * <code>optional int64 changeset = 3;</code>
       */
      public long getChangeset() {
        return instance.getChangeset();
      }
      /**
       * <code>optional int64 changeset = 3;</code>
       */
      public Builder setChangeset(long value) {
        copyOnWrite();
        instance.setChangeset(value);
        return this;
      }
      /**
       * <code>optional int64 changeset = 3;</code>
       */
      public Builder clearChangeset() {
        copyOnWrite();
        instance.clearChangeset();
        return this;
      }

      /**
       * <code>optional int32 uid = 4;</code>
       */
      public boolean hasUid() {
        return instance.hasUid();
      }
      /**
       * <code>optional int32 uid = 4;</code>
       */
      public int getUid() {
        return instance.getUid();
      }
      /**
       * <code>optional int32 uid = 4;</code>
       */
      public Builder setUid(int value) {
        copyOnWrite();
        instance.setUid(value);
        return this;
      }
      /**
       * <code>optional int32 uid = 4;</code>
       */
      public Builder clearUid() {
        copyOnWrite();
        instance.clearUid();
        return this;
      }

      /**
       * <pre>
       * String IDs
       * </pre>
       *
       * <code>optional uint32 user_sid = 5;</code>
       */
      public boolean hasUserSid() {
        return instance.hasUserSid();
      }
      /**
       * <pre>
       * String IDs
       * </pre>
       *
       * <code>optional uint32 user_sid = 5;</code>
       */
      public int getUserSid() {
        return instance.getUserSid();
      }
      /**
       * <pre>
       * String IDs
       * </pre>
       *
       * <code>optional uint32 user_sid = 5;</code>
       */
      public Builder setUserSid(int value) {
        copyOnWrite();
        instance.setUserSid(value);
        return this;
      }
      /**
       * <pre>
       * String IDs
       * </pre>
       *
       * <code>optional uint32 user_sid = 5;</code>
       */
      public Builder clearUserSid() {
        copyOnWrite();
        instance.clearUserSid();
        return this;
      }

      /**
       * <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>
       *
       * <code>optional bool visible = 6;</code>
       */
      public boolean hasVisible() {
        return instance.hasVisible();
      }
      /**
       * <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>
       *
       * <code>optional bool visible = 6;</code>
       */
      public boolean getVisible() {
        return instance.getVisible();
      }
      /**
       * <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>
       *
       * <code>optional bool visible = 6;</code>
       */
      public Builder setVisible(boolean value) {
        copyOnWrite();
        instance.setVisible(value);
        return this;
      }
      /**
       * <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>
       *
       * <code>optional bool visible = 6;</code>
       */
      public Builder clearVisible() {
        copyOnWrite();
        instance.clearVisible();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.Info)
    }
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.Info();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.Info other = (crosby.binary.Osmformat.Info) arg1;
          version_ = visitor.visitInt(
              hasVersion(), version_,
              other.hasVersion(), other.version_);
          timestamp_ = visitor.visitLong(
              hasTimestamp(), timestamp_,
              other.hasTimestamp(), other.timestamp_);
          changeset_ = visitor.visitLong(
              hasChangeset(), changeset_,
              other.hasChangeset(), other.changeset_);
          uid_ = visitor.visitInt(
              hasUid(), uid_,
              other.hasUid(), other.uid_);
          userSid_ = visitor.visitInt(
              hasUserSid(), userSid_,
              other.hasUserSid(), other.userSid_);
          visible_ = visitor.visitBoolean(
              hasVisible(), visible_,
              other.hasVisible(), other.visible_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    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 new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.Info.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.Info)
    private static final crosby.binary.Osmformat.Info DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new Info();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.Info getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Info> PARSER;

    public static com.google.protobuf.Parser<Info> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  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);

    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    java.util.List<java.lang.Long> getTimestampList();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    int getTimestampCount();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    long getTimestamp(int index);

    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    java.util.List<java.lang.Long> getChangesetList();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    int getChangesetCount();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    long getChangeset(int index);

    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    java.util.List<java.lang.Integer> getUidList();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    int getUidCount();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    int getUid(int index);

    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    java.util.List<java.lang.Integer> getUserSidList();
    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    int getUserSidCount();
    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    int getUserSid(int index);

    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    java.util.List<java.lang.Boolean> getVisibleList();
    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    int getVisibleCount();
    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    boolean getVisible(int index);
  }
  /**
   * <pre>
   ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes. 
   * </pre>
   *
   * Protobuf type {@code OSMPBF.DenseInfo}
   */
  public  static final class DenseInfo extends
      com.google.protobuf.GeneratedMessageLite<
          DenseInfo, DenseInfo.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.DenseInfo)
      DenseInfoOrBuilder {
    private DenseInfo() {
      version_ = emptyIntList();
      timestamp_ = emptyLongList();
      changeset_ = emptyLongList();
      uid_ = emptyIntList();
      userSid_ = emptyIntList();
      visible_ = emptyBooleanList();
    }
    public static final int VERSION_FIELD_NUMBER = 1;
    private com.google.protobuf.Internal.IntList 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_.getInt(index);
    }
    private int versionMemoizedSerializedSize = -1;
    private void ensureVersionIsMutable() {
      if (!version_.isModifiable()) {
        version_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(version_);
       }
    }
    /**
     * <code>repeated int32 version = 1 [packed = true];</code>
     */
    private void setVersion(
        int index, int value) {
      ensureVersionIsMutable();
      version_.setInt(index, value);
    }
    /**
     * <code>repeated int32 version = 1 [packed = true];</code>
     */
    private void addVersion(int value) {
      ensureVersionIsMutable();
      version_.addInt(value);
    }
    /**
     * <code>repeated int32 version = 1 [packed = true];</code>
     */
    private void addAllVersion(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureVersionIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, version_);
    }
    /**
     * <code>repeated int32 version = 1 [packed = true];</code>
     */
    private void clearVersion() {
      version_ = emptyIntList();
    }

    public static final int TIMESTAMP_FIELD_NUMBER = 2;
    private com.google.protobuf.Internal.LongList timestamp_;
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    public java.util.List<java.lang.Long>
        getTimestampList() {
      return timestamp_;
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    public int getTimestampCount() {
      return timestamp_.size();
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    public long getTimestamp(int index) {
      return timestamp_.getLong(index);
    }
    private int timestampMemoizedSerializedSize = -1;
    private void ensureTimestampIsMutable() {
      if (!timestamp_.isModifiable()) {
        timestamp_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(timestamp_);
       }
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    private void setTimestamp(
        int index, long value) {
      ensureTimestampIsMutable();
      timestamp_.setLong(index, value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    private void addTimestamp(long value) {
      ensureTimestampIsMutable();
      timestamp_.addLong(value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    private void addAllTimestamp(
        java.lang.Iterable<? extends java.lang.Long> values) {
      ensureTimestampIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, timestamp_);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 timestamp = 2 [packed = true];</code>
     */
    private void clearTimestamp() {
      timestamp_ = emptyLongList();
    }

    public static final int CHANGESET_FIELD_NUMBER = 3;
    private com.google.protobuf.Internal.LongList changeset_;
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    public java.util.List<java.lang.Long>
        getChangesetList() {
      return changeset_;
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    public int getChangesetCount() {
      return changeset_.size();
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    public long getChangeset(int index) {
      return changeset_.getLong(index);
    }
    private int changesetMemoizedSerializedSize = -1;
    private void ensureChangesetIsMutable() {
      if (!changeset_.isModifiable()) {
        changeset_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(changeset_);
       }
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    private void setChangeset(
        int index, long value) {
      ensureChangesetIsMutable();
      changeset_.setLong(index, value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    private void addChangeset(long value) {
      ensureChangesetIsMutable();
      changeset_.addLong(value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    private void addAllChangeset(
        java.lang.Iterable<? extends java.lang.Long> values) {
      ensureChangesetIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, changeset_);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 changeset = 3 [packed = true];</code>
     */
    private void clearChangeset() {
      changeset_ = emptyLongList();
    }

    public static final int UID_FIELD_NUMBER = 4;
    private com.google.protobuf.Internal.IntList uid_;
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    public java.util.List<java.lang.Integer>
        getUidList() {
      return uid_;
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    public int getUidCount() {
      return uid_.size();
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    public int getUid(int index) {
      return uid_.getInt(index);
    }
    private int uidMemoizedSerializedSize = -1;
    private void ensureUidIsMutable() {
      if (!uid_.isModifiable()) {
        uid_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(uid_);
       }
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    private void setUid(
        int index, int value) {
      ensureUidIsMutable();
      uid_.setInt(index, value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    private void addUid(int value) {
      ensureUidIsMutable();
      uid_.addInt(value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    private void addAllUid(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureUidIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, uid_);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint32 uid = 4 [packed = true];</code>
     */
    private void clearUid() {
      uid_ = emptyIntList();
    }

    public static final int USER_SID_FIELD_NUMBER = 5;
    private com.google.protobuf.Internal.IntList userSid_;
    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    public java.util.List<java.lang.Integer>
        getUserSidList() {
      return userSid_;
    }
    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    public int getUserSidCount() {
      return userSid_.size();
    }
    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    public int getUserSid(int index) {
      return userSid_.getInt(index);
    }
    private int userSidMemoizedSerializedSize = -1;
    private void ensureUserSidIsMutable() {
      if (!userSid_.isModifiable()) {
        userSid_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(userSid_);
       }
    }
    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    private void setUserSid(
        int index, int value) {
      ensureUserSidIsMutable();
      userSid_.setInt(index, value);
    }
    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    private void addUserSid(int value) {
      ensureUserSidIsMutable();
      userSid_.addInt(value);
    }
    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    private void addAllUserSid(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureUserSidIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, userSid_);
    }
    /**
     * <pre>
     * String IDs for usernames. DELTA coded
     * </pre>
     *
     * <code>repeated sint32 user_sid = 5 [packed = true];</code>
     */
    private void clearUserSid() {
      userSid_ = emptyIntList();
    }

    public static final int VISIBLE_FIELD_NUMBER = 6;
    private com.google.protobuf.Internal.BooleanList visible_;
    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    public java.util.List<java.lang.Boolean>
        getVisibleList() {
      return visible_;
    }
    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    public int getVisibleCount() {
      return visible_.size();
    }
    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    public boolean getVisible(int index) {
      return visible_.getBoolean(index);
    }
    private int visibleMemoizedSerializedSize = -1;
    private void ensureVisibleIsMutable() {
      if (!visible_.isModifiable()) {
        visible_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(visible_);
       }
    }
    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    private void setVisible(
        int index, boolean value) {
      ensureVisibleIsMutable();
      visible_.setBoolean(index, value);
    }
    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    private void addVisible(boolean value) {
      ensureVisibleIsMutable();
      visible_.addBoolean(value);
    }
    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    private void addAllVisible(
        java.lang.Iterable<? extends java.lang.Boolean> values) {
      ensureVisibleIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, visible_);
    }
    /**
     * <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>
     *
     * <code>repeated bool visible = 6 [packed = true];</code>
     */
    private void clearVisible() {
      visible_ = emptyBooleanList();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (getVersionList().size() > 0) {
        output.writeUInt32NoTag(10);
        output.writeUInt32NoTag(versionMemoizedSerializedSize);
      }
      for (int i = 0; i < version_.size(); i++) {
        output.writeInt32NoTag(version_.getInt(i));
      }
      if (getTimestampList().size() > 0) {
        output.writeUInt32NoTag(18);
        output.writeUInt32NoTag(timestampMemoizedSerializedSize);
      }
      for (int i = 0; i < timestamp_.size(); i++) {
        output.writeSInt64NoTag(timestamp_.getLong(i));
      }
      if (getChangesetList().size() > 0) {
        output.writeUInt32NoTag(26);
        output.writeUInt32NoTag(changesetMemoizedSerializedSize);
      }
      for (int i = 0; i < changeset_.size(); i++) {
        output.writeSInt64NoTag(changeset_.getLong(i));
      }
      if (getUidList().size() > 0) {
        output.writeUInt32NoTag(34);
        output.writeUInt32NoTag(uidMemoizedSerializedSize);
      }
      for (int i = 0; i < uid_.size(); i++) {
        output.writeSInt32NoTag(uid_.getInt(i));
      }
      if (getUserSidList().size() > 0) {
        output.writeUInt32NoTag(42);
        output.writeUInt32NoTag(userSidMemoizedSerializedSize);
      }
      for (int i = 0; i < userSid_.size(); i++) {
        output.writeSInt32NoTag(userSid_.getInt(i));
      }
      if (getVisibleList().size() > 0) {
        output.writeUInt32NoTag(50);
        output.writeUInt32NoTag(visibleMemoizedSerializedSize);
      }
      for (int i = 0; i < visible_.size(); i++) {
        output.writeBoolNoTag(visible_.getBoolean(i));
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      {
        int dataSize = 0;
        for (int i = 0; i < version_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(version_.getInt(i));
        }
        size += dataSize;
        if (!getVersionList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        versionMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < timestamp_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeSInt64SizeNoTag(timestamp_.getLong(i));
        }
        size += dataSize;
        if (!getTimestampList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        timestampMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < changeset_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeSInt64SizeNoTag(changeset_.getLong(i));
        }
        size += dataSize;
        if (!getChangesetList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        changesetMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < uid_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeSInt32SizeNoTag(uid_.getInt(i));
        }
        size += dataSize;
        if (!getUidList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        uidMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < userSid_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeSInt32SizeNoTag(userSid_.getInt(i));
        }
        size += dataSize;
        if (!getUserSidList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        userSidMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        dataSize = 1 * getVisibleList().size();
        size += dataSize;
        if (!getVisibleList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        visibleMemoizedSerializedSize = dataSize;
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.DenseInfo parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.DenseInfo parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseInfo parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.DenseInfo parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseInfo parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.DenseInfo parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseInfo parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.DenseInfo parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseInfo parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.DenseInfo parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseInfo parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.DenseInfo parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.DenseInfo prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * <pre>
     ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes. 
     * </pre>
     *
     * Protobuf type {@code OSMPBF.DenseInfo}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.DenseInfo, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.DenseInfo)
        crosby.binary.Osmformat.DenseInfoOrBuilder {
      // Construct using crosby.binary.Osmformat.DenseInfo.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>repeated int32 version = 1 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getVersionList() {
        return java.util.Collections.unmodifiableList(
            instance.getVersionList());
      }
      /**
       * <code>repeated int32 version = 1 [packed = true];</code>
       */
      public int getVersionCount() {
        return instance.getVersionCount();
      }
      /**
       * <code>repeated int32 version = 1 [packed = true];</code>
       */
      public int getVersion(int index) {
        return instance.getVersion(index);
      }
      /**
       * <code>repeated int32 version = 1 [packed = true];</code>
       */
      public Builder setVersion(
          int index, int value) {
        copyOnWrite();
        instance.setVersion(index, value);
        return this;
      }
      /**
       * <code>repeated int32 version = 1 [packed = true];</code>
       */
      public Builder addVersion(int value) {
        copyOnWrite();
        instance.addVersion(value);
        return this;
      }
      /**
       * <code>repeated int32 version = 1 [packed = true];</code>
       */
      public Builder addAllVersion(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllVersion(values);
        return this;
      }
      /**
       * <code>repeated int32 version = 1 [packed = true];</code>
       */
      public Builder clearVersion() {
        copyOnWrite();
        instance.clearVersion();
        return this;
      }

      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
       */
      public java.util.List<java.lang.Long>
          getTimestampList() {
        return java.util.Collections.unmodifiableList(
            instance.getTimestampList());
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
       */
      public int getTimestampCount() {
        return instance.getTimestampCount();
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
       */
      public long getTimestamp(int index) {
        return instance.getTimestamp(index);
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
       */
      public Builder setTimestamp(
          int index, long value) {
        copyOnWrite();
        instance.setTimestamp(index, value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
       */
      public Builder addTimestamp(long value) {
        copyOnWrite();
        instance.addTimestamp(value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
       */
      public Builder addAllTimestamp(
          java.lang.Iterable<? extends java.lang.Long> values) {
        copyOnWrite();
        instance.addAllTimestamp(values);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 timestamp = 2 [packed = true];</code>
       */
      public Builder clearTimestamp() {
        copyOnWrite();
        instance.clearTimestamp();
        return this;
      }

      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 changeset = 3 [packed = true];</code>
       */
      public java.util.List<java.lang.Long>
          getChangesetList() {
        return java.util.Collections.unmodifiableList(
            instance.getChangesetList());
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 changeset = 3 [packed = true];</code>
       */
      public int getChangesetCount() {
        return instance.getChangesetCount();
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 changeset = 3 [packed = true];</code>
       */
      public long getChangeset(int index) {
        return instance.getChangeset(index);
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 changeset = 3 [packed = true];</code>
       */
      public Builder setChangeset(
          int index, long value) {
        copyOnWrite();
        instance.setChangeset(index, value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 changeset = 3 [packed = true];</code>
       */
      public Builder addChangeset(long value) {
        copyOnWrite();
        instance.addChangeset(value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 changeset = 3 [packed = true];</code>
       */
      public Builder addAllChangeset(
          java.lang.Iterable<? extends java.lang.Long> values) {
        copyOnWrite();
        instance.addAllChangeset(values);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 changeset = 3 [packed = true];</code>
       */
      public Builder clearChangeset() {
        copyOnWrite();
        instance.clearChangeset();
        return this;
      }

      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint32 uid = 4 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getUidList() {
        return java.util.Collections.unmodifiableList(
            instance.getUidList());
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint32 uid = 4 [packed = true];</code>
       */
      public int getUidCount() {
        return instance.getUidCount();
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint32 uid = 4 [packed = true];</code>
       */
      public int getUid(int index) {
        return instance.getUid(index);
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint32 uid = 4 [packed = true];</code>
       */
      public Builder setUid(
          int index, int value) {
        copyOnWrite();
        instance.setUid(index, value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint32 uid = 4 [packed = true];</code>
       */
      public Builder addUid(int value) {
        copyOnWrite();
        instance.addUid(value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint32 uid = 4 [packed = true];</code>
       */
      public Builder addAllUid(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllUid(values);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint32 uid = 4 [packed = true];</code>
       */
      public Builder clearUid() {
        copyOnWrite();
        instance.clearUid();
        return this;
      }

      /**
       * <pre>
       * String IDs for usernames. DELTA coded
       * </pre>
       *
       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getUserSidList() {
        return java.util.Collections.unmodifiableList(
            instance.getUserSidList());
      }
      /**
       * <pre>
       * String IDs for usernames. DELTA coded
       * </pre>
       *
       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
       */
      public int getUserSidCount() {
        return instance.getUserSidCount();
      }
      /**
       * <pre>
       * String IDs for usernames. DELTA coded
       * </pre>
       *
       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
       */
      public int getUserSid(int index) {
        return instance.getUserSid(index);
      }
      /**
       * <pre>
       * String IDs for usernames. DELTA coded
       * </pre>
       *
       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
       */
      public Builder setUserSid(
          int index, int value) {
        copyOnWrite();
        instance.setUserSid(index, value);
        return this;
      }
      /**
       * <pre>
       * String IDs for usernames. DELTA coded
       * </pre>
       *
       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
       */
      public Builder addUserSid(int value) {
        copyOnWrite();
        instance.addUserSid(value);
        return this;
      }
      /**
       * <pre>
       * String IDs for usernames. DELTA coded
       * </pre>
       *
       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
       */
      public Builder addAllUserSid(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllUserSid(values);
        return this;
      }
      /**
       * <pre>
       * String IDs for usernames. DELTA coded
       * </pre>
       *
       * <code>repeated sint32 user_sid = 5 [packed = true];</code>
       */
      public Builder clearUserSid() {
        copyOnWrite();
        instance.clearUserSid();
        return this;
      }

      /**
       * <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>
       *
       * <code>repeated bool visible = 6 [packed = true];</code>
       */
      public java.util.List<java.lang.Boolean>
          getVisibleList() {
        return java.util.Collections.unmodifiableList(
            instance.getVisibleList());
      }
      /**
       * <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>
       *
       * <code>repeated bool visible = 6 [packed = true];</code>
       */
      public int getVisibleCount() {
        return instance.getVisibleCount();
      }
      /**
       * <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>
       *
       * <code>repeated bool visible = 6 [packed = true];</code>
       */
      public boolean getVisible(int index) {
        return instance.getVisible(index);
      }
      /**
       * <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>
       *
       * <code>repeated bool visible = 6 [packed = true];</code>
       */
      public Builder setVisible(
          int index, boolean value) {
        copyOnWrite();
        instance.setVisible(index, value);
        return this;
      }
      /**
       * <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>
       *
       * <code>repeated bool visible = 6 [packed = true];</code>
       */
      public Builder addVisible(boolean value) {
        copyOnWrite();
        instance.addVisible(value);
        return this;
      }
      /**
       * <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>
       *
       * <code>repeated bool visible = 6 [packed = true];</code>
       */
      public Builder addAllVisible(
          java.lang.Iterable<? extends java.lang.Boolean> values) {
        copyOnWrite();
        instance.addAllVisible(values);
        return this;
      }
      /**
       * <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>
       *
       * <code>repeated bool visible = 6 [packed = true];</code>
       */
      public Builder clearVisible() {
        copyOnWrite();
        instance.clearVisible();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.DenseInfo)
    }
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.DenseInfo();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          version_.makeImmutable();
          timestamp_.makeImmutable();
          changeset_.makeImmutable();
          uid_.makeImmutable();
          userSid_.makeImmutable();
          visible_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.DenseInfo other = (crosby.binary.Osmformat.DenseInfo) arg1;
          version_= visitor.visitIntList(version_, other.version_);
          timestamp_= visitor.visitLongList(timestamp_, other.timestamp_);
          changeset_= visitor.visitLongList(changeset_, other.changeset_);
          uid_= visitor.visitIntList(uid_, other.uid_);
          userSid_= visitor.visitIntList(userSid_, other.userSid_);
          visible_= visitor.visitBooleanList(visible_, other.visible_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 8: {
                  if (!version_.isModifiable()) {
                    version_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(version_);
                  }
                  version_.addInt(input.readInt32());
                  break;
                }
                case 10: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!version_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    version_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(version_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    version_.addInt(input.readInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 16: {
                  if (!timestamp_.isModifiable()) {
                    timestamp_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(timestamp_);
                  }
                  timestamp_.addLong(input.readSInt64());
                  break;
                }
                case 18: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!timestamp_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    timestamp_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(timestamp_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    timestamp_.addLong(input.readSInt64());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 24: {
                  if (!changeset_.isModifiable()) {
                    changeset_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(changeset_);
                  }
                  changeset_.addLong(input.readSInt64());
                  break;
                }
                case 26: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!changeset_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    changeset_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(changeset_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    changeset_.addLong(input.readSInt64());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 32: {
                  if (!uid_.isModifiable()) {
                    uid_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(uid_);
                  }
                  uid_.addInt(input.readSInt32());
                  break;
                }
                case 34: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!uid_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    uid_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(uid_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    uid_.addInt(input.readSInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 40: {
                  if (!userSid_.isModifiable()) {
                    userSid_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(userSid_);
                  }
                  userSid_.addInt(input.readSInt32());
                  break;
                }
                case 42: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!userSid_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    userSid_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(userSid_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    userSid_.addInt(input.readSInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 48: {
                  if (!visible_.isModifiable()) {
                    visible_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(visible_);
                  }
                  visible_.addBoolean(input.readBool());
                  break;
                }
                case 50: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!visible_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    final int currentSize = visible_.size();
                    visible_ = visible_.mutableCopyWithCapacity(
                        currentSize + (length/1));
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    visible_.addBoolean(input.readBool());
                  }
                  input.popLimit(limit);
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.DenseInfo.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.DenseInfo)
    private static final crosby.binary.Osmformat.DenseInfo DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new DenseInfo();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.DenseInfo getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<DenseInfo> PARSER;

    public static com.google.protobuf.Parser<DenseInfo> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface ChangeSetOrBuilder extends
      // @@protoc_insertion_point(interface_extends:OSMPBF.ChangeSet)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <pre>
     *   
     *   // Parallel arrays.
     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
     *   optional Info info = 4;
     * </pre>
     *
     * <code>required int64 id = 1;</code>
     */
    boolean hasId();
    /**
     * <pre>
     *   
     *   // Parallel arrays.
     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
     *   optional Info info = 4;
     * </pre>
     *
     * <code>required int64 id = 1;</code>
     */
    long getId();
  }
  /**
   * <pre>
   * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
   * TODO:    REMOVE THIS?
   * </pre>
   *
   * Protobuf type {@code OSMPBF.ChangeSet}
   */
  public  static final class ChangeSet extends
      com.google.protobuf.GeneratedMessageLite<
          ChangeSet, ChangeSet.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.ChangeSet)
      ChangeSetOrBuilder {
    private ChangeSet() {
    }
    private int bitField0_;
    public static final int ID_FIELD_NUMBER = 1;
    private long id_;
    /**
     * <pre>
     *   
     *   // Parallel arrays.
     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
     *   optional Info info = 4;
     * </pre>
     *
     * <code>required int64 id = 1;</code>
     */
    public boolean hasId() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <pre>
     *   
     *   // Parallel arrays.
     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
     *   optional Info info = 4;
     * </pre>
     *
     * <code>required int64 id = 1;</code>
     */
    public long getId() {
      return id_;
    }
    /**
     * <pre>
     *   
     *   // Parallel arrays.
     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
     *   optional Info info = 4;
     * </pre>
     *
     * <code>required int64 id = 1;</code>
     */
    private void setId(long value) {
      bitField0_ |= 0x00000001;
      id_ = value;
    }
    /**
     * <pre>
     *   
     *   // Parallel arrays.
     *   repeated uint32 keys = 2 [packed = true]; // String IDs.
     *   repeated uint32 vals = 3 [packed = true]; // String IDs.
     *   optional Info info = 4;
     * </pre>
     *
     * <code>required int64 id = 1;</code>
     */
    private void clearId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      id_ = 0L;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeInt64(1, id_);
      }
      unknownFields.writeTo(output);
    }

    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.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.ChangeSet parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.ChangeSet parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.ChangeSet parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.ChangeSet parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.ChangeSet parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.ChangeSet parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.ChangeSet parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.ChangeSet parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.ChangeSet parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.ChangeSet parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.ChangeSet parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.ChangeSet parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.ChangeSet prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * <pre>
     * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
     * TODO:    REMOVE THIS?
     * </pre>
     *
     * Protobuf type {@code OSMPBF.ChangeSet}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.ChangeSet, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.ChangeSet)
        crosby.binary.Osmformat.ChangeSetOrBuilder {
      // Construct using crosby.binary.Osmformat.ChangeSet.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <pre>
       *   
       *   // Parallel arrays.
       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
       *   optional Info info = 4;
       * </pre>
       *
       * <code>required int64 id = 1;</code>
       */
      public boolean hasId() {
        return instance.hasId();
      }
      /**
       * <pre>
       *   
       *   // Parallel arrays.
       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
       *   optional Info info = 4;
       * </pre>
       *
       * <code>required int64 id = 1;</code>
       */
      public long getId() {
        return instance.getId();
      }
      /**
       * <pre>
       *   
       *   // Parallel arrays.
       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
       *   optional Info info = 4;
       * </pre>
       *
       * <code>required int64 id = 1;</code>
       */
      public Builder setId(long value) {
        copyOnWrite();
        instance.setId(value);
        return this;
      }
      /**
       * <pre>
       *   
       *   // Parallel arrays.
       *   repeated uint32 keys = 2 [packed = true]; // String IDs.
       *   repeated uint32 vals = 3 [packed = true]; // String IDs.
       *   optional Info info = 4;
       * </pre>
       *
       * <code>required int64 id = 1;</code>
       */
      public Builder clearId() {
        copyOnWrite();
        instance.clearId();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.ChangeSet)
    }
    private byte memoizedIsInitialized = -1;
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.ChangeSet();
        }
        case IS_INITIALIZED: {
          byte isInitialized = memoizedIsInitialized;
          if (isInitialized == 1) return DEFAULT_INSTANCE;
          if (isInitialized == 0) return null;

          boolean shouldMemoize = ((Boolean) arg0).booleanValue();
          if (!hasId()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (shouldMemoize) memoizedIsInitialized = 1;
          return DEFAULT_INSTANCE;

        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.ChangeSet other = (crosby.binary.Osmformat.ChangeSet) arg1;
          id_ = visitor.visitLong(
              hasId(), id_,
              other.hasId(), other.id_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 8: {
                  bitField0_ |= 0x00000001;
                  id_ = input.readInt64();
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.ChangeSet.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.ChangeSet)
    private static final crosby.binary.Osmformat.ChangeSet DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new ChangeSet();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.ChangeSet getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<ChangeSet> PARSER;

    public static com.google.protobuf.Parser<ChangeSet> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  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();

    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    java.util.List<java.lang.Integer> getKeysList();
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    int getKeysCount();
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    int getKeys(int index);

    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    java.util.List<java.lang.Integer> getValsList();
    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    int getValsCount();
    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    int getVals(int index);

    /**
     * <pre>
     * May be omitted in omitmeta
     * </pre>
     *
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    boolean hasInfo();
    /**
     * <pre>
     * May be omitted in omitmeta
     * </pre>
     *
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    crosby.binary.Osmformat.Info getInfo();

    /**
     * <code>required sint64 lat = 8;</code>
     */
    boolean hasLat();
    /**
     * <code>required sint64 lat = 8;</code>
     */
    long getLat();

    /**
     * <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<
          Node, Node.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.Node)
      NodeOrBuilder {
    private Node() {
      keys_ = emptyIntList();
      vals_ = emptyIntList();
    }
    private int bitField0_;
    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_;
    }
    /**
     * <code>required sint64 id = 1;</code>
     */
    private void setId(long value) {
      bitField0_ |= 0x00000001;
      id_ = value;
    }
    /**
     * <code>required sint64 id = 1;</code>
     */
    private void clearId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      id_ = 0L;
    }

    public static final int KEYS_FIELD_NUMBER = 2;
    private com.google.protobuf.Internal.IntList keys_;
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    public java.util.List<java.lang.Integer>
        getKeysList() {
      return keys_;
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    public int getKeysCount() {
      return keys_.size();
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    public int getKeys(int index) {
      return keys_.getInt(index);
    }
    private int keysMemoizedSerializedSize = -1;
    private void ensureKeysIsMutable() {
      if (!keys_.isModifiable()) {
        keys_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(keys_);
       }
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void setKeys(
        int index, int value) {
      ensureKeysIsMutable();
      keys_.setInt(index, value);
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void addKeys(int value) {
      ensureKeysIsMutable();
      keys_.addInt(value);
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void addAllKeys(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureKeysIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, keys_);
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void clearKeys() {
      keys_ = emptyIntList();
    }

    public static final int VALS_FIELD_NUMBER = 3;
    private com.google.protobuf.Internal.IntList vals_;
    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    public java.util.List<java.lang.Integer>
        getValsList() {
      return vals_;
    }
    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    public int getValsCount() {
      return vals_.size();
    }
    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    public int getVals(int index) {
      return vals_.getInt(index);
    }
    private int valsMemoizedSerializedSize = -1;
    private void ensureValsIsMutable() {
      if (!vals_.isModifiable()) {
        vals_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(vals_);
       }
    }
    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void setVals(
        int index, int value) {
      ensureValsIsMutable();
      vals_.setInt(index, value);
    }
    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void addVals(int value) {
      ensureValsIsMutable();
      vals_.addInt(value);
    }
    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void addAllVals(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureValsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, vals_);
    }
    /**
     * <pre>
     * String IDs.
     * </pre>
     *
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void clearVals() {
      vals_ = emptyIntList();
    }

    public static final int INFO_FIELD_NUMBER = 4;
    private crosby.binary.Osmformat.Info info_;
    /**
     * <pre>
     * May be omitted in omitmeta
     * </pre>
     *
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    public boolean hasInfo() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <pre>
     * May be omitted in omitmeta
     * </pre>
     *
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    public crosby.binary.Osmformat.Info getInfo() {
      return info_ == null ? crosby.binary.Osmformat.Info.getDefaultInstance() : info_;
    }
    /**
     * <pre>
     * May be omitted in omitmeta
     * </pre>
     *
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void setInfo(crosby.binary.Osmformat.Info value) {
      if (value == null) {
        throw new NullPointerException();
      }
      info_ = value;
      bitField0_ |= 0x00000002;
      }
    /**
     * <pre>
     * May be omitted in omitmeta
     * </pre>
     *
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void setInfo(
        crosby.binary.Osmformat.Info.Builder builderForValue) {
      info_ = builderForValue.build();
      bitField0_ |= 0x00000002;
    }
    /**
     * <pre>
     * May be omitted in omitmeta
     * </pre>
     *
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void mergeInfo(crosby.binary.Osmformat.Info value) {
      if (info_ != null &&
          info_ != crosby.binary.Osmformat.Info.getDefaultInstance()) {
        info_ =
          crosby.binary.Osmformat.Info.newBuilder(info_).mergeFrom(value).buildPartial();
      } else {
        info_ = value;
      }
      bitField0_ |= 0x00000002;
    }
    /**
     * <pre>
     * May be omitted in omitmeta
     * </pre>
     *
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void clearInfo() {  info_ = null;
      bitField0_ = (bitField0_ & ~0x00000002);
    }

    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_;
    }
    /**
     * <code>required sint64 lat = 8;</code>
     */
    private void setLat(long value) {
      bitField0_ |= 0x00000004;
      lat_ = value;
    }
    /**
     * <code>required sint64 lat = 8;</code>
     */
    private void clearLat() {
      bitField0_ = (bitField0_ & ~0x00000004);
      lat_ = 0L;
    }

    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_;
    }
    /**
     * <code>required sint64 lon = 9;</code>
     */
    private void setLon(long value) {
      bitField0_ |= 0x00000008;
      lon_ = value;
    }
    /**
     * <code>required sint64 lon = 9;</code>
     */
    private void clearLon() {
      bitField0_ = (bitField0_ & ~0x00000008);
      lon_ = 0L;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeSInt64(1, id_);
      }
      if (getKeysList().size() > 0) {
        output.writeUInt32NoTag(18);
        output.writeUInt32NoTag(keysMemoizedSerializedSize);
      }
      for (int i = 0; i < keys_.size(); i++) {
        output.writeUInt32NoTag(keys_.getInt(i));
      }
      if (getValsList().size() > 0) {
        output.writeUInt32NoTag(26);
        output.writeUInt32NoTag(valsMemoizedSerializedSize);
      }
      for (int i = 0; i < vals_.size(); i++) {
        output.writeUInt32NoTag(vals_.getInt(i));
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeMessage(4, getInfo());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeSInt64(8, lat_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeSInt64(9, lon_);
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSInt64Size(1, id_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < keys_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeUInt32SizeNoTag(keys_.getInt(i));
        }
        size += dataSize;
        if (!getKeysList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        keysMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < vals_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeUInt32SizeNoTag(vals_.getInt(i));
        }
        size += dataSize;
        if (!getValsList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        valsMemoizedSerializedSize = dataSize;
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getInfo());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSInt64Size(8, lat_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeSInt64Size(9, lon_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.Node parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Node parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Node parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Node parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Node parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Node parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Node parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Node parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Node parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Node parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Node parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Node parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.Node prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code OSMPBF.Node}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.Node, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.Node)
        crosby.binary.Osmformat.NodeOrBuilder {
      // Construct using crosby.binary.Osmformat.Node.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>required sint64 id = 1;</code>
       */
      public boolean hasId() {
        return instance.hasId();
      }
      /**
       * <code>required sint64 id = 1;</code>
       */
      public long getId() {
        return instance.getId();
      }
      /**
       * <code>required sint64 id = 1;</code>
       */
      public Builder setId(long value) {
        copyOnWrite();
        instance.setId(value);
        return this;
      }
      /**
       * <code>required sint64 id = 1;</code>
       */
      public Builder clearId() {
        copyOnWrite();
        instance.clearId();
        return this;
      }

      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getKeysList() {
        return java.util.Collections.unmodifiableList(
            instance.getKeysList());
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public int getKeysCount() {
        return instance.getKeysCount();
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public int getKeys(int index) {
        return instance.getKeys(index);
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder setKeys(
          int index, int value) {
        copyOnWrite();
        instance.setKeys(index, value);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder addKeys(int value) {
        copyOnWrite();
        instance.addKeys(value);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder addAllKeys(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllKeys(values);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder clearKeys() {
        copyOnWrite();
        instance.clearKeys();
        return this;
      }

      /**
       * <pre>
       * String IDs.
       * </pre>
       *
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getValsList() {
        return java.util.Collections.unmodifiableList(
            instance.getValsList());
      }
      /**
       * <pre>
       * String IDs.
       * </pre>
       *
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public int getValsCount() {
        return instance.getValsCount();
      }
      /**
       * <pre>
       * String IDs.
       * </pre>
       *
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public int getVals(int index) {
        return instance.getVals(index);
      }
      /**
       * <pre>
       * String IDs.
       * </pre>
       *
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder setVals(
          int index, int value) {
        copyOnWrite();
        instance.setVals(index, value);
        return this;
      }
      /**
       * <pre>
       * String IDs.
       * </pre>
       *
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder addVals(int value) {
        copyOnWrite();
        instance.addVals(value);
        return this;
      }
      /**
       * <pre>
       * String IDs.
       * </pre>
       *
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder addAllVals(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllVals(values);
        return this;
      }
      /**
       * <pre>
       * String IDs.
       * </pre>
       *
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder clearVals() {
        copyOnWrite();
        instance.clearVals();
        return this;
      }

      /**
       * <pre>
       * May be omitted in omitmeta
       * </pre>
       *
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public boolean hasInfo() {
        return instance.hasInfo();
      }
      /**
       * <pre>
       * May be omitted in omitmeta
       * </pre>
       *
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public crosby.binary.Osmformat.Info getInfo() {
        return instance.getInfo();
      }
      /**
       * <pre>
       * May be omitted in omitmeta
       * </pre>
       *
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder setInfo(crosby.binary.Osmformat.Info value) {
        copyOnWrite();
        instance.setInfo(value);
        return this;
        }
      /**
       * <pre>
       * May be omitted in omitmeta
       * </pre>
       *
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder setInfo(
          crosby.binary.Osmformat.Info.Builder builderForValue) {
        copyOnWrite();
        instance.setInfo(builderForValue);
        return this;
      }
      /**
       * <pre>
       * May be omitted in omitmeta
       * </pre>
       *
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder mergeInfo(crosby.binary.Osmformat.Info value) {
        copyOnWrite();
        instance.mergeInfo(value);
        return this;
      }
      /**
       * <pre>
       * May be omitted in omitmeta
       * </pre>
       *
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder clearInfo() {  copyOnWrite();
        instance.clearInfo();
        return this;
      }

      /**
       * <code>required sint64 lat = 8;</code>
       */
      public boolean hasLat() {
        return instance.hasLat();
      }
      /**
       * <code>required sint64 lat = 8;</code>
       */
      public long getLat() {
        return instance.getLat();
      }
      /**
       * <code>required sint64 lat = 8;</code>
       */
      public Builder setLat(long value) {
        copyOnWrite();
        instance.setLat(value);
        return this;
      }
      /**
       * <code>required sint64 lat = 8;</code>
       */
      public Builder clearLat() {
        copyOnWrite();
        instance.clearLat();
        return this;
      }

      /**
       * <code>required sint64 lon = 9;</code>
       */
      public boolean hasLon() {
        return instance.hasLon();
      }
      /**
       * <code>required sint64 lon = 9;</code>
       */
      public long getLon() {
        return instance.getLon();
      }
      /**
       * <code>required sint64 lon = 9;</code>
       */
      public Builder setLon(long value) {
        copyOnWrite();
        instance.setLon(value);
        return this;
      }
      /**
       * <code>required sint64 lon = 9;</code>
       */
      public Builder clearLon() {
        copyOnWrite();
        instance.clearLon();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.Node)
    }
    private byte memoizedIsInitialized = -1;
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.Node();
        }
        case IS_INITIALIZED: {
          byte isInitialized = memoizedIsInitialized;
          if (isInitialized == 1) return DEFAULT_INSTANCE;
          if (isInitialized == 0) return null;

          boolean shouldMemoize = ((Boolean) arg0).booleanValue();
          if (!hasId()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (!hasLat()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (!hasLon()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (shouldMemoize) memoizedIsInitialized = 1;
          return DEFAULT_INSTANCE;

        }
        case MAKE_IMMUTABLE: {
          keys_.makeImmutable();
          vals_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.Node other = (crosby.binary.Osmformat.Node) arg1;
          id_ = visitor.visitLong(
              hasId(), id_,
              other.hasId(), other.id_);
          keys_= visitor.visitIntList(keys_, other.keys_);
          vals_= visitor.visitIntList(vals_, other.vals_);
          info_ = visitor.visitMessage(info_, other.info_);
          lat_ = visitor.visitLong(
              hasLat(), lat_,
              other.hasLat(), other.lat_);
          lon_ = visitor.visitLong(
              hasLon(), lon_,
              other.hasLon(), other.lon_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 8: {
                  bitField0_ |= 0x00000001;
                  id_ = input.readSInt64();
                  break;
                }
                case 16: {
                  if (!keys_.isModifiable()) {
                    keys_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(keys_);
                  }
                  keys_.addInt(input.readUInt32());
                  break;
                }
                case 18: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!keys_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    keys_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(keys_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    keys_.addInt(input.readUInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 24: {
                  if (!vals_.isModifiable()) {
                    vals_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(vals_);
                  }
                  vals_.addInt(input.readUInt32());
                  break;
                }
                case 26: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!vals_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    vals_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(vals_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    vals_.addInt(input.readUInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 34: {
                  crosby.binary.Osmformat.Info.Builder subBuilder = null;
                  if (((bitField0_ & 0x00000002) == 0x00000002)) {
                    subBuilder = info_.toBuilder();
                  }
                  info_ = input.readMessage(crosby.binary.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 new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.Node.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.Node)
    private static final crosby.binary.Osmformat.Node DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new Node();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.Node getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Node> PARSER;

    public static com.google.protobuf.Parser<Node> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  public interface DenseNodesOrBuilder extends
      // @@protoc_insertion_point(interface_extends:OSMPBF.DenseNodes)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    java.util.List<java.lang.Long> getIdList();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    int getIdCount();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    long getId(int index);

    /**
     * <pre>
     *repeated Info info = 4;
     * </pre>
     *
     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
     */
    boolean hasDenseinfo();
    /**
     * <pre>
     *repeated Info info = 4;
     * </pre>
     *
     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
     */
    crosby.binary.Osmformat.DenseInfo getDenseinfo();

    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    java.util.List<java.lang.Long> getLatList();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    int getLatCount();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    long getLat(int index);

    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    java.util.List<java.lang.Long> getLonList();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    int getLonCount();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    long getLon(int index);

    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    java.util.List<java.lang.Integer> getKeysValsList();
    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    int getKeysValsCount();
    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    int getKeysVals(int index);
  }
  /**
   * Protobuf type {@code OSMPBF.DenseNodes}
   */
  public  static final class DenseNodes extends
      com.google.protobuf.GeneratedMessageLite<
          DenseNodes, DenseNodes.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.DenseNodes)
      DenseNodesOrBuilder {
    private DenseNodes() {
      id_ = emptyLongList();
      lat_ = emptyLongList();
      lon_ = emptyLongList();
      keysVals_ = emptyIntList();
    }
    private int bitField0_;
    public static final int ID_FIELD_NUMBER = 1;
    private com.google.protobuf.Internal.LongList id_;
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    public java.util.List<java.lang.Long>
        getIdList() {
      return id_;
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    public int getIdCount() {
      return id_.size();
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    public long getId(int index) {
      return id_.getLong(index);
    }
    private int idMemoizedSerializedSize = -1;
    private void ensureIdIsMutable() {
      if (!id_.isModifiable()) {
        id_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(id_);
       }
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    private void setId(
        int index, long value) {
      ensureIdIsMutable();
      id_.setLong(index, value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    private void addId(long value) {
      ensureIdIsMutable();
      id_.addLong(value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    private void addAllId(
        java.lang.Iterable<? extends java.lang.Long> values) {
      ensureIdIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, id_);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 id = 1 [packed = true];</code>
     */
    private void clearId() {
      id_ = emptyLongList();
    }

    public static final int DENSEINFO_FIELD_NUMBER = 5;
    private crosby.binary.Osmformat.DenseInfo denseinfo_;
    /**
     * <pre>
     *repeated Info info = 4;
     * </pre>
     *
     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
     */
    public boolean hasDenseinfo() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <pre>
     *repeated Info info = 4;
     * </pre>
     *
     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
     */
    public crosby.binary.Osmformat.DenseInfo getDenseinfo() {
      return denseinfo_ == null ? crosby.binary.Osmformat.DenseInfo.getDefaultInstance() : denseinfo_;
    }
    /**
     * <pre>
     *repeated Info info = 4;
     * </pre>
     *
     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
     */
    private void setDenseinfo(crosby.binary.Osmformat.DenseInfo value) {
      if (value == null) {
        throw new NullPointerException();
      }
      denseinfo_ = value;
      bitField0_ |= 0x00000001;
      }
    /**
     * <pre>
     *repeated Info info = 4;
     * </pre>
     *
     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
     */
    private void setDenseinfo(
        crosby.binary.Osmformat.DenseInfo.Builder builderForValue) {
      denseinfo_ = builderForValue.build();
      bitField0_ |= 0x00000001;
    }
    /**
     * <pre>
     *repeated Info info = 4;
     * </pre>
     *
     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
     */
    private void mergeDenseinfo(crosby.binary.Osmformat.DenseInfo value) {
      if (denseinfo_ != null &&
          denseinfo_ != crosby.binary.Osmformat.DenseInfo.getDefaultInstance()) {
        denseinfo_ =
          crosby.binary.Osmformat.DenseInfo.newBuilder(denseinfo_).mergeFrom(value).buildPartial();
      } else {
        denseinfo_ = value;
      }
      bitField0_ |= 0x00000001;
    }
    /**
     * <pre>
     *repeated Info info = 4;
     * </pre>
     *
     * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
     */
    private void clearDenseinfo() {  denseinfo_ = null;
      bitField0_ = (bitField0_ & ~0x00000001);
    }

    public static final int LAT_FIELD_NUMBER = 8;
    private com.google.protobuf.Internal.LongList lat_;
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    public java.util.List<java.lang.Long>
        getLatList() {
      return lat_;
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    public int getLatCount() {
      return lat_.size();
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    public long getLat(int index) {
      return lat_.getLong(index);
    }
    private int latMemoizedSerializedSize = -1;
    private void ensureLatIsMutable() {
      if (!lat_.isModifiable()) {
        lat_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(lat_);
       }
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    private void setLat(
        int index, long value) {
      ensureLatIsMutable();
      lat_.setLong(index, value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    private void addLat(long value) {
      ensureLatIsMutable();
      lat_.addLong(value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    private void addAllLat(
        java.lang.Iterable<? extends java.lang.Long> values) {
      ensureLatIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, lat_);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lat = 8 [packed = true];</code>
     */
    private void clearLat() {
      lat_ = emptyLongList();
    }

    public static final int LON_FIELD_NUMBER = 9;
    private com.google.protobuf.Internal.LongList lon_;
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    public java.util.List<java.lang.Long>
        getLonList() {
      return lon_;
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    public int getLonCount() {
      return lon_.size();
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    public long getLon(int index) {
      return lon_.getLong(index);
    }
    private int lonMemoizedSerializedSize = -1;
    private void ensureLonIsMutable() {
      if (!lon_.isModifiable()) {
        lon_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(lon_);
       }
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    private void setLon(
        int index, long value) {
      ensureLonIsMutable();
      lon_.setLong(index, value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    private void addLon(long value) {
      ensureLonIsMutable();
      lon_.addLong(value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    private void addAllLon(
        java.lang.Iterable<? extends java.lang.Long> values) {
      ensureLonIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, lon_);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 lon = 9 [packed = true];</code>
     */
    private void clearLon() {
      lon_ = emptyLongList();
    }

    public static final int KEYS_VALS_FIELD_NUMBER = 10;
    private com.google.protobuf.Internal.IntList keysVals_;
    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    public java.util.List<java.lang.Integer>
        getKeysValsList() {
      return keysVals_;
    }
    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    public int getKeysValsCount() {
      return keysVals_.size();
    }
    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    public int getKeysVals(int index) {
      return keysVals_.getInt(index);
    }
    private int keysValsMemoizedSerializedSize = -1;
    private void ensureKeysValsIsMutable() {
      if (!keysVals_.isModifiable()) {
        keysVals_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(keysVals_);
       }
    }
    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    private void setKeysVals(
        int index, int value) {
      ensureKeysValsIsMutable();
      keysVals_.setInt(index, value);
    }
    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    private void addKeysVals(int value) {
      ensureKeysValsIsMutable();
      keysVals_.addInt(value);
    }
    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    private void addAllKeysVals(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureKeysValsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, keysVals_);
    }
    /**
     * <pre>
     * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
     * </pre>
     *
     * <code>repeated int32 keys_vals = 10 [packed = true];</code>
     */
    private void clearKeysVals() {
      keysVals_ = emptyIntList();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (getIdList().size() > 0) {
        output.writeUInt32NoTag(10);
        output.writeUInt32NoTag(idMemoizedSerializedSize);
      }
      for (int i = 0; i < id_.size(); i++) {
        output.writeSInt64NoTag(id_.getLong(i));
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(5, getDenseinfo());
      }
      if (getLatList().size() > 0) {
        output.writeUInt32NoTag(66);
        output.writeUInt32NoTag(latMemoizedSerializedSize);
      }
      for (int i = 0; i < lat_.size(); i++) {
        output.writeSInt64NoTag(lat_.getLong(i));
      }
      if (getLonList().size() > 0) {
        output.writeUInt32NoTag(74);
        output.writeUInt32NoTag(lonMemoizedSerializedSize);
      }
      for (int i = 0; i < lon_.size(); i++) {
        output.writeSInt64NoTag(lon_.getLong(i));
      }
      if (getKeysValsList().size() > 0) {
        output.writeUInt32NoTag(82);
        output.writeUInt32NoTag(keysValsMemoizedSerializedSize);
      }
      for (int i = 0; i < keysVals_.size(); i++) {
        output.writeInt32NoTag(keysVals_.getInt(i));
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      {
        int dataSize = 0;
        for (int i = 0; i < id_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeSInt64SizeNoTag(id_.getLong(i));
        }
        size += dataSize;
        if (!getIdList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        idMemoizedSerializedSize = dataSize;
      }
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, getDenseinfo());
      }
      {
        int dataSize = 0;
        for (int i = 0; i < lat_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeSInt64SizeNoTag(lat_.getLong(i));
        }
        size += dataSize;
        if (!getLatList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        latMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < lon_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeSInt64SizeNoTag(lon_.getLong(i));
        }
        size += dataSize;
        if (!getLonList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        lonMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < keysVals_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(keysVals_.getInt(i));
        }
        size += dataSize;
        if (!getKeysValsList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        keysValsMemoizedSerializedSize = dataSize;
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.DenseNodes parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.DenseNodes parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseNodes parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.DenseNodes parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseNodes parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.DenseNodes parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseNodes parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.DenseNodes parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseNodes parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.DenseNodes parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.DenseNodes parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.DenseNodes parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.DenseNodes prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code OSMPBF.DenseNodes}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.DenseNodes, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.DenseNodes)
        crosby.binary.Osmformat.DenseNodesOrBuilder {
      // Construct using crosby.binary.Osmformat.DenseNodes.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 id = 1 [packed = true];</code>
       */
      public java.util.List<java.lang.Long>
          getIdList() {
        return java.util.Collections.unmodifiableList(
            instance.getIdList());
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 id = 1 [packed = true];</code>
       */
      public int getIdCount() {
        return instance.getIdCount();
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 id = 1 [packed = true];</code>
       */
      public long getId(int index) {
        return instance.getId(index);
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 id = 1 [packed = true];</code>
       */
      public Builder setId(
          int index, long value) {
        copyOnWrite();
        instance.setId(index, value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 id = 1 [packed = true];</code>
       */
      public Builder addId(long value) {
        copyOnWrite();
        instance.addId(value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 id = 1 [packed = true];</code>
       */
      public Builder addAllId(
          java.lang.Iterable<? extends java.lang.Long> values) {
        copyOnWrite();
        instance.addAllId(values);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 id = 1 [packed = true];</code>
       */
      public Builder clearId() {
        copyOnWrite();
        instance.clearId();
        return this;
      }

      /**
       * <pre>
       *repeated Info info = 4;
       * </pre>
       *
       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
       */
      public boolean hasDenseinfo() {
        return instance.hasDenseinfo();
      }
      /**
       * <pre>
       *repeated Info info = 4;
       * </pre>
       *
       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
       */
      public crosby.binary.Osmformat.DenseInfo getDenseinfo() {
        return instance.getDenseinfo();
      }
      /**
       * <pre>
       *repeated Info info = 4;
       * </pre>
       *
       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
       */
      public Builder setDenseinfo(crosby.binary.Osmformat.DenseInfo value) {
        copyOnWrite();
        instance.setDenseinfo(value);
        return this;
        }
      /**
       * <pre>
       *repeated Info info = 4;
       * </pre>
       *
       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
       */
      public Builder setDenseinfo(
          crosby.binary.Osmformat.DenseInfo.Builder builderForValue) {
        copyOnWrite();
        instance.setDenseinfo(builderForValue);
        return this;
      }
      /**
       * <pre>
       *repeated Info info = 4;
       * </pre>
       *
       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
       */
      public Builder mergeDenseinfo(crosby.binary.Osmformat.DenseInfo value) {
        copyOnWrite();
        instance.mergeDenseinfo(value);
        return this;
      }
      /**
       * <pre>
       *repeated Info info = 4;
       * </pre>
       *
       * <code>optional .OSMPBF.DenseInfo denseinfo = 5;</code>
       */
      public Builder clearDenseinfo() {  copyOnWrite();
        instance.clearDenseinfo();
        return this;
      }

      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lat = 8 [packed = true];</code>
       */
      public java.util.List<java.lang.Long>
          getLatList() {
        return java.util.Collections.unmodifiableList(
            instance.getLatList());
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lat = 8 [packed = true];</code>
       */
      public int getLatCount() {
        return instance.getLatCount();
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lat = 8 [packed = true];</code>
       */
      public long getLat(int index) {
        return instance.getLat(index);
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lat = 8 [packed = true];</code>
       */
      public Builder setLat(
          int index, long value) {
        copyOnWrite();
        instance.setLat(index, value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lat = 8 [packed = true];</code>
       */
      public Builder addLat(long value) {
        copyOnWrite();
        instance.addLat(value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lat = 8 [packed = true];</code>
       */
      public Builder addAllLat(
          java.lang.Iterable<? extends java.lang.Long> values) {
        copyOnWrite();
        instance.addAllLat(values);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lat = 8 [packed = true];</code>
       */
      public Builder clearLat() {
        copyOnWrite();
        instance.clearLat();
        return this;
      }

      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lon = 9 [packed = true];</code>
       */
      public java.util.List<java.lang.Long>
          getLonList() {
        return java.util.Collections.unmodifiableList(
            instance.getLonList());
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lon = 9 [packed = true];</code>
       */
      public int getLonCount() {
        return instance.getLonCount();
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lon = 9 [packed = true];</code>
       */
      public long getLon(int index) {
        return instance.getLon(index);
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lon = 9 [packed = true];</code>
       */
      public Builder setLon(
          int index, long value) {
        copyOnWrite();
        instance.setLon(index, value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lon = 9 [packed = true];</code>
       */
      public Builder addLon(long value) {
        copyOnWrite();
        instance.addLon(value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lon = 9 [packed = true];</code>
       */
      public Builder addAllLon(
          java.lang.Iterable<? extends java.lang.Long> values) {
        copyOnWrite();
        instance.addAllLon(values);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 lon = 9 [packed = true];</code>
       */
      public Builder clearLon() {
        copyOnWrite();
        instance.clearLon();
        return this;
      }

      /**
       * <pre>
       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
       * </pre>
       *
       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getKeysValsList() {
        return java.util.Collections.unmodifiableList(
            instance.getKeysValsList());
      }
      /**
       * <pre>
       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
       * </pre>
       *
       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
       */
      public int getKeysValsCount() {
        return instance.getKeysValsCount();
      }
      /**
       * <pre>
       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
       * </pre>
       *
       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
       */
      public int getKeysVals(int index) {
        return instance.getKeysVals(index);
      }
      /**
       * <pre>
       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
       * </pre>
       *
       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
       */
      public Builder setKeysVals(
          int index, int value) {
        copyOnWrite();
        instance.setKeysVals(index, value);
        return this;
      }
      /**
       * <pre>
       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
       * </pre>
       *
       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
       */
      public Builder addKeysVals(int value) {
        copyOnWrite();
        instance.addKeysVals(value);
        return this;
      }
      /**
       * <pre>
       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
       * </pre>
       *
       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
       */
      public Builder addAllKeysVals(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllKeysVals(values);
        return this;
      }
      /**
       * <pre>
       * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
       * </pre>
       *
       * <code>repeated int32 keys_vals = 10 [packed = true];</code>
       */
      public Builder clearKeysVals() {
        copyOnWrite();
        instance.clearKeysVals();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.DenseNodes)
    }
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.DenseNodes();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          id_.makeImmutable();
          lat_.makeImmutable();
          lon_.makeImmutable();
          keysVals_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.DenseNodes other = (crosby.binary.Osmformat.DenseNodes) arg1;
          id_= visitor.visitLongList(id_, other.id_);
          denseinfo_ = visitor.visitMessage(denseinfo_, other.denseinfo_);
          lat_= visitor.visitLongList(lat_, other.lat_);
          lon_= visitor.visitLongList(lon_, other.lon_);
          keysVals_= visitor.visitIntList(keysVals_, other.keysVals_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 8: {
                  if (!id_.isModifiable()) {
                    id_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(id_);
                  }
                  id_.addLong(input.readSInt64());
                  break;
                }
                case 10: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!id_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    id_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(id_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    id_.addLong(input.readSInt64());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 42: {
                  crosby.binary.Osmformat.DenseInfo.Builder subBuilder = null;
                  if (((bitField0_ & 0x00000001) == 0x00000001)) {
                    subBuilder = denseinfo_.toBuilder();
                  }
                  denseinfo_ = input.readMessage(crosby.binary.Osmformat.DenseInfo.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(denseinfo_);
                    denseinfo_ = subBuilder.buildPartial();
                  }
                  bitField0_ |= 0x00000001;
                  break;
                }
                case 64: {
                  if (!lat_.isModifiable()) {
                    lat_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(lat_);
                  }
                  lat_.addLong(input.readSInt64());
                  break;
                }
                case 66: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!lat_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    lat_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(lat_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    lat_.addLong(input.readSInt64());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 72: {
                  if (!lon_.isModifiable()) {
                    lon_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(lon_);
                  }
                  lon_.addLong(input.readSInt64());
                  break;
                }
                case 74: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!lon_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    lon_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(lon_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    lon_.addLong(input.readSInt64());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 80: {
                  if (!keysVals_.isModifiable()) {
                    keysVals_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(keysVals_);
                  }
                  keysVals_.addInt(input.readInt32());
                  break;
                }
                case 82: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!keysVals_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    keysVals_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(keysVals_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    keysVals_.addInt(input.readInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.DenseNodes.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.DenseNodes)
    private static final crosby.binary.Osmformat.DenseNodes DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new DenseNodes();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.DenseNodes getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<DenseNodes> PARSER;

    public static com.google.protobuf.Parser<DenseNodes> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  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();

    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    java.util.List<java.lang.Integer> getKeysList();
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    int getKeysCount();
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    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>
     */
    crosby.binary.Osmformat.Info getInfo();

    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    java.util.List<java.lang.Long> getRefsList();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    int getRefsCount();
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    long getRefs(int index);
  }
  /**
   * Protobuf type {@code OSMPBF.Way}
   */
  public  static final class Way extends
      com.google.protobuf.GeneratedMessageLite<
          Way, Way.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.Way)
      WayOrBuilder {
    private Way() {
      keys_ = emptyIntList();
      vals_ = emptyIntList();
      refs_ = emptyLongList();
    }
    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_;
    }
    /**
     * <code>required int64 id = 1;</code>
     */
    private void setId(long value) {
      bitField0_ |= 0x00000001;
      id_ = value;
    }
    /**
     * <code>required int64 id = 1;</code>
     */
    private void clearId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      id_ = 0L;
    }

    public static final int KEYS_FIELD_NUMBER = 2;
    private com.google.protobuf.Internal.IntList keys_;
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    public java.util.List<java.lang.Integer>
        getKeysList() {
      return keys_;
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    public int getKeysCount() {
      return keys_.size();
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    public int getKeys(int index) {
      return keys_.getInt(index);
    }
    private int keysMemoizedSerializedSize = -1;
    private void ensureKeysIsMutable() {
      if (!keys_.isModifiable()) {
        keys_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(keys_);
       }
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void setKeys(
        int index, int value) {
      ensureKeysIsMutable();
      keys_.setInt(index, value);
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void addKeys(int value) {
      ensureKeysIsMutable();
      keys_.addInt(value);
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void addAllKeys(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureKeysIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, keys_);
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void clearKeys() {
      keys_ = emptyIntList();
    }

    public static final int VALS_FIELD_NUMBER = 3;
    private com.google.protobuf.Internal.IntList 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_.getInt(index);
    }
    private int valsMemoizedSerializedSize = -1;
    private void ensureValsIsMutable() {
      if (!vals_.isModifiable()) {
        vals_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(vals_);
       }
    }
    /**
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void setVals(
        int index, int value) {
      ensureValsIsMutable();
      vals_.setInt(index, value);
    }
    /**
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void addVals(int value) {
      ensureValsIsMutable();
      vals_.addInt(value);
    }
    /**
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void addAllVals(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureValsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, vals_);
    }
    /**
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void clearVals() {
      vals_ = emptyIntList();
    }

    public static final int INFO_FIELD_NUMBER = 4;
    private crosby.binary.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 crosby.binary.Osmformat.Info getInfo() {
      return info_ == null ? crosby.binary.Osmformat.Info.getDefaultInstance() : info_;
    }
    /**
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void setInfo(crosby.binary.Osmformat.Info value) {
      if (value == null) {
        throw new NullPointerException();
      }
      info_ = value;
      bitField0_ |= 0x00000002;
      }
    /**
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void setInfo(
        crosby.binary.Osmformat.Info.Builder builderForValue) {
      info_ = builderForValue.build();
      bitField0_ |= 0x00000002;
    }
    /**
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void mergeInfo(crosby.binary.Osmformat.Info value) {
      if (info_ != null &&
          info_ != crosby.binary.Osmformat.Info.getDefaultInstance()) {
        info_ =
          crosby.binary.Osmformat.Info.newBuilder(info_).mergeFrom(value).buildPartial();
      } else {
        info_ = value;
      }
      bitField0_ |= 0x00000002;
    }
    /**
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void clearInfo() {  info_ = null;
      bitField0_ = (bitField0_ & ~0x00000002);
    }

    public static final int REFS_FIELD_NUMBER = 8;
    private com.google.protobuf.Internal.LongList refs_;
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    public java.util.List<java.lang.Long>
        getRefsList() {
      return refs_;
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    public int getRefsCount() {
      return refs_.size();
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    public long getRefs(int index) {
      return refs_.getLong(index);
    }
    private int refsMemoizedSerializedSize = -1;
    private void ensureRefsIsMutable() {
      if (!refs_.isModifiable()) {
        refs_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(refs_);
       }
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    private void setRefs(
        int index, long value) {
      ensureRefsIsMutable();
      refs_.setLong(index, value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    private void addRefs(long value) {
      ensureRefsIsMutable();
      refs_.addLong(value);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    private void addAllRefs(
        java.lang.Iterable<? extends java.lang.Long> values) {
      ensureRefsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, refs_);
    }
    /**
     * <pre>
     * DELTA coded
     * </pre>
     *
     * <code>repeated sint64 refs = 8 [packed = true];</code>
     */
    private void clearRefs() {
      refs_ = emptyLongList();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeInt64(1, id_);
      }
      if (getKeysList().size() > 0) {
        output.writeUInt32NoTag(18);
        output.writeUInt32NoTag(keysMemoizedSerializedSize);
      }
      for (int i = 0; i < keys_.size(); i++) {
        output.writeUInt32NoTag(keys_.getInt(i));
      }
      if (getValsList().size() > 0) {
        output.writeUInt32NoTag(26);
        output.writeUInt32NoTag(valsMemoizedSerializedSize);
      }
      for (int i = 0; i < vals_.size(); i++) {
        output.writeUInt32NoTag(vals_.getInt(i));
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeMessage(4, getInfo());
      }
      if (getRefsList().size() > 0) {
        output.writeUInt32NoTag(66);
        output.writeUInt32NoTag(refsMemoizedSerializedSize);
      }
      for (int i = 0; i < refs_.size(); i++) {
        output.writeSInt64NoTag(refs_.getLong(i));
      }
      unknownFields.writeTo(output);
    }

    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_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < keys_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeUInt32SizeNoTag(keys_.getInt(i));
        }
        size += dataSize;
        if (!getKeysList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        keysMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < vals_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeUInt32SizeNoTag(vals_.getInt(i));
        }
        size += dataSize;
        if (!getValsList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        valsMemoizedSerializedSize = dataSize;
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getInfo());
      }
      {
        int dataSize = 0;
        for (int i = 0; i < refs_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeSInt64SizeNoTag(refs_.getLong(i));
        }
        size += dataSize;
        if (!getRefsList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        refsMemoizedSerializedSize = dataSize;
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.Way parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Way parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Way parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Way parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Way parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Way parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Way parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Way parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Way parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Way parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Way parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Way parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.Way prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code OSMPBF.Way}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.Way, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.Way)
        crosby.binary.Osmformat.WayOrBuilder {
      // Construct using crosby.binary.Osmformat.Way.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>required int64 id = 1;</code>
       */
      public boolean hasId() {
        return instance.hasId();
      }
      /**
       * <code>required int64 id = 1;</code>
       */
      public long getId() {
        return instance.getId();
      }
      /**
       * <code>required int64 id = 1;</code>
       */
      public Builder setId(long value) {
        copyOnWrite();
        instance.setId(value);
        return this;
      }
      /**
       * <code>required int64 id = 1;</code>
       */
      public Builder clearId() {
        copyOnWrite();
        instance.clearId();
        return this;
      }

      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getKeysList() {
        return java.util.Collections.unmodifiableList(
            instance.getKeysList());
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public int getKeysCount() {
        return instance.getKeysCount();
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public int getKeys(int index) {
        return instance.getKeys(index);
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder setKeys(
          int index, int value) {
        copyOnWrite();
        instance.setKeys(index, value);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder addKeys(int value) {
        copyOnWrite();
        instance.addKeys(value);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder addAllKeys(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllKeys(values);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder clearKeys() {
        copyOnWrite();
        instance.clearKeys();
        return this;
      }

      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getValsList() {
        return java.util.Collections.unmodifiableList(
            instance.getValsList());
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public int getValsCount() {
        return instance.getValsCount();
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public int getVals(int index) {
        return instance.getVals(index);
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder setVals(
          int index, int value) {
        copyOnWrite();
        instance.setVals(index, value);
        return this;
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder addVals(int value) {
        copyOnWrite();
        instance.addVals(value);
        return this;
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder addAllVals(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllVals(values);
        return this;
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder clearVals() {
        copyOnWrite();
        instance.clearVals();
        return this;
      }

      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public boolean hasInfo() {
        return instance.hasInfo();
      }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public crosby.binary.Osmformat.Info getInfo() {
        return instance.getInfo();
      }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder setInfo(crosby.binary.Osmformat.Info value) {
        copyOnWrite();
        instance.setInfo(value);
        return this;
        }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder setInfo(
          crosby.binary.Osmformat.Info.Builder builderForValue) {
        copyOnWrite();
        instance.setInfo(builderForValue);
        return this;
      }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder mergeInfo(crosby.binary.Osmformat.Info value) {
        copyOnWrite();
        instance.mergeInfo(value);
        return this;
      }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder clearInfo() {  copyOnWrite();
        instance.clearInfo();
        return this;
      }

      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 refs = 8 [packed = true];</code>
       */
      public java.util.List<java.lang.Long>
          getRefsList() {
        return java.util.Collections.unmodifiableList(
            instance.getRefsList());
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 refs = 8 [packed = true];</code>
       */
      public int getRefsCount() {
        return instance.getRefsCount();
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 refs = 8 [packed = true];</code>
       */
      public long getRefs(int index) {
        return instance.getRefs(index);
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 refs = 8 [packed = true];</code>
       */
      public Builder setRefs(
          int index, long value) {
        copyOnWrite();
        instance.setRefs(index, value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 refs = 8 [packed = true];</code>
       */
      public Builder addRefs(long value) {
        copyOnWrite();
        instance.addRefs(value);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 refs = 8 [packed = true];</code>
       */
      public Builder addAllRefs(
          java.lang.Iterable<? extends java.lang.Long> values) {
        copyOnWrite();
        instance.addAllRefs(values);
        return this;
      }
      /**
       * <pre>
       * DELTA coded
       * </pre>
       *
       * <code>repeated sint64 refs = 8 [packed = true];</code>
       */
      public Builder clearRefs() {
        copyOnWrite();
        instance.clearRefs();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.Way)
    }
    private byte memoizedIsInitialized = -1;
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.Way();
        }
        case IS_INITIALIZED: {
          byte isInitialized = memoizedIsInitialized;
          if (isInitialized == 1) return DEFAULT_INSTANCE;
          if (isInitialized == 0) return null;

          boolean shouldMemoize = ((Boolean) arg0).booleanValue();
          if (!hasId()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (shouldMemoize) memoizedIsInitialized = 1;
          return DEFAULT_INSTANCE;

        }
        case MAKE_IMMUTABLE: {
          keys_.makeImmutable();
          vals_.makeImmutable();
          refs_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.Way other = (crosby.binary.Osmformat.Way) arg1;
          id_ = visitor.visitLong(
              hasId(), id_,
              other.hasId(), other.id_);
          keys_= visitor.visitIntList(keys_, other.keys_);
          vals_= visitor.visitIntList(vals_, other.vals_);
          info_ = visitor.visitMessage(info_, other.info_);
          refs_= visitor.visitLongList(refs_, other.refs_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 8: {
                  bitField0_ |= 0x00000001;
                  id_ = input.readInt64();
                  break;
                }
                case 16: {
                  if (!keys_.isModifiable()) {
                    keys_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(keys_);
                  }
                  keys_.addInt(input.readUInt32());
                  break;
                }
                case 18: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!keys_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    keys_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(keys_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    keys_.addInt(input.readUInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 24: {
                  if (!vals_.isModifiable()) {
                    vals_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(vals_);
                  }
                  vals_.addInt(input.readUInt32());
                  break;
                }
                case 26: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!vals_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    vals_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(vals_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    vals_.addInt(input.readUInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 34: {
                  crosby.binary.Osmformat.Info.Builder subBuilder = null;
                  if (((bitField0_ & 0x00000002) == 0x00000002)) {
                    subBuilder = info_.toBuilder();
                  }
                  info_ = input.readMessage(crosby.binary.Osmformat.Info.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(info_);
                    info_ = subBuilder.buildPartial();
                  }
                  bitField0_ |= 0x00000002;
                  break;
                }
                case 64: {
                  if (!refs_.isModifiable()) {
                    refs_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(refs_);
                  }
                  refs_.addLong(input.readSInt64());
                  break;
                }
                case 66: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!refs_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    refs_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(refs_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    refs_.addLong(input.readSInt64());
                  }
                  input.popLimit(limit);
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.Way.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.Way)
    private static final crosby.binary.Osmformat.Way DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new Way();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.Way getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Way> PARSER;

    public static com.google.protobuf.Parser<Way> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  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();

    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    java.util.List<java.lang.Integer> getKeysList();
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    int getKeysCount();
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    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>
     */
    crosby.binary.Osmformat.Info getInfo();

    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    java.util.List<java.lang.Integer> getRolesSidList();
    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    int getRolesSidCount();
    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    int getRolesSid(int index);

    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    java.util.List<java.lang.Long> getMemidsList();
    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    int getMemidsCount();
    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    long getMemids(int index);

    /**
     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
     */
    java.util.List<crosby.binary.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>
     */
    crosby.binary.Osmformat.Relation.MemberType getTypes(int index);
  }
  /**
   * Protobuf type {@code OSMPBF.Relation}
   */
  public  static final class Relation extends
      com.google.protobuf.GeneratedMessageLite<
          Relation, Relation.Builder> implements
      // @@protoc_insertion_point(message_implements:OSMPBF.Relation)
      RelationOrBuilder {
    private Relation() {
      keys_ = emptyIntList();
      vals_ = emptyIntList();
      rolesSid_ = emptyIntList();
      memids_ = emptyLongList();
      types_ = emptyIntList();
    }
    /**
     * Protobuf enum {@code OSMPBF.Relation.MemberType}
     */
    public enum MemberType
        implements com.google.protobuf.Internal.EnumLite {
      /**
       * <code>NODE = 0;</code>
       */
      NODE(0),
      /**
       * <code>WAY = 1;</code>
       */
      WAY(1),
      /**
       * <code>RELATION = 2;</code>
       */
      RELATION(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;
      }

      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static MemberType valueOf(int value) {
        return forNumber(value);
      }

      public static MemberType forNumber(int value) {
        switch (value) {
          case 0: return NODE;
          case 1: return WAY;
          case 2: return RELATION;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<MemberType>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          MemberType> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<MemberType>() {
              public MemberType findValueByNumber(int number) {
                return MemberType.forNumber(number);
              }
            };

      private final int value;

      private MemberType(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:OSMPBF.Relation.MemberType)
    }

    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_;
    }
    /**
     * <code>required int64 id = 1;</code>
     */
    private void setId(long value) {
      bitField0_ |= 0x00000001;
      id_ = value;
    }
    /**
     * <code>required int64 id = 1;</code>
     */
    private void clearId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      id_ = 0L;
    }

    public static final int KEYS_FIELD_NUMBER = 2;
    private com.google.protobuf.Internal.IntList keys_;
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    public java.util.List<java.lang.Integer>
        getKeysList() {
      return keys_;
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    public int getKeysCount() {
      return keys_.size();
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    public int getKeys(int index) {
      return keys_.getInt(index);
    }
    private int keysMemoizedSerializedSize = -1;
    private void ensureKeysIsMutable() {
      if (!keys_.isModifiable()) {
        keys_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(keys_);
       }
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void setKeys(
        int index, int value) {
      ensureKeysIsMutable();
      keys_.setInt(index, value);
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void addKeys(int value) {
      ensureKeysIsMutable();
      keys_.addInt(value);
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void addAllKeys(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureKeysIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, keys_);
    }
    /**
     * <pre>
     * Parallel arrays.
     * </pre>
     *
     * <code>repeated uint32 keys = 2 [packed = true];</code>
     */
    private void clearKeys() {
      keys_ = emptyIntList();
    }

    public static final int VALS_FIELD_NUMBER = 3;
    private com.google.protobuf.Internal.IntList 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_.getInt(index);
    }
    private int valsMemoizedSerializedSize = -1;
    private void ensureValsIsMutable() {
      if (!vals_.isModifiable()) {
        vals_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(vals_);
       }
    }
    /**
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void setVals(
        int index, int value) {
      ensureValsIsMutable();
      vals_.setInt(index, value);
    }
    /**
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void addVals(int value) {
      ensureValsIsMutable();
      vals_.addInt(value);
    }
    /**
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void addAllVals(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureValsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, vals_);
    }
    /**
     * <code>repeated uint32 vals = 3 [packed = true];</code>
     */
    private void clearVals() {
      vals_ = emptyIntList();
    }

    public static final int INFO_FIELD_NUMBER = 4;
    private crosby.binary.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 crosby.binary.Osmformat.Info getInfo() {
      return info_ == null ? crosby.binary.Osmformat.Info.getDefaultInstance() : info_;
    }
    /**
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void setInfo(crosby.binary.Osmformat.Info value) {
      if (value == null) {
        throw new NullPointerException();
      }
      info_ = value;
      bitField0_ |= 0x00000002;
      }
    /**
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void setInfo(
        crosby.binary.Osmformat.Info.Builder builderForValue) {
      info_ = builderForValue.build();
      bitField0_ |= 0x00000002;
    }
    /**
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void mergeInfo(crosby.binary.Osmformat.Info value) {
      if (info_ != null &&
          info_ != crosby.binary.Osmformat.Info.getDefaultInstance()) {
        info_ =
          crosby.binary.Osmformat.Info.newBuilder(info_).mergeFrom(value).buildPartial();
      } else {
        info_ = value;
      }
      bitField0_ |= 0x00000002;
    }
    /**
     * <code>optional .OSMPBF.Info info = 4;</code>
     */
    private void clearInfo() {  info_ = null;
      bitField0_ = (bitField0_ & ~0x00000002);
    }

    public static final int ROLES_SID_FIELD_NUMBER = 8;
    private com.google.protobuf.Internal.IntList rolesSid_;
    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    public java.util.List<java.lang.Integer>
        getRolesSidList() {
      return rolesSid_;
    }
    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    public int getRolesSidCount() {
      return rolesSid_.size();
    }
    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    public int getRolesSid(int index) {
      return rolesSid_.getInt(index);
    }
    private int rolesSidMemoizedSerializedSize = -1;
    private void ensureRolesSidIsMutable() {
      if (!rolesSid_.isModifiable()) {
        rolesSid_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(rolesSid_);
       }
    }
    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    private void setRolesSid(
        int index, int value) {
      ensureRolesSidIsMutable();
      rolesSid_.setInt(index, value);
    }
    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    private void addRolesSid(int value) {
      ensureRolesSidIsMutable();
      rolesSid_.addInt(value);
    }
    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    private void addAllRolesSid(
        java.lang.Iterable<? extends java.lang.Integer> values) {
      ensureRolesSidIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, rolesSid_);
    }
    /**
     * <pre>
     * Parallel arrays
     * </pre>
     *
     * <code>repeated int32 roles_sid = 8 [packed = true];</code>
     */
    private void clearRolesSid() {
      rolesSid_ = emptyIntList();
    }

    public static final int MEMIDS_FIELD_NUMBER = 9;
    private com.google.protobuf.Internal.LongList memids_;
    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    public java.util.List<java.lang.Long>
        getMemidsList() {
      return memids_;
    }
    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    public int getMemidsCount() {
      return memids_.size();
    }
    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    public long getMemids(int index) {
      return memids_.getLong(index);
    }
    private int memidsMemoizedSerializedSize = -1;
    private void ensureMemidsIsMutable() {
      if (!memids_.isModifiable()) {
        memids_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(memids_);
       }
    }
    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    private void setMemids(
        int index, long value) {
      ensureMemidsIsMutable();
      memids_.setLong(index, value);
    }
    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    private void addMemids(long value) {
      ensureMemidsIsMutable();
      memids_.addLong(value);
    }
    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    private void addAllMemids(
        java.lang.Iterable<? extends java.lang.Long> values) {
      ensureMemidsIsMutable();
      com.google.protobuf.AbstractMessageLite.addAll(
          values, memids_);
    }
    /**
     * <pre>
     * DELTA encoded
     * </pre>
     *
     * <code>repeated sint64 memids = 9 [packed = true];</code>
     */
    private void clearMemids() {
      memids_ = emptyLongList();
    }

    public static final int TYPES_FIELD_NUMBER = 10;
    private com.google.protobuf.Internal.IntList types_;
    private static final com.google.protobuf.Internal.ListAdapter.Converter<
        java.lang.Integer, crosby.binary.Osmformat.Relation.MemberType> types_converter_ =
            new com.google.protobuf.Internal.ListAdapter.Converter<
                java.lang.Integer, crosby.binary.Osmformat.Relation.MemberType>() {
              public crosby.binary.Osmformat.Relation.MemberType convert(java.lang.Integer from) {
                crosby.binary.Osmformat.Relation.MemberType result = crosby.binary.Osmformat.Relation.MemberType.forNumber(from);
                return result == null ? crosby.binary.Osmformat.Relation.MemberType.NODE : result;
              }
            };
    /**
     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
     */
    public java.util.List<crosby.binary.Osmformat.Relation.MemberType> getTypesList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer, crosby.binary.Osmformat.Relation.MemberType>(types_, types_converter_);
    }
    /**
     * <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 crosby.binary.Osmformat.Relation.MemberType getTypes(int index) {
      return types_converter_.convert(types_.getInt(index));
    }
    private int typesMemoizedSerializedSize;
    private void ensureTypesIsMutable() {
      if (!types_.isModifiable()) {
        types_ =
            com.google.protobuf.GeneratedMessageLite.mutableCopy(types_);
      }
    }
    /**
     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
     */
    private void setTypes(
        int index, crosby.binary.Osmformat.Relation.MemberType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTypesIsMutable();
      types_.setInt(index, value.getNumber());
    }
    /**
     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
     */
    private void addTypes(crosby.binary.Osmformat.Relation.MemberType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureTypesIsMutable();
      types_.addInt(value.getNumber());
    }
    /**
     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
     */
    private void addAllTypes(
        java.lang.Iterable<? extends crosby.binary.Osmformat.Relation.MemberType> values) {
      ensureTypesIsMutable();
      for (crosby.binary.Osmformat.Relation.MemberType value : values) {
        types_.addInt(value.getNumber());
      }
    }
    /**
     * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
     */
    private void clearTypes() {
      types_ = emptyIntList();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeInt64(1, id_);
      }
      if (getKeysList().size() > 0) {
        output.writeUInt32NoTag(18);
        output.writeUInt32NoTag(keysMemoizedSerializedSize);
      }
      for (int i = 0; i < keys_.size(); i++) {
        output.writeUInt32NoTag(keys_.getInt(i));
      }
      if (getValsList().size() > 0) {
        output.writeUInt32NoTag(26);
        output.writeUInt32NoTag(valsMemoizedSerializedSize);
      }
      for (int i = 0; i < vals_.size(); i++) {
        output.writeUInt32NoTag(vals_.getInt(i));
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeMessage(4, getInfo());
      }
      if (getRolesSidList().size() > 0) {
        output.writeUInt32NoTag(66);
        output.writeUInt32NoTag(rolesSidMemoizedSerializedSize);
      }
      for (int i = 0; i < rolesSid_.size(); i++) {
        output.writeInt32NoTag(rolesSid_.getInt(i));
      }
      if (getMemidsList().size() > 0) {
        output.writeUInt32NoTag(74);
        output.writeUInt32NoTag(memidsMemoizedSerializedSize);
      }
      for (int i = 0; i < memids_.size(); i++) {
        output.writeSInt64NoTag(memids_.getLong(i));
      }
      if (getTypesList().size() > 0) {
        output.writeUInt32NoTag(82);
        output.writeUInt32NoTag(typesMemoizedSerializedSize);
      }
      for (int i = 0; i < types_.size(); i++) {
        output.writeEnumNoTag(types_.getInt(i));
      }
      unknownFields.writeTo(output);
    }

    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_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < keys_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeUInt32SizeNoTag(keys_.getInt(i));
        }
        size += dataSize;
        if (!getKeysList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        keysMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < vals_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeUInt32SizeNoTag(vals_.getInt(i));
        }
        size += dataSize;
        if (!getValsList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        valsMemoizedSerializedSize = dataSize;
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getInfo());
      }
      {
        int dataSize = 0;
        for (int i = 0; i < rolesSid_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(rolesSid_.getInt(i));
        }
        size += dataSize;
        if (!getRolesSidList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        rolesSidMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < memids_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeSInt64SizeNoTag(memids_.getLong(i));
        }
        size += dataSize;
        if (!getMemidsList().isEmpty()) {
          size += 1;
          size += com.google.protobuf.CodedOutputStream
              .computeInt32SizeNoTag(dataSize);
        }
        memidsMemoizedSerializedSize = dataSize;
      }
      {
        int dataSize = 0;
        for (int i = 0; i < types_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeEnumSizeNoTag(types_.getInt(i));
        }
        size += dataSize;
        if (!getTypesList().isEmpty()) {  size += 1;
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32SizeNoTag(dataSize);
        }typesMemoizedSerializedSize = dataSize;
      }
      size += unknownFields.getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static crosby.binary.Osmformat.Relation parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Relation parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Relation parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Relation parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Relation parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static crosby.binary.Osmformat.Relation parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Relation parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Relation parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Relation parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Relation parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static crosby.binary.Osmformat.Relation parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static crosby.binary.Osmformat.Relation parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(crosby.binary.Osmformat.Relation prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code OSMPBF.Relation}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          crosby.binary.Osmformat.Relation, Builder> implements
        // @@protoc_insertion_point(builder_implements:OSMPBF.Relation)
        crosby.binary.Osmformat.RelationOrBuilder {
      // Construct using crosby.binary.Osmformat.Relation.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }


      /**
       * <code>required int64 id = 1;</code>
       */
      public boolean hasId() {
        return instance.hasId();
      }
      /**
       * <code>required int64 id = 1;</code>
       */
      public long getId() {
        return instance.getId();
      }
      /**
       * <code>required int64 id = 1;</code>
       */
      public Builder setId(long value) {
        copyOnWrite();
        instance.setId(value);
        return this;
      }
      /**
       * <code>required int64 id = 1;</code>
       */
      public Builder clearId() {
        copyOnWrite();
        instance.clearId();
        return this;
      }

      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getKeysList() {
        return java.util.Collections.unmodifiableList(
            instance.getKeysList());
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public int getKeysCount() {
        return instance.getKeysCount();
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public int getKeys(int index) {
        return instance.getKeys(index);
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder setKeys(
          int index, int value) {
        copyOnWrite();
        instance.setKeys(index, value);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder addKeys(int value) {
        copyOnWrite();
        instance.addKeys(value);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder addAllKeys(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllKeys(values);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays.
       * </pre>
       *
       * <code>repeated uint32 keys = 2 [packed = true];</code>
       */
      public Builder clearKeys() {
        copyOnWrite();
        instance.clearKeys();
        return this;
      }

      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getValsList() {
        return java.util.Collections.unmodifiableList(
            instance.getValsList());
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public int getValsCount() {
        return instance.getValsCount();
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public int getVals(int index) {
        return instance.getVals(index);
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder setVals(
          int index, int value) {
        copyOnWrite();
        instance.setVals(index, value);
        return this;
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder addVals(int value) {
        copyOnWrite();
        instance.addVals(value);
        return this;
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder addAllVals(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllVals(values);
        return this;
      }
      /**
       * <code>repeated uint32 vals = 3 [packed = true];</code>
       */
      public Builder clearVals() {
        copyOnWrite();
        instance.clearVals();
        return this;
      }

      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public boolean hasInfo() {
        return instance.hasInfo();
      }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public crosby.binary.Osmformat.Info getInfo() {
        return instance.getInfo();
      }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder setInfo(crosby.binary.Osmformat.Info value) {
        copyOnWrite();
        instance.setInfo(value);
        return this;
        }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder setInfo(
          crosby.binary.Osmformat.Info.Builder builderForValue) {
        copyOnWrite();
        instance.setInfo(builderForValue);
        return this;
      }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder mergeInfo(crosby.binary.Osmformat.Info value) {
        copyOnWrite();
        instance.mergeInfo(value);
        return this;
      }
      /**
       * <code>optional .OSMPBF.Info info = 4;</code>
       */
      public Builder clearInfo() {  copyOnWrite();
        instance.clearInfo();
        return this;
      }

      /**
       * <pre>
       * Parallel arrays
       * </pre>
       *
       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
       */
      public java.util.List<java.lang.Integer>
          getRolesSidList() {
        return java.util.Collections.unmodifiableList(
            instance.getRolesSidList());
      }
      /**
       * <pre>
       * Parallel arrays
       * </pre>
       *
       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
       */
      public int getRolesSidCount() {
        return instance.getRolesSidCount();
      }
      /**
       * <pre>
       * Parallel arrays
       * </pre>
       *
       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
       */
      public int getRolesSid(int index) {
        return instance.getRolesSid(index);
      }
      /**
       * <pre>
       * Parallel arrays
       * </pre>
       *
       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
       */
      public Builder setRolesSid(
          int index, int value) {
        copyOnWrite();
        instance.setRolesSid(index, value);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays
       * </pre>
       *
       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
       */
      public Builder addRolesSid(int value) {
        copyOnWrite();
        instance.addRolesSid(value);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays
       * </pre>
       *
       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
       */
      public Builder addAllRolesSid(
          java.lang.Iterable<? extends java.lang.Integer> values) {
        copyOnWrite();
        instance.addAllRolesSid(values);
        return this;
      }
      /**
       * <pre>
       * Parallel arrays
       * </pre>
       *
       * <code>repeated int32 roles_sid = 8 [packed = true];</code>
       */
      public Builder clearRolesSid() {
        copyOnWrite();
        instance.clearRolesSid();
        return this;
      }

      /**
       * <pre>
       * DELTA encoded
       * </pre>
       *
       * <code>repeated sint64 memids = 9 [packed = true];</code>
       */
      public java.util.List<java.lang.Long>
          getMemidsList() {
        return java.util.Collections.unmodifiableList(
            instance.getMemidsList());
      }
      /**
       * <pre>
       * DELTA encoded
       * </pre>
       *
       * <code>repeated sint64 memids = 9 [packed = true];</code>
       */
      public int getMemidsCount() {
        return instance.getMemidsCount();
      }
      /**
       * <pre>
       * DELTA encoded
       * </pre>
       *
       * <code>repeated sint64 memids = 9 [packed = true];</code>
       */
      public long getMemids(int index) {
        return instance.getMemids(index);
      }
      /**
       * <pre>
       * DELTA encoded
       * </pre>
       *
       * <code>repeated sint64 memids = 9 [packed = true];</code>
       */
      public Builder setMemids(
          int index, long value) {
        copyOnWrite();
        instance.setMemids(index, value);
        return this;
      }
      /**
       * <pre>
       * DELTA encoded
       * </pre>
       *
       * <code>repeated sint64 memids = 9 [packed = true];</code>
       */
      public Builder addMemids(long value) {
        copyOnWrite();
        instance.addMemids(value);
        return this;
      }
      /**
       * <pre>
       * DELTA encoded
       * </pre>
       *
       * <code>repeated sint64 memids = 9 [packed = true];</code>
       */
      public Builder addAllMemids(
          java.lang.Iterable<? extends java.lang.Long> values) {
        copyOnWrite();
        instance.addAllMemids(values);
        return this;
      }
      /**
       * <pre>
       * DELTA encoded
       * </pre>
       *
       * <code>repeated sint64 memids = 9 [packed = true];</code>
       */
      public Builder clearMemids() {
        copyOnWrite();
        instance.clearMemids();
        return this;
      }

      /**
       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
       */
      public java.util.List<crosby.binary.Osmformat.Relation.MemberType> getTypesList() {
        return instance.getTypesList();
      }
      /**
       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
       */
      public int getTypesCount() {
        return instance.getTypesCount();
      }
      /**
       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
       */
      public crosby.binary.Osmformat.Relation.MemberType getTypes(int index) {
        return instance.getTypes(index);
      }
      /**
       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
       */
      public Builder setTypes(
          int index, crosby.binary.Osmformat.Relation.MemberType value) {
        copyOnWrite();
        instance.setTypes(index, value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
       */
      public Builder addTypes(crosby.binary.Osmformat.Relation.MemberType value) {
        copyOnWrite();
        instance.addTypes(value);
        return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
       */
      public Builder addAllTypes(
          java.lang.Iterable<? extends crosby.binary.Osmformat.Relation.MemberType> values) {
        copyOnWrite();
        instance.addAllTypes(values);  return this;
      }
      /**
       * <code>repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];</code>
       */
      public Builder clearTypes() {
        copyOnWrite();
        instance.clearTypes();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:OSMPBF.Relation)
    }
    private byte memoizedIsInitialized = -1;
    @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
    protected final java.lang.Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        java.lang.Object arg0, java.lang.Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new crosby.binary.Osmformat.Relation();
        }
        case IS_INITIALIZED: {
          byte isInitialized = memoizedIsInitialized;
          if (isInitialized == 1) return DEFAULT_INSTANCE;
          if (isInitialized == 0) return null;

          boolean shouldMemoize = ((Boolean) arg0).booleanValue();
          if (!hasId()) {
            if (shouldMemoize) {
              memoizedIsInitialized = 0;
            }
            return null;
          }
          if (shouldMemoize) memoizedIsInitialized = 1;
          return DEFAULT_INSTANCE;

        }
        case MAKE_IMMUTABLE: {
          keys_.makeImmutable();
          vals_.makeImmutable();
          rolesSid_.makeImmutable();
          memids_.makeImmutable();
          types_.makeImmutable();
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          crosby.binary.Osmformat.Relation other = (crosby.binary.Osmformat.Relation) arg1;
          id_ = visitor.visitLong(
              hasId(), id_,
              other.hasId(), other.id_);
          keys_= visitor.visitIntList(keys_, other.keys_);
          vals_= visitor.visitIntList(vals_, other.vals_);
          info_ = visitor.visitMessage(info_, other.info_);
          rolesSid_= visitor.visitIntList(rolesSid_, other.rolesSid_);
          memids_= visitor.visitLongList(memids_, other.memids_);
          types_= visitor.visitIntList(types_, other.types_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
            bitField0_ |= other.bitField0_;
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!parseUnknownField(tag, input)) {
                    done = true;
                  }
                  break;
                }
                case 8: {
                  bitField0_ |= 0x00000001;
                  id_ = input.readInt64();
                  break;
                }
                case 16: {
                  if (!keys_.isModifiable()) {
                    keys_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(keys_);
                  }
                  keys_.addInt(input.readUInt32());
                  break;
                }
                case 18: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!keys_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    keys_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(keys_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    keys_.addInt(input.readUInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 24: {
                  if (!vals_.isModifiable()) {
                    vals_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(vals_);
                  }
                  vals_.addInt(input.readUInt32());
                  break;
                }
                case 26: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!vals_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    vals_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(vals_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    vals_.addInt(input.readUInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 34: {
                  crosby.binary.Osmformat.Info.Builder subBuilder = null;
                  if (((bitField0_ & 0x00000002) == 0x00000002)) {
                    subBuilder = info_.toBuilder();
                  }
                  info_ = input.readMessage(crosby.binary.Osmformat.Info.parser(), extensionRegistry);
                  if (subBuilder != null) {
                    subBuilder.mergeFrom(info_);
                    info_ = subBuilder.buildPartial();
                  }
                  bitField0_ |= 0x00000002;
                  break;
                }
                case 64: {
                  if (!rolesSid_.isModifiable()) {
                    rolesSid_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(rolesSid_);
                  }
                  rolesSid_.addInt(input.readInt32());
                  break;
                }
                case 66: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!rolesSid_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    rolesSid_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(rolesSid_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    rolesSid_.addInt(input.readInt32());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 72: {
                  if (!memids_.isModifiable()) {
                    memids_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(memids_);
                  }
                  memids_.addLong(input.readSInt64());
                  break;
                }
                case 74: {
                  int length = input.readRawVarint32();
                  int limit = input.pushLimit(length);
                  if (!memids_.isModifiable() && input.getBytesUntilLimit() > 0) {
                    memids_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(memids_);
                  }
                  while (input.getBytesUntilLimit() > 0) {
                    memids_.addLong(input.readSInt64());
                  }
                  input.popLimit(limit);
                  break;
                }
                case 80: {
                  if (!types_.isModifiable()) {
                    types_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(types_);
                  }
                  int rawValue = input.readEnum();
                  crosby.binary.Osmformat.Relation.MemberType value = crosby.binary.Osmformat.Relation.MemberType.forNumber(rawValue);
                  if (value == null) {
                    super.mergeVarintField(10, rawValue);
                  } else {
                    types_.addInt(rawValue);
                  }
                  break;
                }
                case 82: {
                  if (!types_.isModifiable()) {
                    types_ =
                        com.google.protobuf.GeneratedMessageLite.mutableCopy(types_);
                  }
                  int length = input.readRawVarint32();
                  int oldLimit = input.pushLimit(length);
                  while(input.getBytesUntilLimit() > 0) {
                    int rawValue = input.readEnum();
                    crosby.binary.Osmformat.Relation.MemberType value = crosby.binary.Osmformat.Relation.MemberType.forNumber(rawValue);
                    if (value == null) {
                      super.mergeVarintField(10, rawValue);
                    } else {
                      types_.addInt(rawValue);
                    }
                  }
                  input.popLimit(oldLimit);
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        // fall through
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (crosby.binary.Osmformat.Relation.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }


    // @@protoc_insertion_point(class_scope:OSMPBF.Relation)
    private static final crosby.binary.Osmformat.Relation DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new Relation();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static crosby.binary.Osmformat.Relation getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Relation> PARSER;

    public static com.google.protobuf.Parser<Relation> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }


  static {
  }

  // @@protoc_insertion_point(outer_class_scope)
}
