.computeStringSize(17, getSource());
@java.lang.Override 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); }
@Override public void parse(Osmformat.HeaderBlock block) { for (String s : block.getRequiredFeaturesList()) { if (s.equals("OsmSchema-V0.6")) { continue; // We can parse this. } if (s.equals("DenseNodes")) { continue; // We can parse this. } throw new OsmosisRuntimeException("File requires unknown feature: " + s); } if (block.hasBbox()) { String source = OsmosisConstants.VERSION; if (block.hasSource()) { source = block.getSource(); } double multiplier = .000000001; double rightf = block.getBbox().getRight() * multiplier; double leftf = block.getBbox().getLeft() * multiplier; double topf = block.getBbox().getTop() * multiplier; double bottomf = block.getBbox().getBottom() * multiplier; Bound bounds = new Bound(rightf, leftf, topf, bottomf, source); sink.process(new BoundContainer(bounds)); } }
@Override public BoundContainer apply(Osmformat.HeaderBlock header) { Bound bound; if (header.hasBbox()) { Osmformat.HeaderBBox bbox = header.getBbox(); bound = new Bound(bbox.getRight() * COORDINATE_SCALING_FACTOR, bbox.getLeft() * COORDINATE_SCALING_FACTOR, bbox.getTop() * COORDINATE_SCALING_FACTOR, bbox.getBottom() * COORDINATE_SCALING_FACTOR, header.getSource()); } else { bound = new Bound(header.getSource()); } return new BoundContainer(bound); } }
/** * <pre> * From the bbox field. * </pre> * * <code>optional string source = 17;</code> */ @java.lang.Override public java.lang.String getSource() { return instance.getSource(); } /**
/** * <pre> * From the bbox field. * </pre> * * <code>optional string source = 17;</code> */ private void clearSource() { bitField0_ = (bitField0_ & ~0x00000004); source_ = getDefaultInstance().getSource(); } /**