You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2025/02/26 23:57:45 UTC
(sedona) branch master updated: [SEDONA-713] add OSM PBF reader (#1823)
This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new fba7d7519f [SEDONA-713] add OSM PBF reader (#1823)
fba7d7519f is described below
commit fba7d7519fb8518ce1632842c22c41a24bdb3ec7
Author: Paweł Tokaj <pa...@gmail.com>
AuthorDate: Thu Feb 27 00:57:40 2025 +0100
[SEDONA-713] add OSM PBF reader (#1823)
* Add OSM PBF reader.
Add documentation.
Add documentation.
Add documentation.
Add documentation.
Add documentation.
SEDONA-713 moving to common.
* SEDONA-713 Add docs.
* SEDONA-713 Add docs.
* SEDONA-713 Add docs.
* SEDONA-714 Add docs.
---
.github/linters/codespell.txt | 1 +
.pre-commit-config.yaml | 2 +-
docs/tutorial/sql.md | 96 +
pom.xml | 2 +
shade-proto/pom.xml | 89 +
spark/common/pom.xml | 42 +
.../sql/datasources/osmpbf/DenseNodeIterator.java | 51 +
.../sql/datasources/osmpbf/HeaderFinder.java | 81 +
.../sedona/sql/datasources/osmpbf/ParseUtils.java | 45 +
.../sql/datasources/osmpbf/StartEndStream.java | 58 +
.../sql/datasources/osmpbf/TruncatedStream.java | 32 +
.../sql/datasources/osmpbf/build/Fileformat.java | 2013 ++
.../sql/datasources/osmpbf/build/Osmformat.java | 18306 +++++++++++++++++++
.../osmpbf/extractors/DenseNodeExtractor.java | 86 +
.../osmpbf/extractors/RelationExtractor.java | 97 +
.../osmpbf/extractors/WaysExtractor.java | 57 +
.../datasources/osmpbf/features/TagsResolver.java | 44 +
.../sql/datasources/osmpbf/iterators/BlobData.java | 39 +
.../datasources/osmpbf/iterators/BlobIterator.java | 137 +
.../datasources/osmpbf/iterators/PbfIterator.java | 68 +
.../osmpbf/iterators/PrimitiveGroupIterator.java | 72 +
.../sql/datasources/osmpbf/model/OSMEntity.java | 96 +
.../sql/datasources/osmpbf/model/OsmNode.java | 28 +
.../sql/datasources/osmpbf/model/Relation.java | 28 +
.../sql/datasources/osmpbf/model/RelationType.java | 38 +
.../sedona/sql/datasources/osmpbf/model/Way.java | 27 +
...org.apache.spark.sql.sources.DataSourceRegister | 1 +
.../sql/datasources/osm/OsmPartitionReader.scala | 109 +
.../sedona/sql/datasources/osm/OsmPbfFormat.scala | 65 +
.../sql/datasources/osm/SchemaProvider.scala | 43 +
.../test/resources/osmpbf/monaco-latest.osm.pbf | Bin 0 -> 631836 bytes
.../org/apache/sedona/sql/OsmReaderTest.scala | 167 +
.../org/apache/sedona/sql/TestBaseScala.scala | 51 +-
.../apache/sedona/sql/GeoPackageReaderTest.scala | 37 +-
.../org/apache/sedona/sql/TestBaseScala.scala | 40 +-
.../apache/sedona/sql/GeoPackageReaderTest.scala | 37 +-
.../org/apache/sedona/sql/TestBaseScala.scala | 40 +-
.../apache/sedona/sql/GeoPackageReaderTest.scala | 37 +-
.../org/apache/sedona/sql/TestBaseScala.scala | 41 +-
39 files changed, 22193 insertions(+), 110 deletions(-)
diff --git a/.github/linters/codespell.txt b/.github/linters/codespell.txt
index 7ea89413af..1ac5f08975 100644
--- a/.github/linters/codespell.txt
+++ b/.github/linters/codespell.txt
@@ -12,6 +12,7 @@ limite
nd
ois
parm
+pavin
pixelx
refere
ser
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7e1cbb6826..d4bee1fdbb 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -125,7 +125,7 @@ repos:
name: run codespell
description: check spelling with codespell
args: [--ignore-words=.github/linters/codespell.txt]
- exclude: ^docs/image|^spark/common/src/test/resources|^docs/usecases|^tools/maven/scalafmt
+ exclude: ^docs/image|^spark/common/src/test/resources|^docs/usecases|^tools/maven/scalafmt|osmpbf/build
- repo: https://github.com/gitleaks/gitleaks
rev: v8.23.3
hooks:
diff --git a/docs/tutorial/sql.md b/docs/tutorial/sql.md
index 4693c56d9e..72e226e166 100644
--- a/docs/tutorial/sql.md
+++ b/docs/tutorial/sql.md
@@ -757,6 +757,102 @@ You can also load data from raster tables in the geopackage file. To load raster
+---+----------+-----------+--------+--------------------+
```
+## Load from OSM PBF
+
+Since v1.7.1, Sedona supports loading OSM PBF file format as a DataFrame.
+
+=== "Scala/Java"
+
+ ```scala
+ val df = sedona.read.format("osmpbf").load("/path/to/osmpbf")
+ ```
+
+=== "Java"
+
+ ```java
+ Dataset<Row> df = sedona.read().format("osmpbf").load("/path/to/osmpbf")
+ ```
+
+=== "Python"
+
+ ```python
+ df = sedona.read.format("osmpbf").load("/path/to/osmpbf")
+ ```
+
+OSM PBF files can contain nodes, ways, and relations. Currently Sedona support
+DenseNodes, Ways and Relations. When you load the data you get a DataFrame with the following schema.
+
+```
+root
+ |-- id: long (nullable = true)
+ |-- kind: string (nullable = true)
+ |-- location: struct (nullable = true)
+ | |-- longitude: double (nullable = true)
+ | |-- latitude: double (nullable = true)
+ |-- tags: map (nullable = true)
+ | |-- key: string
+ | |-- value: string (valueContainsNull = true)
+ |-- refs: array (nullable = true)
+ | |-- element: long (containsNull = true)
+ |-- ref_roles: array (nullable = true)
+ | |-- element: string (containsNull = true)
+ |-- ref_types: array (nullable = true)
+ | |-- element: string (containsNull = true)
+```
+
+Where:
+
+- `id` is the unique identifier of the object.
+- `kind` is the type of the object, it can be `node`, `way` or `relation`.
+- `location` is the location of the object, it contains the `longitude` and `latitude` of the object.
+- `tags` is a map of key-value pairs that represent the tags of the object.
+- `refs` is an array of the references of the object.
+- `ref_roles` is an array of the roles of the references.
+- `ref_types` is an array of the types of the references.
+
+The dataframe for ways might look like this for nodes:
+
+```
++---------+----+--------------------+--------------------+----+---------+---------+
+| id|kind| location| tags|refs|ref_roles|ref_types|
++---------+----+--------------------+--------------------+----+---------+---------+
+|248675410|node|{21.0884952545166...|{tactile_paving -...|NULL| NULL| NULL|
+|260821820|node|{21.0191555023193...|{created_by -> JOSM}|NULL| NULL| NULL|
+|349189665|node|{22.1437530517578...|{source -> http:/...|NULL| NULL| NULL|
+|353366899|node|{22.9787712097167...|{source -> http:/...|NULL| NULL| NULL|
+|359460224|node|{22.4816703796386...|{source -> http:/...|NULL| NULL| NULL|
++---------+----+--------------------+--------------------+----+---------+---------+
+only showing top 5 rows
+```
+
+and for way
+
+```
++-------+----+--------+--------------------+--------------------+---------+---------+
+| id|kind|location| tags| refs|ref_roles|ref_types|
++-------+----+--------+--------------------+--------------------+---------+---------+
+|4307329| way| NULL|{junction -> roun...|[2448759046, 7093...| NULL| NULL|
+|4307330| way| NULL|{surface -> aspha...|[26063923, 260639...| NULL| NULL|
+|4308966| way| NULL|{sidewalk -> sepa...|[3387797238, 9252...| NULL| NULL|
+|4308968| way| NULL|{surface -> pavin...|[26083890, 744724...| NULL| NULL|
+|4308969| way| NULL|{cycleway:both ->...|[9526831176, 1218...| NULL| NULL|
++-------+----+--------+--------------------+--------------------+---------+---------+
+```
+
+and for relation
+
+```
++-----+--------+--------+--------------------+--------------------+--------------------+--------------------+
+| id| kind|location| tags| refs| ref_roles| ref_types|
++-----+--------+--------+--------------------+--------------------+--------------------+--------------------+
+|28124|relation| NULL|{official_name ->...|[26382394, 26259985]| [inner, outer]| [WAY, WAY]|
+|28488|relation| NULL| {type -> junction}|[26409253, 303249...|[roundabout, roun...|[WAY, WAY, WAY, WAY]|
+|32939|relation| NULL|{ref -> E 67, rou...|[140673970, 14067...| [, , , , , ]|[WAY, WAY, RELATI...|
+|34387|relation| NULL|{note -> rząd III...|[209161000, 52154...|[main_stream, mai...|[WAY, WAY, WAY, W...|
+|34392|relation| NULL|{distance -> 1047...|[150033976, 25076...|[main_stream, mai...|[WAY, WAY, WAY, W...|
++-----+--------+--------+--------------------+--------------------+--------------------+--------------------+
+```
+
Known limitations (v1.7.0):
- webp rasters are not supported
diff --git a/pom.xml b/pom.xml
index 6ced20603e..4100b8b86e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -765,6 +765,7 @@
<module>common</module>
<module>spark</module>
<module>spark-shaded</module>
+ <module>shade-proto</module>
</modules>
</profile>
<profile>
@@ -788,6 +789,7 @@
<module>flink</module>
<module>flink-shaded</module>
<module>snowflake</module>
+ <module>shade-proto</module>
</modules>
</profile>
<profile>
diff --git a/shade-proto/pom.xml b/shade-proto/pom.xml
new file mode 100644
index 0000000000..83b1ab1c66
--- /dev/null
+++ b/shade-proto/pom.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.sedona</groupId>
+ <artifactId>sedona-parent</artifactId>
+ <version>1.7.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>shade-proto</artifactId>
+ <name>${project.groupId}:${project.artifactId}</name>
+ <url>http://sedona.apache.org/</url>
+ <packaging>jar</packaging>
+
+ <properties>
+ <maven.compiler.source>8</maven.compiler.source>
+ <maven.compiler.target>8</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>4.28.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <sourceDirectory>src/main/java</sourceDirectory>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>8</source>
+ <target>8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>3.5.0</version>
+ <configuration>
+ <relocations>
+ <relocation>
+ <pattern>com.google.protobuf</pattern>
+ <shadedPattern>proto4</shadedPattern>
+ </relocation>
+ </relocations>
+ <createDependencyReducedPom>false</createDependencyReducedPom>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.3.0</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/${project.build.finalName}.jar</file>
+ <type>jar</type>
+ <classifier>shaded</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/spark/common/pom.xml b/spark/common/pom.xml
index 9014c9d7cc..c5962ad0c8 100644
--- a/spark/common/pom.xml
+++ b/spark/common/pom.xml
@@ -48,6 +48,18 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.sedona</groupId>
+ <artifactId>shade-proto</artifactId>
+ <version>${project.version}</version>
+ <classifier>shaded</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.compat.version}</artifactId>
@@ -94,6 +106,12 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
@@ -220,6 +238,30 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.testcontainers</groupId>
+ <artifactId>minio</artifactId>
+ <version>1.20.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.minio</groupId>
+ <artifactId>minio</artifactId>
+ <version>8.5.12</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-aws</artifactId>
+ <version>${hadoop.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-client-api</artifactId>
+ <version>${hadoop.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency> <!-- Generally this will be provided by the runtime's spark install -->
<groupId>org.apache.spark</groupId>
<artifactId>spark-graphx_${scala.compat.version}</artifactId>
diff --git a/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/DenseNodeIterator.java b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/DenseNodeIterator.java
new file mode 100644
index 0000000000..3c4013c7eb
--- /dev/null
+++ b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/DenseNodeIterator.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sedona.sql.datasources.osmpbf;
+
+import java.util.Iterator;
+import org.apache.sedona.sql.datasources.osmpbf.build.Osmformat;
+import org.apache.sedona.sql.datasources.osmpbf.extractors.DenseNodeExtractor;
+import org.apache.sedona.sql.datasources.osmpbf.model.OsmNode;
+
+public class DenseNodeIterator implements Iterator<OsmNode> {
+ Osmformat.StringTable stringTable;
+ int idx;
+ long nodesSize;
+ DenseNodeExtractor extractor;
+
+ public DenseNodeIterator(
+ long nodesSize, Osmformat.StringTable stringTable, DenseNodeExtractor extractor) {
+ this.stringTable = stringTable;
+ this.nodesSize = nodesSize;
+ this.idx = 0;
+ this.extractor = extractor;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return idx < nodesSize;
+ }
+
+ @Override
+ public OsmNode next() {
+ OsmNode node = extractor.extract(idx, stringTable);
+ idx += 1;
+ return node;
+ }
+}
diff --git a/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/HeaderFinder.java b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/HeaderFinder.java
new file mode 100644
index 0000000000..2b4d8a192a
--- /dev/null
+++ b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/HeaderFinder.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sedona.sql.datasources.osmpbf;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.LinkedList;
+
+public class HeaderFinder {
+ private byte[] pattern = new byte[] {0x0A, 0x07, 'O', 'S', 'M', 'D', 'a', 't', 'a'};
+ private int HEADER_SIZE_LENGTH = 4;
+
+ int idx = 0;
+
+ InputStream stream;
+
+ public HeaderFinder(InputStream stream) {
+ this.stream = stream;
+ }
+
+ public long find() throws IOException {
+ stream.skip(HEADER_SIZE_LENGTH);
+
+ LinkedList<Byte> current = new LinkedList<>();
+
+ while (current.size() < pattern.length) {
+ int i = stream.read();
+ if (i == -1) {
+ return -1;
+ }
+
+ current.add((byte) i);
+ }
+
+ int i = 0;
+
+ while (!equals(current, pattern) && i != -1) {
+ i = stream.read();
+ if (i == -1) {
+ return -1;
+ }
+
+ current.removeFirst();
+ current.add((byte) i);
+
+ idx += 1;
+ }
+
+ if (equals(current, pattern)) {
+ return idx;
+ }
+
+ return 0;
+ }
+
+ public boolean equals(LinkedList<Byte> a, byte[] b) {
+ for (int i = 0; i < a.size(); i++) {
+ if (a.get(i) != b[i]) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/ParseUtils.java b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/ParseUtils.java
new file mode 100644
index 0000000000..34612434bf
--- /dev/null
+++ b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/ParseUtils.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sedona.sql.datasources.osmpbf;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.util.zip.DataFormatException;
+import java.util.zip.Inflater;
+import org.apache.sedona.sql.datasources.osmpbf.build.Fileformat;
+
+public class ParseUtils {
+ public static DataInputStream dataInputStreamBlob(Fileformat.Blob blob)
+ throws DataFormatException {
+ if (!blob.getRaw().isEmpty()) {
+ return new DataInputStream(new ByteArrayInputStream(blob.getRaw().toByteArray()));
+ }
+
+ if (!blob.getZlibData().isEmpty()) {
+ Inflater inflater = new Inflater();
+ inflater.setInput(blob.getZlibData().toByteArray());
+ byte[] decompressedData = new byte[blob.getRawSize()];
+ inflater.inflate(decompressedData);
+ inflater.end();
+ return new DataInputStream(new ByteArrayInputStream(decompressedData));
+ }
+
+ throw new RuntimeException("Data not found even compressed.");
+ }
+}
diff --git a/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/StartEndStream.java b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/StartEndStream.java
new file mode 100644
index 0000000000..f9b848f809
--- /dev/null
+++ b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/StartEndStream.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sedona.sql.datasources.osmpbf;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public class StartEndStream extends TruncatedStream {
+ private long counter = 0L;
+ private long lengthLimit = 0L;
+
+ @Override
+ public boolean continueReading() {
+ return lengthLimit > counter;
+ }
+
+ @Override
+ public int read() throws IOException {
+ int result = super.read();
+ if (result != -1) counter += 1;
+ return result;
+ }
+
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException {
+ int result = super.read(b, off, len);
+ if (result != -1) counter += result;
+ return result;
+ }
+
+ @Override
+ public long skip(long n) throws IOException {
+ long skipped = super.skip(n);
+ counter += skipped;
+ return skipped;
+ }
+
+ public StartEndStream(InputStream in, long lengthLimit) {
+ super(in);
+ this.lengthLimit = lengthLimit;
+ }
+}
diff --git a/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/TruncatedStream.java b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/TruncatedStream.java
new file mode 100644
index 0000000000..88bba80abe
--- /dev/null
+++ b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/TruncatedStream.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sedona.sql.datasources.osmpbf;
+
+import java.io.FilterInputStream;
+import java.io.InputStream;
+
+public class TruncatedStream extends FilterInputStream {
+ protected TruncatedStream(InputStream in) {
+ super(in);
+ }
+
+ public boolean continueReading() {
+ return true;
+ }
+}
diff --git a/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/build/Fileformat.java b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/build/Fileformat.java
new file mode 100644
index 0000000000..eb54487a74
--- /dev/null
+++ b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/build/Fileformat.java
@@ -0,0 +1,2013 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sedona.sql.datasources.osmpbf.build;
+
+public final class Fileformat {
+ private Fileformat() {}
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ Fileformat.class.getName());
+ }
+
+ public static void registerAllExtensions(proto4.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(proto4.ExtensionRegistry registry) {
+ registerAllExtensions((proto4.ExtensionRegistryLite) registry);
+ }
+
+ public interface BlobOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:Blob)
+ proto4.MessageOrBuilder {
+
+ /**
+ *
+ *
+ * <pre>
+ * No compression
+ * </pre>
+ *
+ * <code>optional bytes raw = 1;</code>
+ *
+ * @return Whether the raw field is set.
+ */
+ boolean hasRaw();
+ /**
+ *
+ *
+ * <pre>
+ * No compression
+ * </pre>
+ *
+ * <code>optional bytes raw = 1;</code>
+ *
+ * @return The raw.
+ */
+ proto4.ByteString getRaw();
+
+ /**
+ *
+ *
+ * <pre>
+ * When compressed, the uncompressed size
+ * </pre>
+ *
+ * <code>optional int32 raw_size = 2;</code>
+ *
+ * @return Whether the rawSize field is set.
+ */
+ boolean hasRawSize();
+ /**
+ *
+ *
+ * <pre>
+ * When compressed, the uncompressed size
+ * </pre>
+ *
+ * <code>optional int32 raw_size = 2;</code>
+ *
+ * @return The rawSize.
+ */
+ int getRawSize();
+
+ /**
+ *
+ *
+ * <pre>
+ * Possible compressed versions of the data.
+ * </pre>
+ *
+ * <code>optional bytes zlib_data = 3;</code>
+ *
+ * @return Whether the zlibData field is set.
+ */
+ boolean hasZlibData();
+ /**
+ *
+ *
+ * <pre>
+ * Possible compressed versions of the data.
+ * </pre>
+ *
+ * <code>optional bytes zlib_data = 3;</code>
+ *
+ * @return The zlibData.
+ */
+ proto4.ByteString getZlibData();
+
+ /**
+ *
+ *
+ * <pre>
+ * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+ * </pre>
+ *
+ * <code>optional bytes lzma_data = 4;</code>
+ *
+ * @return Whether the lzmaData field is set.
+ */
+ boolean hasLzmaData();
+ /**
+ *
+ *
+ * <pre>
+ * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+ * </pre>
+ *
+ * <code>optional bytes lzma_data = 4;</code>
+ *
+ * @return The lzmaData.
+ */
+ proto4.ByteString getLzmaData();
+
+ /**
+ *
+ *
+ * <pre>
+ * Formerly used for bzip2 compressed data. Depreciated in 2010.
+ * </pre>
+ *
+ * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+ *
+ * @deprecated Blob.OBSOLETE_bzip2_data is deprecated. See
+ * main/java/org/apache/sedona/proto/fileformat.proto;l=32
+ * @return Whether the oBSOLETEBzip2Data field is set.
+ */
+ @Deprecated
+ boolean hasOBSOLETEBzip2Data();
+ /**
+ *
+ *
+ * <pre>
+ * Formerly used for bzip2 compressed data. Depreciated in 2010.
+ * </pre>
+ *
+ * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+ *
+ * @deprecated Blob.OBSOLETE_bzip2_data is deprecated. See
+ * main/java/org/apache/sedona/proto/fileformat.proto;l=32
+ * @return The oBSOLETEBzip2Data.
+ */
+ @Deprecated
+ proto4.ByteString getOBSOLETEBzip2Data();
+ }
+ /** Protobuf type {@code Blob} */
+ public static final class Blob extends proto4.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:Blob)
+ BlobOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ Blob.class.getName());
+ }
+ // Use Blob.newBuilder() to construct.
+ private Blob(proto4.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ }
+
+ private Blob() {
+ raw_ = proto4.ByteString.EMPTY;
+ zlibData_ = proto4.ByteString.EMPTY;
+ lzmaData_ = proto4.ByteString.EMPTY;
+ oBSOLETEBzip2Data_ = proto4.ByteString.EMPTY;
+ }
+
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_Blob_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_Blob_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(Fileformat.Blob.class, Fileformat.Blob.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int RAW_FIELD_NUMBER = 1;
+ private proto4.ByteString raw_ = proto4.ByteString.EMPTY;
+ /**
+ *
+ *
+ * <pre>
+ * No compression
+ * </pre>
+ *
+ * <code>optional bytes raw = 1;</code>
+ *
+ * @return Whether the raw field is set.
+ */
+ @Override
+ public boolean hasRaw() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * No compression
+ * </pre>
+ *
+ * <code>optional bytes raw = 1;</code>
+ *
+ * @return The raw.
+ */
+ @Override
+ public proto4.ByteString getRaw() {
+ return raw_;
+ }
+
+ public static final int RAW_SIZE_FIELD_NUMBER = 2;
+ private int rawSize_ = 0;
+ /**
+ *
+ *
+ * <pre>
+ * When compressed, the uncompressed size
+ * </pre>
+ *
+ * <code>optional int32 raw_size = 2;</code>
+ *
+ * @return Whether the rawSize field is set.
+ */
+ @Override
+ public boolean hasRawSize() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * When compressed, the uncompressed size
+ * </pre>
+ *
+ * <code>optional int32 raw_size = 2;</code>
+ *
+ * @return The rawSize.
+ */
+ @Override
+ public int getRawSize() {
+ return rawSize_;
+ }
+
+ public static final int ZLIB_DATA_FIELD_NUMBER = 3;
+ private proto4.ByteString zlibData_ = proto4.ByteString.EMPTY;
+ /**
+ *
+ *
+ * <pre>
+ * Possible compressed versions of the data.
+ * </pre>
+ *
+ * <code>optional bytes zlib_data = 3;</code>
+ *
+ * @return Whether the zlibData field is set.
+ */
+ @Override
+ public boolean hasZlibData() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * Possible compressed versions of the data.
+ * </pre>
+ *
+ * <code>optional bytes zlib_data = 3;</code>
+ *
+ * @return The zlibData.
+ */
+ @Override
+ public proto4.ByteString getZlibData() {
+ return zlibData_;
+ }
+
+ public static final int LZMA_DATA_FIELD_NUMBER = 4;
+ private proto4.ByteString lzmaData_ = proto4.ByteString.EMPTY;
+ /**
+ *
+ *
+ * <pre>
+ * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+ * </pre>
+ *
+ * <code>optional bytes lzma_data = 4;</code>
+ *
+ * @return Whether the lzmaData field is set.
+ */
+ @Override
+ public boolean hasLzmaData() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+ * </pre>
+ *
+ * <code>optional bytes lzma_data = 4;</code>
+ *
+ * @return The lzmaData.
+ */
+ @Override
+ public proto4.ByteString getLzmaData() {
+ return lzmaData_;
+ }
+
+ public static final int OBSOLETE_BZIP2_DATA_FIELD_NUMBER = 5;
+ private proto4.ByteString oBSOLETEBzip2Data_ = proto4.ByteString.EMPTY;
+ /**
+ *
+ *
+ * <pre>
+ * Formerly used for bzip2 compressed data. Depreciated in 2010.
+ * </pre>
+ *
+ * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+ *
+ * @deprecated Blob.OBSOLETE_bzip2_data is deprecated. See
+ * main/java/org/apache/sedona/proto/fileformat.proto;l=32
+ * @return Whether the oBSOLETEBzip2Data field is set.
+ */
+ @Override
+ @Deprecated
+ public boolean hasOBSOLETEBzip2Data() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * Formerly used for bzip2 compressed data. Depreciated in 2010.
+ * </pre>
+ *
+ * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+ *
+ * @deprecated Blob.OBSOLETE_bzip2_data is deprecated. See
+ * main/java/org/apache/sedona/proto/fileformat.proto;l=32
+ * @return The oBSOLETEBzip2Data.
+ */
+ @Override
+ @Deprecated
+ public proto4.ByteString getOBSOLETEBzip2Data() {
+ return oBSOLETEBzip2Data_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(proto4.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeBytes(1, raw_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeInt32(2, rawSize_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeBytes(3, zlibData_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeBytes(4, lzmaData_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeBytes(5, oBSOLETEBzip2Data_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += proto4.CodedOutputStream.computeBytesSize(1, raw_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += proto4.CodedOutputStream.computeInt32Size(2, rawSize_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += proto4.CodedOutputStream.computeBytesSize(3, zlibData_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += proto4.CodedOutputStream.computeBytesSize(4, lzmaData_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += proto4.CodedOutputStream.computeBytesSize(5, oBSOLETEBzip2Data_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Fileformat.Blob)) {
+ return super.equals(obj);
+ }
+ Fileformat.Blob other = (Fileformat.Blob) obj;
+
+ if (hasRaw() != other.hasRaw()) return false;
+ if (hasRaw()) {
+ if (!getRaw().equals(other.getRaw())) return false;
+ }
+ if (hasRawSize() != other.hasRawSize()) return false;
+ if (hasRawSize()) {
+ if (getRawSize() != other.getRawSize()) return false;
+ }
+ if (hasZlibData() != other.hasZlibData()) return false;
+ if (hasZlibData()) {
+ if (!getZlibData().equals(other.getZlibData())) return false;
+ }
+ if (hasLzmaData() != other.hasLzmaData()) return false;
+ if (hasLzmaData()) {
+ if (!getLzmaData().equals(other.getLzmaData())) return false;
+ }
+ if (hasOBSOLETEBzip2Data() != other.hasOBSOLETEBzip2Data()) return false;
+ if (hasOBSOLETEBzip2Data()) {
+ if (!getOBSOLETEBzip2Data().equals(other.getOBSOLETEBzip2Data())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasRaw()) {
+ hash = (37 * hash) + RAW_FIELD_NUMBER;
+ hash = (53 * hash) + getRaw().hashCode();
+ }
+ if (hasRawSize()) {
+ hash = (37 * hash) + RAW_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getRawSize();
+ }
+ if (hasZlibData()) {
+ hash = (37 * hash) + ZLIB_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getZlibData().hashCode();
+ }
+ if (hasLzmaData()) {
+ hash = (37 * hash) + LZMA_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getLzmaData().hashCode();
+ }
+ if (hasOBSOLETEBzip2Data()) {
+ hash = (37 * hash) + OBSOLETE_BZIP2_DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getOBSOLETEBzip2Data().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Fileformat.Blob parseFrom(java.nio.ByteBuffer data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Fileformat.Blob parseFrom(
+ java.nio.ByteBuffer data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Fileformat.Blob parseFrom(proto4.ByteString data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Fileformat.Blob parseFrom(
+ proto4.ByteString data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Fileformat.Blob parseFrom(byte[] data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Fileformat.Blob parseFrom(
+ byte[] data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Fileformat.Blob parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Fileformat.Blob parseFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Fileformat.Blob parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Fileformat.Blob parseDelimitedFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Fileformat.Blob parseFrom(proto4.CodedInputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Fileformat.Blob parseFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Fileformat.Blob prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /** Protobuf type {@code Blob} */
+ public static final class Builder extends proto4.GeneratedMessage.Builder<Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:Blob)
+ Fileformat.BlobOrBuilder {
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_Blob_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_Blob_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(Fileformat.Blob.class, Fileformat.Blob.Builder.class);
+ }
+
+ // Construct using Fileformat.Blob.newBuilder()
+ private Builder() {}
+
+ private Builder(BuilderParent parent) {
+ super(parent);
+ }
+
+ @Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ raw_ = proto4.ByteString.EMPTY;
+ rawSize_ = 0;
+ zlibData_ = proto4.ByteString.EMPTY;
+ lzmaData_ = proto4.ByteString.EMPTY;
+ oBSOLETEBzip2Data_ = proto4.ByteString.EMPTY;
+ return this;
+ }
+
+ @Override
+ public proto4.Descriptors.Descriptor getDescriptorForType() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_Blob_descriptor;
+ }
+
+ @Override
+ public Fileformat.Blob getDefaultInstanceForType() {
+ return Fileformat.Blob.getDefaultInstance();
+ }
+
+ @Override
+ public Fileformat.Blob build() {
+ Fileformat.Blob result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @Override
+ public Fileformat.Blob buildPartial() {
+ Fileformat.Blob result = new Fileformat.Blob(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(Fileformat.Blob result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.raw_ = raw_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.rawSize_ = rawSize_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.zlibData_ = zlibData_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.lzmaData_ = lzmaData_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.oBSOLETEBzip2Data_ = oBSOLETEBzip2Data_;
+ to_bitField0_ |= 0x00000010;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @Override
+ public Builder mergeFrom(proto4.Message other) {
+ if (other instanceof Fileformat.Blob) {
+ return mergeFrom((Fileformat.Blob) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Fileformat.Blob other) {
+ if (other == Fileformat.Blob.getDefaultInstance()) return this;
+ if (other.hasRaw()) {
+ setRaw(other.getRaw());
+ }
+ if (other.hasRawSize()) {
+ setRawSize(other.getRawSize());
+ }
+ if (other.hasZlibData()) {
+ setZlibData(other.getZlibData());
+ }
+ if (other.hasLzmaData()) {
+ setLzmaData(other.getLzmaData());
+ }
+ if (other.hasOBSOLETEBzip2Data()) {
+ setOBSOLETEBzip2Data(other.getOBSOLETEBzip2Data());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @Override
+ public Builder mergeFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ raw_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 16:
+ {
+ rawSize_ = input.readInt32();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 26:
+ {
+ zlibData_ = input.readBytes();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ case 34:
+ {
+ lzmaData_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 34
+ case 42:
+ {
+ oBSOLETEBzip2Data_ = input.readBytes();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 42
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private proto4.ByteString raw_ = proto4.ByteString.EMPTY;
+ /**
+ *
+ *
+ * <pre>
+ * No compression
+ * </pre>
+ *
+ * <code>optional bytes raw = 1;</code>
+ *
+ * @return Whether the raw field is set.
+ */
+ @Override
+ public boolean hasRaw() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * No compression
+ * </pre>
+ *
+ * <code>optional bytes raw = 1;</code>
+ *
+ * @return The raw.
+ */
+ @Override
+ public proto4.ByteString getRaw() {
+ return raw_;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * No compression
+ * </pre>
+ *
+ * <code>optional bytes raw = 1;</code>
+ *
+ * @param value The raw to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRaw(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ raw_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * No compression
+ * </pre>
+ *
+ * <code>optional bytes raw = 1;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRaw() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ raw_ = getDefaultInstance().getRaw();
+ onChanged();
+ return this;
+ }
+
+ private int rawSize_;
+ /**
+ *
+ *
+ * <pre>
+ * When compressed, the uncompressed size
+ * </pre>
+ *
+ * <code>optional int32 raw_size = 2;</code>
+ *
+ * @return Whether the rawSize field is set.
+ */
+ @Override
+ public boolean hasRawSize() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * When compressed, the uncompressed size
+ * </pre>
+ *
+ * <code>optional int32 raw_size = 2;</code>
+ *
+ * @return The rawSize.
+ */
+ @Override
+ public int getRawSize() {
+ return rawSize_;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * When compressed, the uncompressed size
+ * </pre>
+ *
+ * <code>optional int32 raw_size = 2;</code>
+ *
+ * @param value The rawSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRawSize(int value) {
+
+ rawSize_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * When compressed, the uncompressed size
+ * </pre>
+ *
+ * <code>optional int32 raw_size = 2;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRawSize() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ rawSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private proto4.ByteString zlibData_ = proto4.ByteString.EMPTY;
+ /**
+ *
+ *
+ * <pre>
+ * Possible compressed versions of the data.
+ * </pre>
+ *
+ * <code>optional bytes zlib_data = 3;</code>
+ *
+ * @return Whether the zlibData field is set.
+ */
+ @Override
+ public boolean hasZlibData() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * Possible compressed versions of the data.
+ * </pre>
+ *
+ * <code>optional bytes zlib_data = 3;</code>
+ *
+ * @return The zlibData.
+ */
+ @Override
+ public proto4.ByteString getZlibData() {
+ return zlibData_;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * Possible compressed versions of the data.
+ * </pre>
+ *
+ * <code>optional bytes zlib_data = 3;</code>
+ *
+ * @param value The zlibData to set.
+ * @return This builder for chaining.
+ */
+ public Builder setZlibData(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ zlibData_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * Possible compressed versions of the data.
+ * </pre>
+ *
+ * <code>optional bytes zlib_data = 3;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearZlibData() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ zlibData_ = getDefaultInstance().getZlibData();
+ onChanged();
+ return this;
+ }
+
+ private proto4.ByteString lzmaData_ = proto4.ByteString.EMPTY;
+ /**
+ *
+ *
+ * <pre>
+ * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+ * </pre>
+ *
+ * <code>optional bytes lzma_data = 4;</code>
+ *
+ * @return Whether the lzmaData field is set.
+ */
+ @Override
+ public boolean hasLzmaData() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+ * </pre>
+ *
+ * <code>optional bytes lzma_data = 4;</code>
+ *
+ * @return The lzmaData.
+ */
+ @Override
+ public proto4.ByteString getLzmaData() {
+ return lzmaData_;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+ * </pre>
+ *
+ * <code>optional bytes lzma_data = 4;</code>
+ *
+ * @param value The lzmaData to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLzmaData(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ lzmaData_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
+ * </pre>
+ *
+ * <code>optional bytes lzma_data = 4;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearLzmaData() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ lzmaData_ = getDefaultInstance().getLzmaData();
+ onChanged();
+ return this;
+ }
+
+ private proto4.ByteString oBSOLETEBzip2Data_ = proto4.ByteString.EMPTY;
+ /**
+ *
+ *
+ * <pre>
+ * Formerly used for bzip2 compressed data. Depreciated in 2010.
+ * </pre>
+ *
+ * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+ *
+ * @deprecated Blob.OBSOLETE_bzip2_data is deprecated. See
+ * main/java/org/apache/sedona/proto/fileformat.proto;l=32
+ * @return Whether the oBSOLETEBzip2Data field is set.
+ */
+ @Override
+ @Deprecated
+ public boolean hasOBSOLETEBzip2Data() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ *
+ * <pre>
+ * Formerly used for bzip2 compressed data. Depreciated in 2010.
+ * </pre>
+ *
+ * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+ *
+ * @deprecated Blob.OBSOLETE_bzip2_data is deprecated. See
+ * main/java/org/apache/sedona/proto/fileformat.proto;l=32
+ * @return The oBSOLETEBzip2Data.
+ */
+ @Override
+ @Deprecated
+ public proto4.ByteString getOBSOLETEBzip2Data() {
+ return oBSOLETEBzip2Data_;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * Formerly used for bzip2 compressed data. Depreciated in 2010.
+ * </pre>
+ *
+ * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+ *
+ * @param value The oBSOLETEBzip2Data to set.
+ * @return This builder for chaining.
+ */
+ @Deprecated
+ public Builder setOBSOLETEBzip2Data(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ oBSOLETEBzip2Data_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * <pre>
+ * Formerly used for bzip2 compressed data. Depreciated in 2010.
+ * </pre>
+ *
+ * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code>
+ *
+ * @return This builder for chaining.
+ */
+ @Deprecated
+ public Builder clearOBSOLETEBzip2Data() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ oBSOLETEBzip2Data_ = getDefaultInstance().getOBSOLETEBzip2Data();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:Blob)
+ }
+
+ // @@protoc_insertion_point(class_scope:Blob)
+ private static final Fileformat.Blob DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Fileformat.Blob();
+ }
+
+ public static Fileformat.Blob getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final proto4.Parser<Blob> PARSER =
+ new proto4.AbstractParser<Blob>() {
+ @Override
+ public Blob parsePartialFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (proto4.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new proto4.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static proto4.Parser<Blob> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public proto4.Parser<Blob> getParserForType() {
+ return PARSER;
+ }
+
+ @Override
+ public Fileformat.Blob getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface BlobHeaderOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:BlobHeader)
+ proto4.MessageOrBuilder {
+
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return Whether the type field is set.
+ */
+ boolean hasType();
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return The type.
+ */
+ String getType();
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return The bytes for type.
+ */
+ proto4.ByteString getTypeBytes();
+
+ /**
+ * <code>optional bytes indexdata = 2;</code>
+ *
+ * @return Whether the indexdata field is set.
+ */
+ boolean hasIndexdata();
+ /**
+ * <code>optional bytes indexdata = 2;</code>
+ *
+ * @return The indexdata.
+ */
+ proto4.ByteString getIndexdata();
+
+ /**
+ * <code>required int32 datasize = 3;</code>
+ *
+ * @return Whether the datasize field is set.
+ */
+ boolean hasDatasize();
+ /**
+ * <code>required int32 datasize = 3;</code>
+ *
+ * @return The datasize.
+ */
+ int getDatasize();
+ }
+ /** Protobuf type {@code BlobHeader} */
+ public static final class BlobHeader extends proto4.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:BlobHeader)
+ BlobHeaderOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ BlobHeader.class.getName());
+ }
+ // Use BlobHeader.newBuilder() to construct.
+ private BlobHeader(proto4.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ }
+
+ private BlobHeader() {
+ type_ = "";
+ indexdata_ = proto4.ByteString.EMPTY;
+ }
+
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_BlobHeader_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_BlobHeader_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Fileformat.BlobHeader.class, Fileformat.BlobHeader.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int TYPE_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private volatile Object type_ = "";
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return Whether the type field is set.
+ */
+ @Override
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return The type.
+ */
+ @Override
+ public String getType() {
+ Object ref = type_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ proto4.ByteString bs = (proto4.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ type_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return The bytes for type.
+ */
+ @Override
+ public proto4.ByteString getTypeBytes() {
+ Object ref = type_;
+ if (ref instanceof String) {
+ proto4.ByteString b = proto4.ByteString.copyFromUtf8((String) ref);
+ type_ = b;
+ return b;
+ } else {
+ return (proto4.ByteString) ref;
+ }
+ }
+
+ public static final int INDEXDATA_FIELD_NUMBER = 2;
+ private proto4.ByteString indexdata_ = proto4.ByteString.EMPTY;
+ /**
+ * <code>optional bytes indexdata = 2;</code>
+ *
+ * @return Whether the indexdata field is set.
+ */
+ @Override
+ public boolean hasIndexdata() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * <code>optional bytes indexdata = 2;</code>
+ *
+ * @return The indexdata.
+ */
+ @Override
+ public proto4.ByteString getIndexdata() {
+ return indexdata_;
+ }
+
+ public static final int DATASIZE_FIELD_NUMBER = 3;
+ private int datasize_ = 0;
+ /**
+ * <code>required int32 datasize = 3;</code>
+ *
+ * @return Whether the datasize field is set.
+ */
+ @Override
+ public boolean hasDatasize() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * <code>required int32 datasize = 3;</code>
+ *
+ * @return The datasize.
+ */
+ @Override
+ public int getDatasize() {
+ return datasize_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasType()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasDatasize()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(proto4.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ proto4.GeneratedMessage.writeString(output, 1, type_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeBytes(2, indexdata_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeInt32(3, datasize_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += proto4.GeneratedMessage.computeStringSize(1, type_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += proto4.CodedOutputStream.computeBytesSize(2, indexdata_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += proto4.CodedOutputStream.computeInt32Size(3, datasize_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Fileformat.BlobHeader)) {
+ return super.equals(obj);
+ }
+ Fileformat.BlobHeader other = (Fileformat.BlobHeader) obj;
+
+ if (hasType() != other.hasType()) return false;
+ if (hasType()) {
+ if (!getType().equals(other.getType())) return false;
+ }
+ if (hasIndexdata() != other.hasIndexdata()) return false;
+ if (hasIndexdata()) {
+ if (!getIndexdata().equals(other.getIndexdata())) return false;
+ }
+ if (hasDatasize() != other.hasDatasize()) return false;
+ if (hasDatasize()) {
+ if (getDatasize() != other.getDatasize()) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasType()) {
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getType().hashCode();
+ }
+ if (hasIndexdata()) {
+ hash = (37 * hash) + INDEXDATA_FIELD_NUMBER;
+ hash = (53 * hash) + getIndexdata().hashCode();
+ }
+ if (hasDatasize()) {
+ hash = (37 * hash) + DATASIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getDatasize();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Fileformat.BlobHeader parseFrom(java.nio.ByteBuffer data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Fileformat.BlobHeader parseFrom(
+ java.nio.ByteBuffer data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Fileformat.BlobHeader parseFrom(proto4.ByteString data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Fileformat.BlobHeader parseFrom(
+ proto4.ByteString data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Fileformat.BlobHeader parseFrom(byte[] data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Fileformat.BlobHeader parseFrom(
+ byte[] data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Fileformat.BlobHeader parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Fileformat.BlobHeader parseFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Fileformat.BlobHeader parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Fileformat.BlobHeader parseDelimitedFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Fileformat.BlobHeader parseFrom(proto4.CodedInputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Fileformat.BlobHeader parseFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Fileformat.BlobHeader prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /** Protobuf type {@code BlobHeader} */
+ public static final class Builder extends proto4.GeneratedMessage.Builder<Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:BlobHeader)
+ Fileformat.BlobHeaderOrBuilder {
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_BlobHeader_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_BlobHeader_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Fileformat.BlobHeader.class, Fileformat.BlobHeader.Builder.class);
+ }
+
+ // Construct using Fileformat.BlobHeader.newBuilder()
+ private Builder() {}
+
+ private Builder(BuilderParent parent) {
+ super(parent);
+ }
+
+ @Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ type_ = "";
+ indexdata_ = proto4.ByteString.EMPTY;
+ datasize_ = 0;
+ return this;
+ }
+
+ @Override
+ public proto4.Descriptors.Descriptor getDescriptorForType() {
+ return Fileformat.internal_static_org_apache_sedona_osm_build_BlobHeader_descriptor;
+ }
+
+ @Override
+ public Fileformat.BlobHeader getDefaultInstanceForType() {
+ return Fileformat.BlobHeader.getDefaultInstance();
+ }
+
+ @Override
+ public Fileformat.BlobHeader build() {
+ Fileformat.BlobHeader result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @Override
+ public Fileformat.BlobHeader buildPartial() {
+ Fileformat.BlobHeader result = new Fileformat.BlobHeader(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(Fileformat.BlobHeader result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.type_ = type_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.indexdata_ = indexdata_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.datasize_ = datasize_;
+ to_bitField0_ |= 0x00000004;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @Override
+ public Builder mergeFrom(proto4.Message other) {
+ if (other instanceof Fileformat.BlobHeader) {
+ return mergeFrom((Fileformat.BlobHeader) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Fileformat.BlobHeader other) {
+ if (other == Fileformat.BlobHeader.getDefaultInstance()) return this;
+ if (other.hasType()) {
+ type_ = other.type_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (other.hasIndexdata()) {
+ setIndexdata(other.getIndexdata());
+ }
+ if (other.hasDatasize()) {
+ setDatasize(other.getDatasize());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final boolean isInitialized() {
+ if (!hasType()) {
+ return false;
+ }
+ if (!hasDatasize()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public Builder mergeFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ type_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18:
+ {
+ indexdata_ = input.readBytes();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 24:
+ {
+ datasize_ = input.readInt32();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private Object type_ = "";
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return Whether the type field is set.
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return The type.
+ */
+ public String getType() {
+ Object ref = type_;
+ if (!(ref instanceof String)) {
+ proto4.ByteString bs = (proto4.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ type_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return The bytes for type.
+ */
+ public proto4.ByteString getTypeBytes() {
+ Object ref = type_;
+ if (ref instanceof String) {
+ proto4.ByteString b = proto4.ByteString.copyFromUtf8((String) ref);
+ type_ = b;
+ return b;
+ } else {
+ return (proto4.ByteString) ref;
+ }
+ }
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @param value The type to set.
+ * @return This builder for chaining.
+ */
+ public Builder setType(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearType() {
+ type_ = getDefaultInstance().getType();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required string type = 1;</code>
+ *
+ * @param value The bytes for type to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTypeBytes(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private proto4.ByteString indexdata_ = proto4.ByteString.EMPTY;
+ /**
+ * <code>optional bytes indexdata = 2;</code>
+ *
+ * @return Whether the indexdata field is set.
+ */
+ @Override
+ public boolean hasIndexdata() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ * <code>optional bytes indexdata = 2;</code>
+ *
+ * @return The indexdata.
+ */
+ @Override
+ public proto4.ByteString getIndexdata() {
+ return indexdata_;
+ }
+ /**
+ * <code>optional bytes indexdata = 2;</code>
+ *
+ * @param value The indexdata to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIndexdata(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ indexdata_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional bytes indexdata = 2;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearIndexdata() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ indexdata_ = getDefaultInstance().getIndexdata();
+ onChanged();
+ return this;
+ }
+
+ private int datasize_;
+ /**
+ * <code>required int32 datasize = 3;</code>
+ *
+ * @return Whether the datasize field is set.
+ */
+ @Override
+ public boolean hasDatasize() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ * <code>required int32 datasize = 3;</code>
+ *
+ * @return The datasize.
+ */
+ @Override
+ public int getDatasize() {
+ return datasize_;
+ }
+ /**
+ * <code>required int32 datasize = 3;</code>
+ *
+ * @param value The datasize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDatasize(int value) {
+
+ datasize_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required int32 datasize = 3;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDatasize() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ datasize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:BlobHeader)
+ }
+
+ // @@protoc_insertion_point(class_scope:BlobHeader)
+ private static final Fileformat.BlobHeader DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Fileformat.BlobHeader();
+ }
+
+ public static Fileformat.BlobHeader getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final proto4.Parser<BlobHeader> PARSER =
+ new proto4.AbstractParser<BlobHeader>() {
+ @Override
+ public BlobHeader parsePartialFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (proto4.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new proto4.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static proto4.Parser<BlobHeader> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public proto4.Parser<BlobHeader> getParserForType() {
+ return PARSER;
+ }
+
+ @Override
+ public Fileformat.BlobHeader getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ private static final proto4.Descriptors.Descriptor
+ internal_static_org_apache_sedona_osm_build_Blob_descriptor;
+ private static final proto4.GeneratedMessage.FieldAccessorTable
+ internal_static_org_apache_sedona_osm_build_Blob_fieldAccessorTable;
+ private static final proto4.Descriptors.Descriptor
+ internal_static_org_apache_sedona_osm_build_BlobHeader_descriptor;
+ private static final proto4.GeneratedMessage.FieldAccessorTable
+ internal_static_org_apache_sedona_osm_build_BlobHeader_fieldAccessorTable;
+
+ public static proto4.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static proto4.Descriptors.FileDescriptor descriptor;
+
+ static {
+ String[] descriptorData = {
+ "\n2main/java/org/apache/sedona/proto/file"
+ + "format.proto\022\033org.apache.sedona.osm.buil"
+ + "d\"l\n\004Blob\022\013\n\003raw\030\001 \001(\014\022\020\n\010raw_size\030\002 \001(\005"
+ + "\022\021\n\tzlib_data\030\003 \001(\014\022\021\n\tlzma_data\030\004 \001(\014\022\037"
+ + "\n\023OBSOLETE_bzip2_data\030\005 \001(\014B\002\030\001\"?\n\nBlobH"
+ + "eader\022\014\n\004type\030\001 \002(\t\022\021\n\tindexdata\030\002 \001(\014\022\020"
+ + "\n\010datasize\030\003 \002(\005B\002H\003"
+ };
+ descriptor =
+ proto4.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData, new proto4.Descriptors.FileDescriptor[] {});
+ internal_static_org_apache_sedona_osm_build_Blob_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_org_apache_sedona_osm_build_Blob_fieldAccessorTable =
+ new proto4.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_apache_sedona_osm_build_Blob_descriptor,
+ new String[] {
+ "Raw", "RawSize", "ZlibData", "LzmaData", "OBSOLETEBzip2Data",
+ });
+ internal_static_org_apache_sedona_osm_build_BlobHeader_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_org_apache_sedona_osm_build_BlobHeader_fieldAccessorTable =
+ new proto4.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_apache_sedona_osm_build_BlobHeader_descriptor,
+ new String[] {
+ "Type", "Indexdata", "Datasize",
+ });
+ descriptor.resolveAllFeaturesImmutable();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/build/Osmformat.java b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/build/Osmformat.java
new file mode 100644
index 0000000000..0eb54ea8f4
--- /dev/null
+++ b/spark/common/src/main/java/org/apache/sedona/sql/datasources/osmpbf/build/Osmformat.java
@@ -0,0 +1,18306 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sedona.sql.datasources.osmpbf.build;
+
+public final class Osmformat {
+ private Osmformat() {}
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ Osmformat.class.getName());
+ }
+
+ public static void registerAllExtensions(proto4.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(proto4.ExtensionRegistry registry) {
+ registerAllExtensions((proto4.ExtensionRegistryLite) registry);
+ }
+
+ public interface HeaderBlockOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:HeaderBlock)
+ proto4.MessageOrBuilder {
+
+ /**
+ * <code>optional .HeaderBBox bbox = 1;</code>
+ *
+ * @return Whether the bbox field is set.
+ */
+ boolean hasBbox();
+
+ /**
+ * <code>optional .HeaderBBox bbox = 1;</code>
+ *
+ * @return The bbox.
+ */
+ Osmformat.HeaderBBox getBbox();
+
+ /** <code>optional .HeaderBBox bbox = 1;</code> */
+ Osmformat.HeaderBBoxOrBuilder getBboxOrBuilder();
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @return A list containing the requiredFeatures.
+ */
+ java.util.List<String> getRequiredFeaturesList();
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @return The count of requiredFeatures.
+ */
+ int getRequiredFeaturesCount();
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @param index The index of the element to return.
+ * @return The requiredFeatures at the given index.
+ */
+ String getRequiredFeatures(int index);
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the requiredFeatures at the given index.
+ */
+ proto4.ByteString getRequiredFeaturesBytes(int index);
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @return A list containing the optionalFeatures.
+ */
+ java.util.List<String> getOptionalFeaturesList();
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @return The count of optionalFeatures.
+ */
+ int getOptionalFeaturesCount();
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param index The index of the element to return.
+ * @return The optionalFeatures at the given index.
+ */
+ String getOptionalFeatures(int index);
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the optionalFeatures at the given index.
+ */
+ proto4.ByteString getOptionalFeaturesBytes(int index);
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return Whether the writingprogram field is set.
+ */
+ boolean hasWritingprogram();
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return The writingprogram.
+ */
+ String getWritingprogram();
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return The bytes for writingprogram.
+ */
+ proto4.ByteString getWritingprogramBytes();
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return Whether the source field is set.
+ */
+ boolean hasSource();
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return The source.
+ */
+ String getSource();
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return The bytes for source.
+ */
+ proto4.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>
+ *
+ * @return Whether the osmosisReplicationTimestamp field is set.
+ */
+ 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>
+ *
+ * @return The osmosisReplicationTimestamp.
+ */
+ long getOsmosisReplicationTimestamp();
+
+ /**
+ *
+ *
+ * <pre>
+ * replication sequence number (sequenceNumber in state.txt)
+ * </pre>
+ *
+ * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+ *
+ * @return Whether the osmosisReplicationSequenceNumber field is set.
+ */
+ boolean hasOsmosisReplicationSequenceNumber();
+
+ /**
+ *
+ *
+ * <pre>
+ * replication sequence number (sequenceNumber in state.txt)
+ * </pre>
+ *
+ * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+ *
+ * @return The osmosisReplicationSequenceNumber.
+ */
+ long getOsmosisReplicationSequenceNumber();
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return Whether the osmosisReplicationBaseUrl field is set.
+ */
+ boolean hasOsmosisReplicationBaseUrl();
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return The osmosisReplicationBaseUrl.
+ */
+ String getOsmosisReplicationBaseUrl();
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return The bytes for osmosisReplicationBaseUrl.
+ */
+ proto4.ByteString getOsmosisReplicationBaseUrlBytes();
+ }
+
+ /** Protobuf type {@code HeaderBlock} */
+ public static final class HeaderBlock extends proto4.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:HeaderBlock)
+ HeaderBlockOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ HeaderBlock.class.getName());
+ }
+
+ // Use HeaderBlock.newBuilder() to construct.
+ private HeaderBlock(proto4.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ }
+
+ private HeaderBlock() {
+ requiredFeatures_ = proto4.LazyStringArrayList.emptyList();
+ optionalFeatures_ = proto4.LazyStringArrayList.emptyList();
+ writingprogram_ = "";
+ source_ = "";
+ osmosisReplicationBaseUrl_ = "";
+ }
+
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBlock_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBlock_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.HeaderBlock.class, Osmformat.HeaderBlock.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int BBOX_FIELD_NUMBER = 1;
+ private Osmformat.HeaderBBox bbox_;
+
+ /**
+ * <code>optional .HeaderBBox bbox = 1;</code>
+ *
+ * @return Whether the bbox field is set.
+ */
+ @Override
+ public boolean hasBbox() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ * <code>optional .HeaderBBox bbox = 1;</code>
+ *
+ * @return The bbox.
+ */
+ @Override
+ public Osmformat.HeaderBBox getBbox() {
+ return bbox_ == null ? Osmformat.HeaderBBox.getDefaultInstance() : bbox_;
+ }
+
+ /** <code>optional .HeaderBBox bbox = 1;</code> */
+ @Override
+ public Osmformat.HeaderBBoxOrBuilder getBboxOrBuilder() {
+ return bbox_ == null ? Osmformat.HeaderBBox.getDefaultInstance() : bbox_;
+ }
+
+ public static final int REQUIRED_FEATURES_FIELD_NUMBER = 4;
+
+ @SuppressWarnings("serial")
+ private proto4.LazyStringArrayList requiredFeatures_ = proto4.LazyStringArrayList.emptyList();
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @return A list containing the requiredFeatures.
+ */
+ public proto4.ProtocolStringList getRequiredFeaturesList() {
+ return requiredFeatures_;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @return The count of requiredFeatures.
+ */
+ public int getRequiredFeaturesCount() {
+ return requiredFeatures_.size();
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @param index The index of the element to return.
+ * @return The requiredFeatures at the given index.
+ */
+ public 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>
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the requiredFeatures at the given index.
+ */
+ public proto4.ByteString getRequiredFeaturesBytes(int index) {
+ return requiredFeatures_.getByteString(index);
+ }
+
+ public static final int OPTIONAL_FEATURES_FIELD_NUMBER = 5;
+
+ @SuppressWarnings("serial")
+ private proto4.LazyStringArrayList optionalFeatures_ = proto4.LazyStringArrayList.emptyList();
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @return A list containing the optionalFeatures.
+ */
+ public proto4.ProtocolStringList getOptionalFeaturesList() {
+ return optionalFeatures_;
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @return The count of optionalFeatures.
+ */
+ public int getOptionalFeaturesCount() {
+ return optionalFeatures_.size();
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param index The index of the element to return.
+ * @return The optionalFeatures at the given index.
+ */
+ public String getOptionalFeatures(int index) {
+ return optionalFeatures_.get(index);
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the optionalFeatures at the given index.
+ */
+ public proto4.ByteString getOptionalFeaturesBytes(int index) {
+ return optionalFeatures_.getByteString(index);
+ }
+
+ public static final int WRITINGPROGRAM_FIELD_NUMBER = 16;
+
+ @SuppressWarnings("serial")
+ private volatile Object writingprogram_ = "";
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return Whether the writingprogram field is set.
+ */
+ @Override
+ public boolean hasWritingprogram() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return The writingprogram.
+ */
+ @Override
+ public String getWritingprogram() {
+ Object ref = writingprogram_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ proto4.ByteString bs = (proto4.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ writingprogram_ = s;
+ }
+ return s;
+ }
+ }
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return The bytes for writingprogram.
+ */
+ @Override
+ public proto4.ByteString getWritingprogramBytes() {
+ Object ref = writingprogram_;
+ if (ref instanceof String) {
+ proto4.ByteString b = proto4.ByteString.copyFromUtf8((String) ref);
+ writingprogram_ = b;
+ return b;
+ } else {
+ return (proto4.ByteString) ref;
+ }
+ }
+
+ public static final int SOURCE_FIELD_NUMBER = 17;
+
+ @SuppressWarnings("serial")
+ private volatile Object source_ = "";
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return Whether the source field is set.
+ */
+ @Override
+ public boolean hasSource() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return The source.
+ */
+ @Override
+ public String getSource() {
+ Object ref = source_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ proto4.ByteString bs = (proto4.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ source_ = s;
+ }
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return The bytes for source.
+ */
+ @Override
+ public proto4.ByteString getSourceBytes() {
+ Object ref = source_;
+ if (ref instanceof String) {
+ proto4.ByteString b = proto4.ByteString.copyFromUtf8((String) ref);
+ source_ = b;
+ return b;
+ } else {
+ return (proto4.ByteString) ref;
+ }
+ }
+
+ public static final int OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER = 32;
+ private long osmosisReplicationTimestamp_ = 0L;
+
+ /**
+ *
+ *
+ * <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>
+ *
+ * @return Whether the osmosisReplicationTimestamp field is set.
+ */
+ @Override
+ public boolean hasOsmosisReplicationTimestamp() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+
+ /**
+ *
+ *
+ * <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>
+ *
+ * @return The osmosisReplicationTimestamp.
+ */
+ @Override
+ public long getOsmosisReplicationTimestamp() {
+ return osmosisReplicationTimestamp_;
+ }
+
+ public static final int OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER = 33;
+ private long osmosisReplicationSequenceNumber_ = 0L;
+
+ /**
+ *
+ *
+ * <pre>
+ * replication sequence number (sequenceNumber in state.txt)
+ * </pre>
+ *
+ * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+ *
+ * @return Whether the osmosisReplicationSequenceNumber field is set.
+ */
+ @Override
+ public boolean hasOsmosisReplicationSequenceNumber() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication sequence number (sequenceNumber in state.txt)
+ * </pre>
+ *
+ * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+ *
+ * @return The osmosisReplicationSequenceNumber.
+ */
+ @Override
+ public long getOsmosisReplicationSequenceNumber() {
+ return osmosisReplicationSequenceNumber_;
+ }
+
+ public static final int OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER = 34;
+
+ @SuppressWarnings("serial")
+ private volatile Object osmosisReplicationBaseUrl_ = "";
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return Whether the osmosisReplicationBaseUrl field is set.
+ */
+ @Override
+ public boolean hasOsmosisReplicationBaseUrl() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return The osmosisReplicationBaseUrl.
+ */
+ @Override
+ public String getOsmosisReplicationBaseUrl() {
+ Object ref = osmosisReplicationBaseUrl_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ proto4.ByteString bs = (proto4.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ osmosisReplicationBaseUrl_ = s;
+ }
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return The bytes for osmosisReplicationBaseUrl.
+ */
+ @Override
+ public proto4.ByteString getOsmosisReplicationBaseUrlBytes() {
+ Object ref = osmosisReplicationBaseUrl_;
+ if (ref instanceof String) {
+ proto4.ByteString b = proto4.ByteString.copyFromUtf8((String) ref);
+ osmosisReplicationBaseUrl_ = b;
+ return b;
+ } else {
+ return (proto4.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (hasBbox()) {
+ if (!getBbox().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(proto4.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getBbox());
+ }
+ for (int i = 0; i < requiredFeatures_.size(); i++) {
+ proto4.GeneratedMessage.writeString(output, 4, requiredFeatures_.getRaw(i));
+ }
+ for (int i = 0; i < optionalFeatures_.size(); i++) {
+ proto4.GeneratedMessage.writeString(output, 5, optionalFeatures_.getRaw(i));
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ proto4.GeneratedMessage.writeString(output, 16, writingprogram_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ proto4.GeneratedMessage.writeString(output, 17, source_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeInt64(32, osmosisReplicationTimestamp_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeInt64(33, osmosisReplicationSequenceNumber_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ proto4.GeneratedMessage.writeString(output, 34, osmosisReplicationBaseUrl_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += proto4.CodedOutputStream.computeMessageSize(1, getBbox());
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < requiredFeatures_.size(); i++) {
+ dataSize += computeStringSizeNoTag(requiredFeatures_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getRequiredFeaturesList().size();
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < optionalFeatures_.size(); i++) {
+ dataSize += computeStringSizeNoTag(optionalFeatures_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getOptionalFeaturesList().size();
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += proto4.GeneratedMessage.computeStringSize(16, writingprogram_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += proto4.GeneratedMessage.computeStringSize(17, source_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += proto4.CodedOutputStream.computeInt64Size(32, osmosisReplicationTimestamp_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += proto4.CodedOutputStream.computeInt64Size(33, osmosisReplicationSequenceNumber_);
+ }
+ if (((bitField0_ & 0x00000020) != 0)) {
+ size += proto4.GeneratedMessage.computeStringSize(34, osmosisReplicationBaseUrl_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Osmformat.HeaderBlock)) {
+ return super.equals(obj);
+ }
+ Osmformat.HeaderBlock other = (Osmformat.HeaderBlock) obj;
+
+ if (hasBbox() != other.hasBbox()) return false;
+ if (hasBbox()) {
+ if (!getBbox().equals(other.getBbox())) return false;
+ }
+ if (!getRequiredFeaturesList().equals(other.getRequiredFeaturesList())) return false;
+ if (!getOptionalFeaturesList().equals(other.getOptionalFeaturesList())) return false;
+ if (hasWritingprogram() != other.hasWritingprogram()) return false;
+ if (hasWritingprogram()) {
+ if (!getWritingprogram().equals(other.getWritingprogram())) return false;
+ }
+ if (hasSource() != other.hasSource()) return false;
+ if (hasSource()) {
+ if (!getSource().equals(other.getSource())) return false;
+ }
+ if (hasOsmosisReplicationTimestamp() != other.hasOsmosisReplicationTimestamp()) return false;
+ if (hasOsmosisReplicationTimestamp()) {
+ if (getOsmosisReplicationTimestamp() != other.getOsmosisReplicationTimestamp())
+ return false;
+ }
+ if (hasOsmosisReplicationSequenceNumber() != other.hasOsmosisReplicationSequenceNumber())
+ return false;
+ if (hasOsmosisReplicationSequenceNumber()) {
+ if (getOsmosisReplicationSequenceNumber() != other.getOsmosisReplicationSequenceNumber())
+ return false;
+ }
+ if (hasOsmosisReplicationBaseUrl() != other.hasOsmosisReplicationBaseUrl()) return false;
+ if (hasOsmosisReplicationBaseUrl()) {
+ if (!getOsmosisReplicationBaseUrl().equals(other.getOsmosisReplicationBaseUrl()))
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasBbox()) {
+ hash = (37 * hash) + BBOX_FIELD_NUMBER;
+ hash = (53 * hash) + getBbox().hashCode();
+ }
+ if (getRequiredFeaturesCount() > 0) {
+ hash = (37 * hash) + REQUIRED_FEATURES_FIELD_NUMBER;
+ hash = (53 * hash) + getRequiredFeaturesList().hashCode();
+ }
+ if (getOptionalFeaturesCount() > 0) {
+ hash = (37 * hash) + OPTIONAL_FEATURES_FIELD_NUMBER;
+ hash = (53 * hash) + getOptionalFeaturesList().hashCode();
+ }
+ if (hasWritingprogram()) {
+ hash = (37 * hash) + WRITINGPROGRAM_FIELD_NUMBER;
+ hash = (53 * hash) + getWritingprogram().hashCode();
+ }
+ if (hasSource()) {
+ hash = (37 * hash) + SOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getSource().hashCode();
+ }
+ if (hasOsmosisReplicationTimestamp()) {
+ hash = (37 * hash) + OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + proto4.Internal.hashLong(getOsmosisReplicationTimestamp());
+ }
+ if (hasOsmosisReplicationSequenceNumber()) {
+ hash = (37 * hash) + OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER;
+ hash = (53 * hash) + proto4.Internal.hashLong(getOsmosisReplicationSequenceNumber());
+ }
+ if (hasOsmosisReplicationBaseUrl()) {
+ hash = (37 * hash) + OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER;
+ hash = (53 * hash) + getOsmosisReplicationBaseUrl().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(java.nio.ByteBuffer data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(
+ java.nio.ByteBuffer data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(proto4.ByteString data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(
+ proto4.ByteString data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(byte[] data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(
+ byte[] data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBlock parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.HeaderBlock parseDelimitedFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(proto4.CodedInputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.HeaderBlock parseFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Osmformat.HeaderBlock prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code HeaderBlock} */
+ public static final class Builder extends proto4.GeneratedMessage.Builder<Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:HeaderBlock)
+ Osmformat.HeaderBlockOrBuilder {
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBlock_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBlock_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.HeaderBlock.class, Osmformat.HeaderBlock.Builder.class);
+ }
+
+ // Construct using Osmformat.HeaderBlock.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (proto4.GeneratedMessage.alwaysUseFieldBuilders) {
+ getBboxFieldBuilder();
+ }
+ }
+
+ @Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ bbox_ = null;
+ if (bboxBuilder_ != null) {
+ bboxBuilder_.dispose();
+ bboxBuilder_ = null;
+ }
+ requiredFeatures_ = proto4.LazyStringArrayList.emptyList();
+ optionalFeatures_ = proto4.LazyStringArrayList.emptyList();
+ writingprogram_ = "";
+ source_ = "";
+ osmosisReplicationTimestamp_ = 0L;
+ osmosisReplicationSequenceNumber_ = 0L;
+ osmosisReplicationBaseUrl_ = "";
+ return this;
+ }
+
+ @Override
+ public proto4.Descriptors.Descriptor getDescriptorForType() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBlock_descriptor;
+ }
+
+ @Override
+ public Osmformat.HeaderBlock getDefaultInstanceForType() {
+ return Osmformat.HeaderBlock.getDefaultInstance();
+ }
+
+ @Override
+ public Osmformat.HeaderBlock build() {
+ Osmformat.HeaderBlock result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @Override
+ public Osmformat.HeaderBlock buildPartial() {
+ Osmformat.HeaderBlock result = new Osmformat.HeaderBlock(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(Osmformat.HeaderBlock result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.bbox_ = bboxBuilder_ == null ? bbox_ : bboxBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ requiredFeatures_.makeImmutable();
+ result.requiredFeatures_ = requiredFeatures_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ optionalFeatures_.makeImmutable();
+ result.optionalFeatures_ = optionalFeatures_;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.writingprogram_ = writingprogram_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.source_ = source_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.osmosisReplicationTimestamp_ = osmosisReplicationTimestamp_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.osmosisReplicationSequenceNumber_ = osmosisReplicationSequenceNumber_;
+ to_bitField0_ |= 0x00000010;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.osmosisReplicationBaseUrl_ = osmosisReplicationBaseUrl_;
+ to_bitField0_ |= 0x00000020;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @Override
+ public Builder mergeFrom(proto4.Message other) {
+ if (other instanceof Osmformat.HeaderBlock) {
+ return mergeFrom((Osmformat.HeaderBlock) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Osmformat.HeaderBlock other) {
+ if (other == Osmformat.HeaderBlock.getDefaultInstance()) return this;
+ if (other.hasBbox()) {
+ mergeBbox(other.getBbox());
+ }
+ if (!other.requiredFeatures_.isEmpty()) {
+ if (requiredFeatures_.isEmpty()) {
+ requiredFeatures_ = other.requiredFeatures_;
+ bitField0_ |= 0x00000002;
+ } else {
+ ensureRequiredFeaturesIsMutable();
+ requiredFeatures_.addAll(other.requiredFeatures_);
+ }
+ onChanged();
+ }
+ if (!other.optionalFeatures_.isEmpty()) {
+ if (optionalFeatures_.isEmpty()) {
+ optionalFeatures_ = other.optionalFeatures_;
+ bitField0_ |= 0x00000004;
+ } else {
+ ensureOptionalFeaturesIsMutable();
+ optionalFeatures_.addAll(other.optionalFeatures_);
+ }
+ onChanged();
+ }
+ if (other.hasWritingprogram()) {
+ writingprogram_ = other.writingprogram_;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ if (other.hasSource()) {
+ source_ = other.source_;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ }
+ if (other.hasOsmosisReplicationTimestamp()) {
+ setOsmosisReplicationTimestamp(other.getOsmosisReplicationTimestamp());
+ }
+ if (other.hasOsmosisReplicationSequenceNumber()) {
+ setOsmosisReplicationSequenceNumber(other.getOsmosisReplicationSequenceNumber());
+ }
+ if (other.hasOsmosisReplicationBaseUrl()) {
+ osmosisReplicationBaseUrl_ = other.osmosisReplicationBaseUrl_;
+ bitField0_ |= 0x00000080;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final boolean isInitialized() {
+ if (hasBbox()) {
+ if (!getBbox().isInitialized()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public Builder mergeFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ input.readMessage(getBboxFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 34:
+ {
+ proto4.ByteString bs = input.readBytes();
+ ensureRequiredFeaturesIsMutable();
+ requiredFeatures_.add(bs);
+ break;
+ } // case 34
+ case 42:
+ {
+ proto4.ByteString bs = input.readBytes();
+ ensureOptionalFeaturesIsMutable();
+ optionalFeatures_.add(bs);
+ break;
+ } // case 42
+ case 130:
+ {
+ writingprogram_ = input.readBytes();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 130
+ case 138:
+ {
+ source_ = input.readBytes();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 138
+ case 256:
+ {
+ osmosisReplicationTimestamp_ = input.readInt64();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 256
+ case 264:
+ {
+ osmosisReplicationSequenceNumber_ = input.readInt64();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 264
+ case 274:
+ {
+ osmosisReplicationBaseUrl_ = input.readBytes();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 274
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private Osmformat.HeaderBBox bbox_;
+ private proto4.SingleFieldBuilder<
+ Osmformat.HeaderBBox, Osmformat.HeaderBBox.Builder, Osmformat.HeaderBBoxOrBuilder>
+ bboxBuilder_;
+
+ /**
+ * <code>optional .HeaderBBox bbox = 1;</code>
+ *
+ * @return Whether the bbox field is set.
+ */
+ public boolean hasBbox() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ * <code>optional .HeaderBBox bbox = 1;</code>
+ *
+ * @return The bbox.
+ */
+ public Osmformat.HeaderBBox getBbox() {
+ if (bboxBuilder_ == null) {
+ return bbox_ == null ? Osmformat.HeaderBBox.getDefaultInstance() : bbox_;
+ } else {
+ return bboxBuilder_.getMessage();
+ }
+ }
+
+ /** <code>optional .HeaderBBox bbox = 1;</code> */
+ public Builder setBbox(Osmformat.HeaderBBox value) {
+ if (bboxBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bbox_ = value;
+ } else {
+ bboxBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /** <code>optional .HeaderBBox bbox = 1;</code> */
+ public Builder setBbox(Osmformat.HeaderBBox.Builder builderForValue) {
+ if (bboxBuilder_ == null) {
+ bbox_ = builderForValue.build();
+ } else {
+ bboxBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /** <code>optional .HeaderBBox bbox = 1;</code> */
+ public Builder mergeBbox(Osmformat.HeaderBBox value) {
+ if (bboxBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && bbox_ != null
+ && bbox_ != Osmformat.HeaderBBox.getDefaultInstance()) {
+ getBboxBuilder().mergeFrom(value);
+ } else {
+ bbox_ = value;
+ }
+ } else {
+ bboxBuilder_.mergeFrom(value);
+ }
+ if (bbox_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /** <code>optional .HeaderBBox bbox = 1;</code> */
+ public Builder clearBbox() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ bbox_ = null;
+ if (bboxBuilder_ != null) {
+ bboxBuilder_.dispose();
+ bboxBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /** <code>optional .HeaderBBox bbox = 1;</code> */
+ public Osmformat.HeaderBBox.Builder getBboxBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getBboxFieldBuilder().getBuilder();
+ }
+
+ /** <code>optional .HeaderBBox bbox = 1;</code> */
+ public Osmformat.HeaderBBoxOrBuilder getBboxOrBuilder() {
+ if (bboxBuilder_ != null) {
+ return bboxBuilder_.getMessageOrBuilder();
+ } else {
+ return bbox_ == null ? Osmformat.HeaderBBox.getDefaultInstance() : bbox_;
+ }
+ }
+
+ /** <code>optional .HeaderBBox bbox = 1;</code> */
+ private proto4.SingleFieldBuilder<
+ Osmformat.HeaderBBox, Osmformat.HeaderBBox.Builder, Osmformat.HeaderBBoxOrBuilder>
+ getBboxFieldBuilder() {
+ if (bboxBuilder_ == null) {
+ bboxBuilder_ =
+ new proto4.SingleFieldBuilder<
+ Osmformat.HeaderBBox,
+ Osmformat.HeaderBBox.Builder,
+ Osmformat.HeaderBBoxOrBuilder>(getBbox(), getParentForChildren(), isClean());
+ bbox_ = null;
+ }
+ return bboxBuilder_;
+ }
+
+ private proto4.LazyStringArrayList requiredFeatures_ = proto4.LazyStringArrayList.emptyList();
+
+ private void ensureRequiredFeaturesIsMutable() {
+ if (!requiredFeatures_.isModifiable()) {
+ requiredFeatures_ = new proto4.LazyStringArrayList(requiredFeatures_);
+ }
+ bitField0_ |= 0x00000002;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @return A list containing the requiredFeatures.
+ */
+ public proto4.ProtocolStringList getRequiredFeaturesList() {
+ requiredFeatures_.makeImmutable();
+ return requiredFeatures_;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @return The count of requiredFeatures.
+ */
+ public int getRequiredFeaturesCount() {
+ return requiredFeatures_.size();
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @param index The index of the element to return.
+ * @return The requiredFeatures at the given index.
+ */
+ public 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>
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the requiredFeatures at the given index.
+ */
+ public proto4.ByteString getRequiredFeaturesBytes(int index) {
+ return requiredFeatures_.getByteString(index);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @param index The index to set the value at.
+ * @param value The requiredFeatures to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRequiredFeatures(int index, String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRequiredFeaturesIsMutable();
+ requiredFeatures_.set(index, value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @param value The requiredFeatures to add.
+ * @return This builder for chaining.
+ */
+ public Builder addRequiredFeatures(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRequiredFeaturesIsMutable();
+ requiredFeatures_.add(value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @param values The requiredFeatures to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllRequiredFeatures(Iterable<String> values) {
+ ensureRequiredFeaturesIsMutable();
+ proto4.AbstractMessageLite.Builder.addAll(values, requiredFeatures_);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRequiredFeatures() {
+ requiredFeatures_ = proto4.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ ;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Additional tags to aid in parsing this dataset
+ * </pre>
+ *
+ * <code>repeated string required_features = 4;</code>
+ *
+ * @param value The bytes of the requiredFeatures to add.
+ * @return This builder for chaining.
+ */
+ public Builder addRequiredFeaturesBytes(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRequiredFeaturesIsMutable();
+ requiredFeatures_.add(value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private proto4.LazyStringArrayList optionalFeatures_ = proto4.LazyStringArrayList.emptyList();
+
+ private void ensureOptionalFeaturesIsMutable() {
+ if (!optionalFeatures_.isModifiable()) {
+ optionalFeatures_ = new proto4.LazyStringArrayList(optionalFeatures_);
+ }
+ bitField0_ |= 0x00000004;
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @return A list containing the optionalFeatures.
+ */
+ public proto4.ProtocolStringList getOptionalFeaturesList() {
+ optionalFeatures_.makeImmutable();
+ return optionalFeatures_;
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @return The count of optionalFeatures.
+ */
+ public int getOptionalFeaturesCount() {
+ return optionalFeatures_.size();
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param index The index of the element to return.
+ * @return The optionalFeatures at the given index.
+ */
+ public String getOptionalFeatures(int index) {
+ return optionalFeatures_.get(index);
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the optionalFeatures at the given index.
+ */
+ public proto4.ByteString getOptionalFeaturesBytes(int index) {
+ return optionalFeatures_.getByteString(index);
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param index The index to set the value at.
+ * @param value The optionalFeatures to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOptionalFeatures(int index, String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOptionalFeaturesIsMutable();
+ optionalFeatures_.set(index, value);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param value The optionalFeatures to add.
+ * @return This builder for chaining.
+ */
+ public Builder addOptionalFeatures(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOptionalFeaturesIsMutable();
+ optionalFeatures_.add(value);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param values The optionalFeatures to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllOptionalFeatures(Iterable<String> values) {
+ ensureOptionalFeaturesIsMutable();
+ proto4.AbstractMessageLite.Builder.addAll(values, optionalFeatures_);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOptionalFeatures() {
+ optionalFeatures_ = proto4.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ ;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>repeated string optional_features = 5;</code>
+ *
+ * @param value The bytes of the optionalFeatures to add.
+ * @return This builder for chaining.
+ */
+ public Builder addOptionalFeaturesBytes(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOptionalFeaturesIsMutable();
+ optionalFeatures_.add(value);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ private Object writingprogram_ = "";
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return Whether the writingprogram field is set.
+ */
+ public boolean hasWritingprogram() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return The writingprogram.
+ */
+ public String getWritingprogram() {
+ Object ref = writingprogram_;
+ if (!(ref instanceof String)) {
+ proto4.ByteString bs = (proto4.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ writingprogram_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return The bytes for writingprogram.
+ */
+ public proto4.ByteString getWritingprogramBytes() {
+ Object ref = writingprogram_;
+ if (ref instanceof String) {
+ proto4.ByteString b = proto4.ByteString.copyFromUtf8((String) ref);
+ writingprogram_ = b;
+ return b;
+ } else {
+ return (proto4.ByteString) ref;
+ }
+ }
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @param value The writingprogram to set.
+ * @return This builder for chaining.
+ */
+ public Builder setWritingprogram(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ writingprogram_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearWritingprogram() {
+ writingprogram_ = getDefaultInstance().getWritingprogram();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>optional string writingprogram = 16;</code>
+ *
+ * @param value The bytes for writingprogram to set.
+ * @return This builder for chaining.
+ */
+ public Builder setWritingprogramBytes(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ writingprogram_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ private Object source_ = "";
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return Whether the source field is set.
+ */
+ public boolean hasSource() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return The source.
+ */
+ public String getSource() {
+ Object ref = source_;
+ if (!(ref instanceof String)) {
+ proto4.ByteString bs = (proto4.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ source_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return The bytes for source.
+ */
+ public proto4.ByteString getSourceBytes() {
+ Object ref = source_;
+ if (ref instanceof String) {
+ proto4.ByteString b = proto4.ByteString.copyFromUtf8((String) ref);
+ source_ = b;
+ return b;
+ } else {
+ return (proto4.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @param value The source to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSource(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ source_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSource() {
+ source_ = getDefaultInstance().getSource();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * From the bbox field.
+ * </pre>
+ *
+ * <code>optional string source = 17;</code>
+ *
+ * @param value The bytes for source to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSourceBytes(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ source_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ 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>
+ *
+ * @return Whether the osmosisReplicationTimestamp field is set.
+ */
+ @Override
+ public boolean hasOsmosisReplicationTimestamp() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+
+ /**
+ *
+ *
+ * <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>
+ *
+ * @return The osmosisReplicationTimestamp.
+ */
+ @Override
+ 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>
+ *
+ * @param value The osmosisReplicationTimestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOsmosisReplicationTimestamp(long value) {
+
+ osmosisReplicationTimestamp_ = value;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ 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>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOsmosisReplicationTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ osmosisReplicationTimestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long osmosisReplicationSequenceNumber_;
+
+ /**
+ *
+ *
+ * <pre>
+ * replication sequence number (sequenceNumber in state.txt)
+ * </pre>
+ *
+ * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+ *
+ * @return Whether the osmosisReplicationSequenceNumber field is set.
+ */
+ @Override
+ public boolean hasOsmosisReplicationSequenceNumber() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication sequence number (sequenceNumber in state.txt)
+ * </pre>
+ *
+ * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+ *
+ * @return The osmosisReplicationSequenceNumber.
+ */
+ @Override
+ public long getOsmosisReplicationSequenceNumber() {
+ return osmosisReplicationSequenceNumber_;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication sequence number (sequenceNumber in state.txt)
+ * </pre>
+ *
+ * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+ *
+ * @param value The osmosisReplicationSequenceNumber to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOsmosisReplicationSequenceNumber(long value) {
+
+ osmosisReplicationSequenceNumber_ = value;
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication sequence number (sequenceNumber in state.txt)
+ * </pre>
+ *
+ * <code>optional int64 osmosis_replication_sequence_number = 33;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOsmosisReplicationSequenceNumber() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ osmosisReplicationSequenceNumber_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private Object osmosisReplicationBaseUrl_ = "";
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return Whether the osmosisReplicationBaseUrl field is set.
+ */
+ public boolean hasOsmosisReplicationBaseUrl() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return The osmosisReplicationBaseUrl.
+ */
+ public String getOsmosisReplicationBaseUrl() {
+ Object ref = osmosisReplicationBaseUrl_;
+ if (!(ref instanceof String)) {
+ proto4.ByteString bs = (proto4.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ osmosisReplicationBaseUrl_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return The bytes for osmosisReplicationBaseUrl.
+ */
+ public proto4.ByteString getOsmosisReplicationBaseUrlBytes() {
+ Object ref = osmosisReplicationBaseUrl_;
+ if (ref instanceof String) {
+ proto4.ByteString b = proto4.ByteString.copyFromUtf8((String) ref);
+ osmosisReplicationBaseUrl_ = b;
+ return b;
+ } else {
+ return (proto4.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @param value The osmosisReplicationBaseUrl to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOsmosisReplicationBaseUrl(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ osmosisReplicationBaseUrl_ = value;
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOsmosisReplicationBaseUrl() {
+ osmosisReplicationBaseUrl_ = getDefaultInstance().getOsmosisReplicationBaseUrl();
+ bitField0_ = (bitField0_ & ~0x00000080);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * replication base URL (from Osmosis' configuration.txt file)
+ * </pre>
+ *
+ * <code>optional string osmosis_replication_base_url = 34;</code>
+ *
+ * @param value The bytes for osmosisReplicationBaseUrl to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOsmosisReplicationBaseUrlBytes(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ osmosisReplicationBaseUrl_ = value;
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:HeaderBlock)
+ }
+
+ // @@protoc_insertion_point(class_scope:HeaderBlock)
+ private static final Osmformat.HeaderBlock DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Osmformat.HeaderBlock();
+ }
+
+ public static Osmformat.HeaderBlock getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final proto4.Parser<HeaderBlock> PARSER =
+ new proto4.AbstractParser<HeaderBlock>() {
+ @Override
+ public HeaderBlock parsePartialFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (proto4.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new proto4.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static proto4.Parser<HeaderBlock> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public proto4.Parser<HeaderBlock> getParserForType() {
+ return PARSER;
+ }
+
+ @Override
+ public Osmformat.HeaderBlock getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface HeaderBBoxOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:HeaderBBox)
+ proto4.MessageOrBuilder {
+
+ /**
+ * <code>required sint64 left = 1;</code>
+ *
+ * @return Whether the left field is set.
+ */
+ boolean hasLeft();
+
+ /**
+ * <code>required sint64 left = 1;</code>
+ *
+ * @return The left.
+ */
+ long getLeft();
+
+ /**
+ * <code>required sint64 right = 2;</code>
+ *
+ * @return Whether the right field is set.
+ */
+ boolean hasRight();
+
+ /**
+ * <code>required sint64 right = 2;</code>
+ *
+ * @return The right.
+ */
+ long getRight();
+
+ /**
+ * <code>required sint64 top = 3;</code>
+ *
+ * @return Whether the top field is set.
+ */
+ boolean hasTop();
+
+ /**
+ * <code>required sint64 top = 3;</code>
+ *
+ * @return The top.
+ */
+ long getTop();
+
+ /**
+ * <code>required sint64 bottom = 4;</code>
+ *
+ * @return Whether the bottom field is set.
+ */
+ boolean hasBottom();
+
+ /**
+ * <code>required sint64 bottom = 4;</code>
+ *
+ * @return The bottom.
+ */
+ long getBottom();
+ }
+
+ /** Protobuf type {@code HeaderBBox} */
+ public static final class HeaderBBox extends proto4.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:HeaderBBox)
+ HeaderBBoxOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ HeaderBBox.class.getName());
+ }
+
+ // Use HeaderBBox.newBuilder() to construct.
+ private HeaderBBox(proto4.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ }
+
+ private HeaderBBox() {}
+
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBBox_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBBox_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.HeaderBBox.class, Osmformat.HeaderBBox.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int LEFT_FIELD_NUMBER = 1;
+ private long left_ = 0L;
+
+ /**
+ * <code>required sint64 left = 1;</code>
+ *
+ * @return Whether the left field is set.
+ */
+ @Override
+ public boolean hasLeft() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ * <code>required sint64 left = 1;</code>
+ *
+ * @return The left.
+ */
+ @Override
+ public long getLeft() {
+ return left_;
+ }
+
+ public static final int RIGHT_FIELD_NUMBER = 2;
+ private long right_ = 0L;
+
+ /**
+ * <code>required sint64 right = 2;</code>
+ *
+ * @return Whether the right field is set.
+ */
+ @Override
+ public boolean hasRight() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ * <code>required sint64 right = 2;</code>
+ *
+ * @return The right.
+ */
+ @Override
+ public long getRight() {
+ return right_;
+ }
+
+ public static final int TOP_FIELD_NUMBER = 3;
+ private long top_ = 0L;
+
+ /**
+ * <code>required sint64 top = 3;</code>
+ *
+ * @return Whether the top field is set.
+ */
+ @Override
+ public boolean hasTop() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+
+ /**
+ * <code>required sint64 top = 3;</code>
+ *
+ * @return The top.
+ */
+ @Override
+ public long getTop() {
+ return top_;
+ }
+
+ public static final int BOTTOM_FIELD_NUMBER = 4;
+ private long bottom_ = 0L;
+
+ /**
+ * <code>required sint64 bottom = 4;</code>
+ *
+ * @return Whether the bottom field is set.
+ */
+ @Override
+ public boolean hasBottom() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+
+ /**
+ * <code>required sint64 bottom = 4;</code>
+ *
+ * @return The bottom.
+ */
+ @Override
+ public long getBottom() {
+ return bottom_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasLeft()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasRight()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasTop()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (!hasBottom()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(proto4.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeSInt64(1, left_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeSInt64(2, right_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeSInt64(3, top_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeSInt64(4, bottom_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += proto4.CodedOutputStream.computeSInt64Size(1, left_);
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += proto4.CodedOutputStream.computeSInt64Size(2, right_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += proto4.CodedOutputStream.computeSInt64Size(3, top_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += proto4.CodedOutputStream.computeSInt64Size(4, bottom_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Osmformat.HeaderBBox)) {
+ return super.equals(obj);
+ }
+ Osmformat.HeaderBBox other = (Osmformat.HeaderBBox) obj;
+
+ if (hasLeft() != other.hasLeft()) return false;
+ if (hasLeft()) {
+ if (getLeft() != other.getLeft()) return false;
+ }
+ if (hasRight() != other.hasRight()) return false;
+ if (hasRight()) {
+ if (getRight() != other.getRight()) return false;
+ }
+ if (hasTop() != other.hasTop()) return false;
+ if (hasTop()) {
+ if (getTop() != other.getTop()) return false;
+ }
+ if (hasBottom() != other.hasBottom()) return false;
+ if (hasBottom()) {
+ if (getBottom() != other.getBottom()) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasLeft()) {
+ hash = (37 * hash) + LEFT_FIELD_NUMBER;
+ hash = (53 * hash) + proto4.Internal.hashLong(getLeft());
+ }
+ if (hasRight()) {
+ hash = (37 * hash) + RIGHT_FIELD_NUMBER;
+ hash = (53 * hash) + proto4.Internal.hashLong(getRight());
+ }
+ if (hasTop()) {
+ hash = (37 * hash) + TOP_FIELD_NUMBER;
+ hash = (53 * hash) + proto4.Internal.hashLong(getTop());
+ }
+ if (hasBottom()) {
+ hash = (37 * hash) + BOTTOM_FIELD_NUMBER;
+ hash = (53 * hash) + proto4.Internal.hashLong(getBottom());
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(java.nio.ByteBuffer data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(
+ java.nio.ByteBuffer data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(proto4.ByteString data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(
+ proto4.ByteString data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(byte[] data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(
+ byte[] data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBBox parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.HeaderBBox parseDelimitedFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(proto4.CodedInputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.HeaderBBox parseFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Osmformat.HeaderBBox prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code HeaderBBox} */
+ public static final class Builder extends proto4.GeneratedMessage.Builder<Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:HeaderBBox)
+ Osmformat.HeaderBBoxOrBuilder {
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBBox_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBBox_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.HeaderBBox.class, Osmformat.HeaderBBox.Builder.class);
+ }
+
+ // Construct using Osmformat.HeaderBBox.newBuilder()
+ private Builder() {}
+
+ private Builder(BuilderParent parent) {
+ super(parent);
+ }
+
+ @Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ left_ = 0L;
+ right_ = 0L;
+ top_ = 0L;
+ bottom_ = 0L;
+ return this;
+ }
+
+ @Override
+ public proto4.Descriptors.Descriptor getDescriptorForType() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_HeaderBBox_descriptor;
+ }
+
+ @Override
+ public Osmformat.HeaderBBox getDefaultInstanceForType() {
+ return Osmformat.HeaderBBox.getDefaultInstance();
+ }
+
+ @Override
+ public Osmformat.HeaderBBox build() {
+ Osmformat.HeaderBBox result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @Override
+ public Osmformat.HeaderBBox buildPartial() {
+ Osmformat.HeaderBBox result = new Osmformat.HeaderBBox(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(Osmformat.HeaderBBox result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.left_ = left_;
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.right_ = right_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.top_ = top_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.bottom_ = bottom_;
+ to_bitField0_ |= 0x00000008;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @Override
+ public Builder mergeFrom(proto4.Message other) {
+ if (other instanceof Osmformat.HeaderBBox) {
+ return mergeFrom((Osmformat.HeaderBBox) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Osmformat.HeaderBBox other) {
+ if (other == Osmformat.HeaderBBox.getDefaultInstance()) return this;
+ if (other.hasLeft()) {
+ setLeft(other.getLeft());
+ }
+ if (other.hasRight()) {
+ setRight(other.getRight());
+ }
+ if (other.hasTop()) {
+ setTop(other.getTop());
+ }
+ if (other.hasBottom()) {
+ setBottom(other.getBottom());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final boolean isInitialized() {
+ if (!hasLeft()) {
+ return false;
+ }
+ if (!hasRight()) {
+ return false;
+ }
+ if (!hasTop()) {
+ return false;
+ }
+ if (!hasBottom()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public Builder mergeFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8:
+ {
+ left_ = input.readSInt64();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 16:
+ {
+ right_ = input.readSInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 24:
+ {
+ top_ = input.readSInt64();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 24
+ case 32:
+ {
+ bottom_ = input.readSInt64();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 32
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private long left_;
+
+ /**
+ * <code>required sint64 left = 1;</code>
+ *
+ * @return Whether the left field is set.
+ */
+ @Override
+ public boolean hasLeft() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ * <code>required sint64 left = 1;</code>
+ *
+ * @return The left.
+ */
+ @Override
+ public long getLeft() {
+ return left_;
+ }
+
+ /**
+ * <code>required sint64 left = 1;</code>
+ *
+ * @param value The left to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLeft(long value) {
+
+ left_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>required sint64 left = 1;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearLeft() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ left_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long right_;
+
+ /**
+ * <code>required sint64 right = 2;</code>
+ *
+ * @return Whether the right field is set.
+ */
+ @Override
+ public boolean hasRight() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ * <code>required sint64 right = 2;</code>
+ *
+ * @return The right.
+ */
+ @Override
+ public long getRight() {
+ return right_;
+ }
+
+ /**
+ * <code>required sint64 right = 2;</code>
+ *
+ * @param value The right to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRight(long value) {
+
+ right_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>required sint64 right = 2;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRight() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ right_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long top_;
+
+ /**
+ * <code>required sint64 top = 3;</code>
+ *
+ * @return Whether the top field is set.
+ */
+ @Override
+ public boolean hasTop() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+
+ /**
+ * <code>required sint64 top = 3;</code>
+ *
+ * @return The top.
+ */
+ @Override
+ public long getTop() {
+ return top_;
+ }
+
+ /**
+ * <code>required sint64 top = 3;</code>
+ *
+ * @param value The top to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTop(long value) {
+
+ top_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>required sint64 top = 3;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTop() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ top_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long bottom_;
+
+ /**
+ * <code>required sint64 bottom = 4;</code>
+ *
+ * @return Whether the bottom field is set.
+ */
+ @Override
+ public boolean hasBottom() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+
+ /**
+ * <code>required sint64 bottom = 4;</code>
+ *
+ * @return The bottom.
+ */
+ @Override
+ public long getBottom() {
+ return bottom_;
+ }
+
+ /**
+ * <code>required sint64 bottom = 4;</code>
+ *
+ * @param value The bottom to set.
+ * @return This builder for chaining.
+ */
+ public Builder setBottom(long value) {
+
+ bottom_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>required sint64 bottom = 4;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearBottom() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ bottom_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:HeaderBBox)
+ }
+
+ // @@protoc_insertion_point(class_scope:HeaderBBox)
+ private static final Osmformat.HeaderBBox DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Osmformat.HeaderBBox();
+ }
+
+ public static Osmformat.HeaderBBox getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final proto4.Parser<HeaderBBox> PARSER =
+ new proto4.AbstractParser<HeaderBBox>() {
+ @Override
+ public HeaderBBox parsePartialFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (proto4.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new proto4.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static proto4.Parser<HeaderBBox> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public proto4.Parser<HeaderBBox> getParserForType() {
+ return PARSER;
+ }
+
+ @Override
+ public Osmformat.HeaderBBox getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface PrimitiveBlockOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:PrimitiveBlock)
+ proto4.MessageOrBuilder {
+
+ /**
+ * <code>required .StringTable stringtable = 1;</code>
+ *
+ * @return Whether the stringtable field is set.
+ */
+ boolean hasStringtable();
+
+ /**
+ * <code>required .StringTable stringtable = 1;</code>
+ *
+ * @return The stringtable.
+ */
+ Osmformat.StringTable getStringtable();
+
+ /** <code>required .StringTable stringtable = 1;</code> */
+ Osmformat.StringTableOrBuilder getStringtableOrBuilder();
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ java.util.List<Osmformat.PrimitiveGroup> getPrimitivegroupList();
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ Osmformat.PrimitiveGroup getPrimitivegroup(int index);
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ int getPrimitivegroupCount();
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ java.util.List<? extends Osmformat.PrimitiveGroupOrBuilder> getPrimitivegroupOrBuilderList();
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ Osmformat.PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(int index);
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity, units of nanodegrees, used to store coordinates in this block
+ * </pre>
+ *
+ * <code>optional int32 granularity = 17 [default = 100];</code>
+ *
+ * @return Whether the granularity field is set.
+ */
+ boolean hasGranularity();
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity, units of nanodegrees, used to store coordinates in this block
+ * </pre>
+ *
+ * <code>optional int32 granularity = 17 [default = 100];</code>
+ *
+ * @return The granularity.
+ */
+ 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>
+ *
+ * @return Whether the latOffset field is set.
+ */
+ 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>
+ *
+ * @return The latOffset.
+ */
+ long getLatOffset();
+
+ /**
+ * <code>optional int64 lon_offset = 20 [default = 0];</code>
+ *
+ * @return Whether the lonOffset field is set.
+ */
+ boolean hasLonOffset();
+
+ /**
+ * <code>optional int64 lon_offset = 20 [default = 0];</code>
+ *
+ * @return The lonOffset.
+ */
+ 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>
+ *
+ * @return Whether the dateGranularity field is set.
+ */
+ 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>
+ *
+ * @return The dateGranularity.
+ */
+ int getDateGranularity();
+ }
+
+ /** Protobuf type {@code PrimitiveBlock} */
+ public static final class PrimitiveBlock extends proto4.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:PrimitiveBlock)
+ PrimitiveBlockOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ PrimitiveBlock.class.getName());
+ }
+
+ // Use PrimitiveBlock.newBuilder() to construct.
+ private PrimitiveBlock(proto4.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ }
+
+ private PrimitiveBlock() {
+ primitivegroup_ = java.util.Collections.emptyList();
+ granularity_ = 100;
+ dateGranularity_ = 1000;
+ }
+
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_PrimitiveBlock_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_PrimitiveBlock_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.PrimitiveBlock.class, Osmformat.PrimitiveBlock.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int STRINGTABLE_FIELD_NUMBER = 1;
+ private Osmformat.StringTable stringtable_;
+
+ /**
+ * <code>required .StringTable stringtable = 1;</code>
+ *
+ * @return Whether the stringtable field is set.
+ */
+ @Override
+ public boolean hasStringtable() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ * <code>required .StringTable stringtable = 1;</code>
+ *
+ * @return The stringtable.
+ */
+ @Override
+ public Osmformat.StringTable getStringtable() {
+ return stringtable_ == null ? Osmformat.StringTable.getDefaultInstance() : stringtable_;
+ }
+
+ /** <code>required .StringTable stringtable = 1;</code> */
+ @Override
+ public Osmformat.StringTableOrBuilder getStringtableOrBuilder() {
+ return stringtable_ == null ? Osmformat.StringTable.getDefaultInstance() : stringtable_;
+ }
+
+ public static final int PRIMITIVEGROUP_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private java.util.List<Osmformat.PrimitiveGroup> primitivegroup_;
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ @Override
+ public java.util.List<Osmformat.PrimitiveGroup> getPrimitivegroupList() {
+ return primitivegroup_;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ @Override
+ public java.util.List<? extends Osmformat.PrimitiveGroupOrBuilder>
+ getPrimitivegroupOrBuilderList() {
+ return primitivegroup_;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ @Override
+ public int getPrimitivegroupCount() {
+ return primitivegroup_.size();
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ @Override
+ public Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
+ return primitivegroup_.get(index);
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ @Override
+ public Osmformat.PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(int index) {
+ return primitivegroup_.get(index);
+ }
+
+ public static final int GRANULARITY_FIELD_NUMBER = 17;
+ private int granularity_ = 100;
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity, units of nanodegrees, used to store coordinates in this block
+ * </pre>
+ *
+ * <code>optional int32 granularity = 17 [default = 100];</code>
+ *
+ * @return Whether the granularity field is set.
+ */
+ @Override
+ public boolean hasGranularity() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity, units of nanodegrees, used to store coordinates in this block
+ * </pre>
+ *
+ * <code>optional int32 granularity = 17 [default = 100];</code>
+ *
+ * @return The granularity.
+ */
+ @Override
+ public int getGranularity() {
+ return granularity_;
+ }
+
+ public static final int LAT_OFFSET_FIELD_NUMBER = 19;
+ private long latOffset_ = 0L;
+
+ /**
+ *
+ *
+ * <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>
+ *
+ * @return Whether the latOffset field is set.
+ */
+ @Override
+ public boolean hasLatOffset() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+
+ /**
+ *
+ *
+ * <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>
+ *
+ * @return The latOffset.
+ */
+ @Override
+ public long getLatOffset() {
+ return latOffset_;
+ }
+
+ public static final int LON_OFFSET_FIELD_NUMBER = 20;
+ private long lonOffset_ = 0L;
+
+ /**
+ * <code>optional int64 lon_offset = 20 [default = 0];</code>
+ *
+ * @return Whether the lonOffset field is set.
+ */
+ @Override
+ public boolean hasLonOffset() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+
+ /**
+ * <code>optional int64 lon_offset = 20 [default = 0];</code>
+ *
+ * @return The lonOffset.
+ */
+ @Override
+ public long getLonOffset() {
+ return lonOffset_;
+ }
+
+ public static final int DATE_GRANULARITY_FIELD_NUMBER = 18;
+ private int dateGranularity_ = 1000;
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+ * </pre>
+ *
+ * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+ *
+ * @return Whether the dateGranularity field is set.
+ */
+ @Override
+ public boolean hasDateGranularity() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+ * </pre>
+ *
+ * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+ *
+ * @return The dateGranularity.
+ */
+ @Override
+ public int getDateGranularity() {
+ return dateGranularity_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasStringtable()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ for (int i = 0; i < getPrimitivegroupCount(); i++) {
+ if (!getPrimitivegroup(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(proto4.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getStringtable());
+ }
+ for (int i = 0; i < primitivegroup_.size(); i++) {
+ output.writeMessage(2, primitivegroup_.get(i));
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeInt32(17, granularity_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ output.writeInt32(18, dateGranularity_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeInt64(19, latOffset_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ output.writeInt64(20, lonOffset_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += proto4.CodedOutputStream.computeMessageSize(1, getStringtable());
+ }
+ for (int i = 0; i < primitivegroup_.size(); i++) {
+ size += proto4.CodedOutputStream.computeMessageSize(2, primitivegroup_.get(i));
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += proto4.CodedOutputStream.computeInt32Size(17, granularity_);
+ }
+ if (((bitField0_ & 0x00000010) != 0)) {
+ size += proto4.CodedOutputStream.computeInt32Size(18, dateGranularity_);
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += proto4.CodedOutputStream.computeInt64Size(19, latOffset_);
+ }
+ if (((bitField0_ & 0x00000008) != 0)) {
+ size += proto4.CodedOutputStream.computeInt64Size(20, lonOffset_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Osmformat.PrimitiveBlock)) {
+ return super.equals(obj);
+ }
+ Osmformat.PrimitiveBlock other = (Osmformat.PrimitiveBlock) obj;
+
+ if (hasStringtable() != other.hasStringtable()) return false;
+ if (hasStringtable()) {
+ if (!getStringtable().equals(other.getStringtable())) return false;
+ }
+ if (!getPrimitivegroupList().equals(other.getPrimitivegroupList())) return false;
+ if (hasGranularity() != other.hasGranularity()) return false;
+ if (hasGranularity()) {
+ if (getGranularity() != other.getGranularity()) return false;
+ }
+ if (hasLatOffset() != other.hasLatOffset()) return false;
+ if (hasLatOffset()) {
+ if (getLatOffset() != other.getLatOffset()) return false;
+ }
+ if (hasLonOffset() != other.hasLonOffset()) return false;
+ if (hasLonOffset()) {
+ if (getLonOffset() != other.getLonOffset()) return false;
+ }
+ if (hasDateGranularity() != other.hasDateGranularity()) return false;
+ if (hasDateGranularity()) {
+ if (getDateGranularity() != other.getDateGranularity()) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasStringtable()) {
+ hash = (37 * hash) + STRINGTABLE_FIELD_NUMBER;
+ hash = (53 * hash) + getStringtable().hashCode();
+ }
+ if (getPrimitivegroupCount() > 0) {
+ hash = (37 * hash) + PRIMITIVEGROUP_FIELD_NUMBER;
+ hash = (53 * hash) + getPrimitivegroupList().hashCode();
+ }
+ if (hasGranularity()) {
+ hash = (37 * hash) + GRANULARITY_FIELD_NUMBER;
+ hash = (53 * hash) + getGranularity();
+ }
+ if (hasLatOffset()) {
+ hash = (37 * hash) + LAT_OFFSET_FIELD_NUMBER;
+ hash = (53 * hash) + proto4.Internal.hashLong(getLatOffset());
+ }
+ if (hasLonOffset()) {
+ hash = (37 * hash) + LON_OFFSET_FIELD_NUMBER;
+ hash = (53 * hash) + proto4.Internal.hashLong(getLonOffset());
+ }
+ if (hasDateGranularity()) {
+ hash = (37 * hash) + DATE_GRANULARITY_FIELD_NUMBER;
+ hash = (53 * hash) + getDateGranularity();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(java.nio.ByteBuffer data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(
+ java.nio.ByteBuffer data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(proto4.ByteString data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(
+ proto4.ByteString data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(byte[] data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(
+ byte[] data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveBlock parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.PrimitiveBlock parseDelimitedFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(proto4.CodedInputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.PrimitiveBlock parseFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Osmformat.PrimitiveBlock prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code PrimitiveBlock} */
+ public static final class Builder extends proto4.GeneratedMessage.Builder<Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:PrimitiveBlock)
+ Osmformat.PrimitiveBlockOrBuilder {
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_PrimitiveBlock_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat
+ .internal_static_org_apache_sedona_osm_build_PrimitiveBlock_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.PrimitiveBlock.class, Osmformat.PrimitiveBlock.Builder.class);
+ }
+
+ // Construct using Osmformat.PrimitiveBlock.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (proto4.GeneratedMessage.alwaysUseFieldBuilders) {
+ getStringtableFieldBuilder();
+ getPrimitivegroupFieldBuilder();
+ }
+ }
+
+ @Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ stringtable_ = null;
+ if (stringtableBuilder_ != null) {
+ stringtableBuilder_.dispose();
+ stringtableBuilder_ = null;
+ }
+ if (primitivegroupBuilder_ == null) {
+ primitivegroup_ = java.util.Collections.emptyList();
+ } else {
+ primitivegroup_ = null;
+ primitivegroupBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ granularity_ = 100;
+ latOffset_ = 0L;
+ lonOffset_ = 0L;
+ dateGranularity_ = 1000;
+ return this;
+ }
+
+ @Override
+ public proto4.Descriptors.Descriptor getDescriptorForType() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_PrimitiveBlock_descriptor;
+ }
+
+ @Override
+ public Osmformat.PrimitiveBlock getDefaultInstanceForType() {
+ return Osmformat.PrimitiveBlock.getDefaultInstance();
+ }
+
+ @Override
+ public Osmformat.PrimitiveBlock build() {
+ Osmformat.PrimitiveBlock result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @Override
+ public Osmformat.PrimitiveBlock buildPartial() {
+ Osmformat.PrimitiveBlock result = new Osmformat.PrimitiveBlock(this);
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(Osmformat.PrimitiveBlock result) {
+ if (primitivegroupBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)) {
+ primitivegroup_ = java.util.Collections.unmodifiableList(primitivegroup_);
+ bitField0_ = (bitField0_ & ~0x00000002);
+ }
+ result.primitivegroup_ = primitivegroup_;
+ } else {
+ result.primitivegroup_ = primitivegroupBuilder_.build();
+ }
+ }
+
+ private void buildPartial0(Osmformat.PrimitiveBlock result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.stringtable_ =
+ stringtableBuilder_ == null ? stringtable_ : stringtableBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.granularity_ = granularity_;
+ to_bitField0_ |= 0x00000002;
+ }
+ if (((from_bitField0_ & 0x00000008) != 0)) {
+ result.latOffset_ = latOffset_;
+ to_bitField0_ |= 0x00000004;
+ }
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ result.lonOffset_ = lonOffset_;
+ to_bitField0_ |= 0x00000008;
+ }
+ if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.dateGranularity_ = dateGranularity_;
+ to_bitField0_ |= 0x00000010;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @Override
+ public Builder mergeFrom(proto4.Message other) {
+ if (other instanceof Osmformat.PrimitiveBlock) {
+ return mergeFrom((Osmformat.PrimitiveBlock) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Osmformat.PrimitiveBlock other) {
+ if (other == Osmformat.PrimitiveBlock.getDefaultInstance()) return this;
+ if (other.hasStringtable()) {
+ mergeStringtable(other.getStringtable());
+ }
+ if (primitivegroupBuilder_ == null) {
+ if (!other.primitivegroup_.isEmpty()) {
+ if (primitivegroup_.isEmpty()) {
+ primitivegroup_ = other.primitivegroup_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ } else {
+ ensurePrimitivegroupIsMutable();
+ primitivegroup_.addAll(other.primitivegroup_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.primitivegroup_.isEmpty()) {
+ if (primitivegroupBuilder_.isEmpty()) {
+ primitivegroupBuilder_.dispose();
+ primitivegroupBuilder_ = null;
+ primitivegroup_ = other.primitivegroup_;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ primitivegroupBuilder_ =
+ proto4.GeneratedMessage.alwaysUseFieldBuilders
+ ? getPrimitivegroupFieldBuilder()
+ : null;
+ } else {
+ primitivegroupBuilder_.addAllMessages(other.primitivegroup_);
+ }
+ }
+ }
+ if (other.hasGranularity()) {
+ setGranularity(other.getGranularity());
+ }
+ if (other.hasLatOffset()) {
+ setLatOffset(other.getLatOffset());
+ }
+ if (other.hasLonOffset()) {
+ setLonOffset(other.getLonOffset());
+ }
+ if (other.hasDateGranularity()) {
+ setDateGranularity(other.getDateGranularity());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final boolean isInitialized() {
+ if (!hasStringtable()) {
+ return false;
+ }
+ for (int i = 0; i < getPrimitivegroupCount(); i++) {
+ if (!getPrimitivegroup(i).isInitialized()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public Builder mergeFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ input.readMessage(getStringtableFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18:
+ {
+ Osmformat.PrimitiveGroup m =
+ input.readMessage(Osmformat.PrimitiveGroup.parser(), extensionRegistry);
+ if (primitivegroupBuilder_ == null) {
+ ensurePrimitivegroupIsMutable();
+ primitivegroup_.add(m);
+ } else {
+ primitivegroupBuilder_.addMessage(m);
+ }
+ break;
+ } // case 18
+ case 136:
+ {
+ granularity_ = input.readInt32();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 136
+ case 144:
+ {
+ dateGranularity_ = input.readInt32();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 144
+ case 152:
+ {
+ latOffset_ = input.readInt64();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 152
+ case 160:
+ {
+ lonOffset_ = input.readInt64();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 160
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private Osmformat.StringTable stringtable_;
+ private proto4.SingleFieldBuilder<
+ Osmformat.StringTable, Osmformat.StringTable.Builder, Osmformat.StringTableOrBuilder>
+ stringtableBuilder_;
+
+ /**
+ * <code>required .StringTable stringtable = 1;</code>
+ *
+ * @return Whether the stringtable field is set.
+ */
+ public boolean hasStringtable() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ * <code>required .StringTable stringtable = 1;</code>
+ *
+ * @return The stringtable.
+ */
+ public Osmformat.StringTable getStringtable() {
+ if (stringtableBuilder_ == null) {
+ return stringtable_ == null ? Osmformat.StringTable.getDefaultInstance() : stringtable_;
+ } else {
+ return stringtableBuilder_.getMessage();
+ }
+ }
+
+ /** <code>required .StringTable stringtable = 1;</code> */
+ public Builder setStringtable(Osmformat.StringTable value) {
+ if (stringtableBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ stringtable_ = value;
+ } else {
+ stringtableBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /** <code>required .StringTable stringtable = 1;</code> */
+ public Builder setStringtable(Osmformat.StringTable.Builder builderForValue) {
+ if (stringtableBuilder_ == null) {
+ stringtable_ = builderForValue.build();
+ } else {
+ stringtableBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /** <code>required .StringTable stringtable = 1;</code> */
+ public Builder mergeStringtable(Osmformat.StringTable value) {
+ if (stringtableBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && stringtable_ != null
+ && stringtable_ != Osmformat.StringTable.getDefaultInstance()) {
+ getStringtableBuilder().mergeFrom(value);
+ } else {
+ stringtable_ = value;
+ }
+ } else {
+ stringtableBuilder_.mergeFrom(value);
+ }
+ if (stringtable_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /** <code>required .StringTable stringtable = 1;</code> */
+ public Builder clearStringtable() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ stringtable_ = null;
+ if (stringtableBuilder_ != null) {
+ stringtableBuilder_.dispose();
+ stringtableBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /** <code>required .StringTable stringtable = 1;</code> */
+ public Osmformat.StringTable.Builder getStringtableBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getStringtableFieldBuilder().getBuilder();
+ }
+
+ /** <code>required .StringTable stringtable = 1;</code> */
+ public Osmformat.StringTableOrBuilder getStringtableOrBuilder() {
+ if (stringtableBuilder_ != null) {
+ return stringtableBuilder_.getMessageOrBuilder();
+ } else {
+ return stringtable_ == null ? Osmformat.StringTable.getDefaultInstance() : stringtable_;
+ }
+ }
+
+ /** <code>required .StringTable stringtable = 1;</code> */
+ private proto4.SingleFieldBuilder<
+ Osmformat.StringTable, Osmformat.StringTable.Builder, Osmformat.StringTableOrBuilder>
+ getStringtableFieldBuilder() {
+ if (stringtableBuilder_ == null) {
+ stringtableBuilder_ =
+ new proto4.SingleFieldBuilder<
+ Osmformat.StringTable,
+ Osmformat.StringTable.Builder,
+ Osmformat.StringTableOrBuilder>(
+ getStringtable(), getParentForChildren(), isClean());
+ stringtable_ = null;
+ }
+ return stringtableBuilder_;
+ }
+
+ private java.util.List<Osmformat.PrimitiveGroup> primitivegroup_ =
+ java.util.Collections.emptyList();
+
+ private void ensurePrimitivegroupIsMutable() {
+ if (!((bitField0_ & 0x00000002) != 0)) {
+ primitivegroup_ = new java.util.ArrayList<Osmformat.PrimitiveGroup>(primitivegroup_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.PrimitiveGroup,
+ Osmformat.PrimitiveGroup.Builder,
+ Osmformat.PrimitiveGroupOrBuilder>
+ primitivegroupBuilder_;
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public java.util.List<Osmformat.PrimitiveGroup> getPrimitivegroupList() {
+ if (primitivegroupBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(primitivegroup_);
+ } else {
+ return primitivegroupBuilder_.getMessageList();
+ }
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public int getPrimitivegroupCount() {
+ if (primitivegroupBuilder_ == null) {
+ return primitivegroup_.size();
+ } else {
+ return primitivegroupBuilder_.getCount();
+ }
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Osmformat.PrimitiveGroup getPrimitivegroup(int index) {
+ if (primitivegroupBuilder_ == null) {
+ return primitivegroup_.get(index);
+ } else {
+ return primitivegroupBuilder_.getMessage(index);
+ }
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Builder setPrimitivegroup(int index, Osmformat.PrimitiveGroup value) {
+ if (primitivegroupBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePrimitivegroupIsMutable();
+ primitivegroup_.set(index, value);
+ onChanged();
+ } else {
+ primitivegroupBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Builder setPrimitivegroup(
+ int index, Osmformat.PrimitiveGroup.Builder builderForValue) {
+ if (primitivegroupBuilder_ == null) {
+ ensurePrimitivegroupIsMutable();
+ primitivegroup_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ primitivegroupBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Builder addPrimitivegroup(Osmformat.PrimitiveGroup value) {
+ if (primitivegroupBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePrimitivegroupIsMutable();
+ primitivegroup_.add(value);
+ onChanged();
+ } else {
+ primitivegroupBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Builder addPrimitivegroup(int index, Osmformat.PrimitiveGroup value) {
+ if (primitivegroupBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePrimitivegroupIsMutable();
+ primitivegroup_.add(index, value);
+ onChanged();
+ } else {
+ primitivegroupBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Builder addPrimitivegroup(Osmformat.PrimitiveGroup.Builder builderForValue) {
+ if (primitivegroupBuilder_ == null) {
+ ensurePrimitivegroupIsMutable();
+ primitivegroup_.add(builderForValue.build());
+ onChanged();
+ } else {
+ primitivegroupBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Builder addPrimitivegroup(
+ int index, Osmformat.PrimitiveGroup.Builder builderForValue) {
+ if (primitivegroupBuilder_ == null) {
+ ensurePrimitivegroupIsMutable();
+ primitivegroup_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ primitivegroupBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Builder addAllPrimitivegroup(Iterable<? extends Osmformat.PrimitiveGroup> values) {
+ if (primitivegroupBuilder_ == null) {
+ ensurePrimitivegroupIsMutable();
+ proto4.AbstractMessageLite.Builder.addAll(values, primitivegroup_);
+ onChanged();
+ } else {
+ primitivegroupBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Builder clearPrimitivegroup() {
+ if (primitivegroupBuilder_ == null) {
+ primitivegroup_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ primitivegroupBuilder_.clear();
+ }
+ return this;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Builder removePrimitivegroup(int index) {
+ if (primitivegroupBuilder_ == null) {
+ ensurePrimitivegroupIsMutable();
+ primitivegroup_.remove(index);
+ onChanged();
+ } else {
+ primitivegroupBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Osmformat.PrimitiveGroup.Builder getPrimitivegroupBuilder(int index) {
+ return getPrimitivegroupFieldBuilder().getBuilder(index);
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Osmformat.PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(int index) {
+ if (primitivegroupBuilder_ == null) {
+ return primitivegroup_.get(index);
+ } else {
+ return primitivegroupBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public java.util.List<? extends Osmformat.PrimitiveGroupOrBuilder>
+ getPrimitivegroupOrBuilderList() {
+ if (primitivegroupBuilder_ != null) {
+ return primitivegroupBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(primitivegroup_);
+ }
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Osmformat.PrimitiveGroup.Builder addPrimitivegroupBuilder() {
+ return getPrimitivegroupFieldBuilder()
+ .addBuilder(Osmformat.PrimitiveGroup.getDefaultInstance());
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public Osmformat.PrimitiveGroup.Builder addPrimitivegroupBuilder(int index) {
+ return getPrimitivegroupFieldBuilder()
+ .addBuilder(index, Osmformat.PrimitiveGroup.getDefaultInstance());
+ }
+
+ /** <code>repeated .PrimitiveGroup primitivegroup = 2;</code> */
+ public java.util.List<Osmformat.PrimitiveGroup.Builder> getPrimitivegroupBuilderList() {
+ return getPrimitivegroupFieldBuilder().getBuilderList();
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.PrimitiveGroup,
+ Osmformat.PrimitiveGroup.Builder,
+ Osmformat.PrimitiveGroupOrBuilder>
+ getPrimitivegroupFieldBuilder() {
+ if (primitivegroupBuilder_ == null) {
+ primitivegroupBuilder_ =
+ new proto4.RepeatedFieldBuilder<
+ Osmformat.PrimitiveGroup,
+ Osmformat.PrimitiveGroup.Builder,
+ Osmformat.PrimitiveGroupOrBuilder>(
+ primitivegroup_,
+ ((bitField0_ & 0x00000002) != 0),
+ getParentForChildren(),
+ isClean());
+ primitivegroup_ = null;
+ }
+ return primitivegroupBuilder_;
+ }
+
+ private int granularity_ = 100;
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity, units of nanodegrees, used to store coordinates in this block
+ * </pre>
+ *
+ * <code>optional int32 granularity = 17 [default = 100];</code>
+ *
+ * @return Whether the granularity field is set.
+ */
+ @Override
+ public boolean hasGranularity() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity, units of nanodegrees, used to store coordinates in this block
+ * </pre>
+ *
+ * <code>optional int32 granularity = 17 [default = 100];</code>
+ *
+ * @return The granularity.
+ */
+ @Override
+ 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>
+ *
+ * @param value The granularity to set.
+ * @return This builder for chaining.
+ */
+ public Builder setGranularity(int value) {
+
+ granularity_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity, units of nanodegrees, used to store coordinates in this block
+ * </pre>
+ *
+ * <code>optional int32 granularity = 17 [default = 100];</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearGranularity() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ granularity_ = 100;
+ onChanged();
+ return this;
+ }
+
+ 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>
+ *
+ * @return Whether the latOffset field is set.
+ */
+ @Override
+ public boolean hasLatOffset() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+
+ /**
+ *
+ *
+ * <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>
+ *
+ * @return The latOffset.
+ */
+ @Override
+ 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>
+ *
+ * @param value The latOffset to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLatOffset(long value) {
+
+ latOffset_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ 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>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearLatOffset() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ latOffset_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long lonOffset_;
+
+ /**
+ * <code>optional int64 lon_offset = 20 [default = 0];</code>
+ *
+ * @return Whether the lonOffset field is set.
+ */
+ @Override
+ public boolean hasLonOffset() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+
+ /**
+ * <code>optional int64 lon_offset = 20 [default = 0];</code>
+ *
+ * @return The lonOffset.
+ */
+ @Override
+ public long getLonOffset() {
+ return lonOffset_;
+ }
+
+ /**
+ * <code>optional int64 lon_offset = 20 [default = 0];</code>
+ *
+ * @param value The lonOffset to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLonOffset(long value) {
+
+ lonOffset_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>optional int64 lon_offset = 20 [default = 0];</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearLonOffset() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ lonOffset_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private int dateGranularity_ = 1000;
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+ * </pre>
+ *
+ * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+ *
+ * @return Whether the dateGranularity field is set.
+ */
+ @Override
+ public boolean hasDateGranularity() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
+ * </pre>
+ *
+ * <code>optional int32 date_granularity = 18 [default = 1000];</code>
+ *
+ * @return The dateGranularity.
+ */
+ @Override
+ 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>
+ *
+ * @param value The dateGranularity to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDateGranularity(int value) {
+
+ dateGranularity_ = value;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ 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>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDateGranularity() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ dateGranularity_ = 1000;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:PrimitiveBlock)
+ }
+
+ // @@protoc_insertion_point(class_scope:PrimitiveBlock)
+ private static final Osmformat.PrimitiveBlock DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Osmformat.PrimitiveBlock();
+ }
+
+ public static Osmformat.PrimitiveBlock getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final proto4.Parser<PrimitiveBlock> PARSER =
+ new proto4.AbstractParser<PrimitiveBlock>() {
+ @Override
+ public PrimitiveBlock parsePartialFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (proto4.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new proto4.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static proto4.Parser<PrimitiveBlock> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public proto4.Parser<PrimitiveBlock> getParserForType() {
+ return PARSER;
+ }
+
+ @Override
+ public Osmformat.PrimitiveBlock getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface PrimitiveGroupOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:PrimitiveGroup)
+ proto4.MessageOrBuilder {
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ java.util.List<Osmformat.Node> getNodesList();
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ Osmformat.Node getNodes(int index);
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ int getNodesCount();
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ java.util.List<? extends Osmformat.NodeOrBuilder> getNodesOrBuilderList();
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ Osmformat.NodeOrBuilder getNodesOrBuilder(int index);
+
+ /**
+ * <code>optional .DenseNodes dense = 2;</code>
+ *
+ * @return Whether the dense field is set.
+ */
+ boolean hasDense();
+
+ /**
+ * <code>optional .DenseNodes dense = 2;</code>
+ *
+ * @return The dense.
+ */
+ Osmformat.DenseNodes getDense();
+
+ /** <code>optional .DenseNodes dense = 2;</code> */
+ Osmformat.DenseNodesOrBuilder getDenseOrBuilder();
+
+ /** <code>repeated .Way ways = 3;</code> */
+ java.util.List<Osmformat.Way> getWaysList();
+
+ /** <code>repeated .Way ways = 3;</code> */
+ Osmformat.Way getWays(int index);
+
+ /** <code>repeated .Way ways = 3;</code> */
+ int getWaysCount();
+
+ /** <code>repeated .Way ways = 3;</code> */
+ java.util.List<? extends Osmformat.WayOrBuilder> getWaysOrBuilderList();
+
+ /** <code>repeated .Way ways = 3;</code> */
+ Osmformat.WayOrBuilder getWaysOrBuilder(int index);
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ java.util.List<Osmformat.Relation> getRelationsList();
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ Osmformat.Relation getRelations(int index);
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ int getRelationsCount();
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ java.util.List<? extends Osmformat.RelationOrBuilder> getRelationsOrBuilderList();
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ Osmformat.RelationOrBuilder getRelationsOrBuilder(int index);
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ java.util.List<Osmformat.ChangeSet> getChangesetsList();
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ Osmformat.ChangeSet getChangesets(int index);
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ int getChangesetsCount();
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ java.util.List<? extends Osmformat.ChangeSetOrBuilder> getChangesetsOrBuilderList();
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ Osmformat.ChangeSetOrBuilder getChangesetsOrBuilder(int index);
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Group of OSMPrimitives. All primitives in a group must be the same type.
+ * </pre>
+ *
+ * <p>Protobuf type {@code PrimitiveGroup}
+ */
+ public static final class PrimitiveGroup extends proto4.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:PrimitiveGroup)
+ PrimitiveGroupOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ PrimitiveGroup.class.getName());
+ }
+
+ // Use PrimitiveGroup.newBuilder() to construct.
+ private PrimitiveGroup(proto4.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ }
+
+ private PrimitiveGroup() {
+ nodes_ = java.util.Collections.emptyList();
+ ways_ = java.util.Collections.emptyList();
+ relations_ = java.util.Collections.emptyList();
+ changesets_ = java.util.Collections.emptyList();
+ }
+
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_PrimitiveGroup_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_PrimitiveGroup_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.PrimitiveGroup.class, Osmformat.PrimitiveGroup.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int NODES_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.List<Osmformat.Node> nodes_;
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ @Override
+ public java.util.List<Osmformat.Node> getNodesList() {
+ return nodes_;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ @Override
+ public java.util.List<? extends Osmformat.NodeOrBuilder> getNodesOrBuilderList() {
+ return nodes_;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ @Override
+ public int getNodesCount() {
+ return nodes_.size();
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ @Override
+ public Osmformat.Node getNodes(int index) {
+ return nodes_.get(index);
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ @Override
+ public Osmformat.NodeOrBuilder getNodesOrBuilder(int index) {
+ return nodes_.get(index);
+ }
+
+ public static final int DENSE_FIELD_NUMBER = 2;
+ private Osmformat.DenseNodes dense_;
+
+ /**
+ * <code>optional .DenseNodes dense = 2;</code>
+ *
+ * @return Whether the dense field is set.
+ */
+ @Override
+ public boolean hasDense() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ * <code>optional .DenseNodes dense = 2;</code>
+ *
+ * @return The dense.
+ */
+ @Override
+ public Osmformat.DenseNodes getDense() {
+ return dense_ == null ? Osmformat.DenseNodes.getDefaultInstance() : dense_;
+ }
+
+ /** <code>optional .DenseNodes dense = 2;</code> */
+ @Override
+ public Osmformat.DenseNodesOrBuilder getDenseOrBuilder() {
+ return dense_ == null ? Osmformat.DenseNodes.getDefaultInstance() : dense_;
+ }
+
+ public static final int WAYS_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private java.util.List<Osmformat.Way> ways_;
+
+ /** <code>repeated .Way ways = 3;</code> */
+ @Override
+ public java.util.List<Osmformat.Way> getWaysList() {
+ return ways_;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ @Override
+ public java.util.List<? extends Osmformat.WayOrBuilder> getWaysOrBuilderList() {
+ return ways_;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ @Override
+ public int getWaysCount() {
+ return ways_.size();
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ @Override
+ public Osmformat.Way getWays(int index) {
+ return ways_.get(index);
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ @Override
+ public Osmformat.WayOrBuilder getWaysOrBuilder(int index) {
+ return ways_.get(index);
+ }
+
+ public static final int RELATIONS_FIELD_NUMBER = 4;
+
+ @SuppressWarnings("serial")
+ private java.util.List<Osmformat.Relation> relations_;
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ @Override
+ public java.util.List<Osmformat.Relation> getRelationsList() {
+ return relations_;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ @Override
+ public java.util.List<? extends Osmformat.RelationOrBuilder> getRelationsOrBuilderList() {
+ return relations_;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ @Override
+ public int getRelationsCount() {
+ return relations_.size();
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ @Override
+ public Osmformat.Relation getRelations(int index) {
+ return relations_.get(index);
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ @Override
+ public Osmformat.RelationOrBuilder getRelationsOrBuilder(int index) {
+ return relations_.get(index);
+ }
+
+ public static final int CHANGESETS_FIELD_NUMBER = 5;
+
+ @SuppressWarnings("serial")
+ private java.util.List<Osmformat.ChangeSet> changesets_;
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ @Override
+ public java.util.List<Osmformat.ChangeSet> getChangesetsList() {
+ return changesets_;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ @Override
+ public java.util.List<? extends Osmformat.ChangeSetOrBuilder> getChangesetsOrBuilderList() {
+ return changesets_;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ @Override
+ public int getChangesetsCount() {
+ return changesets_.size();
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ @Override
+ public Osmformat.ChangeSet getChangesets(int index) {
+ return changesets_.get(index);
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ @Override
+ public Osmformat.ChangeSetOrBuilder getChangesetsOrBuilder(int index) {
+ return changesets_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ for (int i = 0; i < getNodesCount(); i++) {
+ if (!getNodes(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ for (int i = 0; i < getWaysCount(); i++) {
+ if (!getWays(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ for (int i = 0; i < getRelationsCount(); i++) {
+ if (!getRelations(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ for (int i = 0; i < getChangesetsCount(); i++) {
+ if (!getChangesets(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(proto4.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < nodes_.size(); i++) {
+ output.writeMessage(1, nodes_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ 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));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < nodes_.size(); i++) {
+ size += proto4.CodedOutputStream.computeMessageSize(1, nodes_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += proto4.CodedOutputStream.computeMessageSize(2, getDense());
+ }
+ for (int i = 0; i < ways_.size(); i++) {
+ size += proto4.CodedOutputStream.computeMessageSize(3, ways_.get(i));
+ }
+ for (int i = 0; i < relations_.size(); i++) {
+ size += proto4.CodedOutputStream.computeMessageSize(4, relations_.get(i));
+ }
+ for (int i = 0; i < changesets_.size(); i++) {
+ size += proto4.CodedOutputStream.computeMessageSize(5, changesets_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Osmformat.PrimitiveGroup)) {
+ return super.equals(obj);
+ }
+ Osmformat.PrimitiveGroup other = (Osmformat.PrimitiveGroup) obj;
+
+ if (!getNodesList().equals(other.getNodesList())) return false;
+ if (hasDense() != other.hasDense()) return false;
+ if (hasDense()) {
+ if (!getDense().equals(other.getDense())) return false;
+ }
+ if (!getWaysList().equals(other.getWaysList())) return false;
+ if (!getRelationsList().equals(other.getRelationsList())) return false;
+ if (!getChangesetsList().equals(other.getChangesetsList())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getNodesCount() > 0) {
+ hash = (37 * hash) + NODES_FIELD_NUMBER;
+ hash = (53 * hash) + getNodesList().hashCode();
+ }
+ if (hasDense()) {
+ hash = (37 * hash) + DENSE_FIELD_NUMBER;
+ hash = (53 * hash) + getDense().hashCode();
+ }
+ if (getWaysCount() > 0) {
+ hash = (37 * hash) + WAYS_FIELD_NUMBER;
+ hash = (53 * hash) + getWaysList().hashCode();
+ }
+ if (getRelationsCount() > 0) {
+ hash = (37 * hash) + RELATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getRelationsList().hashCode();
+ }
+ if (getChangesetsCount() > 0) {
+ hash = (37 * hash) + CHANGESETS_FIELD_NUMBER;
+ hash = (53 * hash) + getChangesetsList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(java.nio.ByteBuffer data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(
+ java.nio.ByteBuffer data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(proto4.ByteString data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(
+ proto4.ByteString data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(byte[] data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(
+ byte[] data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveGroup parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.PrimitiveGroup parseDelimitedFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(proto4.CodedInputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.PrimitiveGroup parseFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Osmformat.PrimitiveGroup prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Group of OSMPrimitives. All primitives in a group must be the same type.
+ * </pre>
+ *
+ * <p>Protobuf type {@code PrimitiveGroup}
+ */
+ public static final class Builder extends proto4.GeneratedMessage.Builder<Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:PrimitiveGroup)
+ Osmformat.PrimitiveGroupOrBuilder {
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_PrimitiveGroup_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat
+ .internal_static_org_apache_sedona_osm_build_PrimitiveGroup_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.PrimitiveGroup.class, Osmformat.PrimitiveGroup.Builder.class);
+ }
+
+ // Construct using Osmformat.PrimitiveGroup.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (proto4.GeneratedMessage.alwaysUseFieldBuilders) {
+ getNodesFieldBuilder();
+ getDenseFieldBuilder();
+ getWaysFieldBuilder();
+ getRelationsFieldBuilder();
+ getChangesetsFieldBuilder();
+ }
+ }
+
+ @Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ if (nodesBuilder_ == null) {
+ nodes_ = java.util.Collections.emptyList();
+ } else {
+ nodes_ = null;
+ nodesBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ dense_ = null;
+ if (denseBuilder_ != null) {
+ denseBuilder_.dispose();
+ denseBuilder_ = null;
+ }
+ if (waysBuilder_ == null) {
+ ways_ = java.util.Collections.emptyList();
+ } else {
+ ways_ = null;
+ waysBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000004);
+ if (relationsBuilder_ == null) {
+ relations_ = java.util.Collections.emptyList();
+ } else {
+ relations_ = null;
+ relationsBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000008);
+ if (changesetsBuilder_ == null) {
+ changesets_ = java.util.Collections.emptyList();
+ } else {
+ changesets_ = null;
+ changesetsBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000010);
+ return this;
+ }
+
+ @Override
+ public proto4.Descriptors.Descriptor getDescriptorForType() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_PrimitiveGroup_descriptor;
+ }
+
+ @Override
+ public Osmformat.PrimitiveGroup getDefaultInstanceForType() {
+ return Osmformat.PrimitiveGroup.getDefaultInstance();
+ }
+
+ @Override
+ public Osmformat.PrimitiveGroup build() {
+ Osmformat.PrimitiveGroup result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @Override
+ public Osmformat.PrimitiveGroup buildPartial() {
+ Osmformat.PrimitiveGroup result = new Osmformat.PrimitiveGroup(this);
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartialRepeatedFields(Osmformat.PrimitiveGroup result) {
+ if (nodesBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ nodes_ = java.util.Collections.unmodifiableList(nodes_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.nodes_ = nodes_;
+ } else {
+ result.nodes_ = nodesBuilder_.build();
+ }
+ if (waysBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) != 0)) {
+ ways_ = java.util.Collections.unmodifiableList(ways_);
+ bitField0_ = (bitField0_ & ~0x00000004);
+ }
+ result.ways_ = ways_;
+ } else {
+ result.ways_ = waysBuilder_.build();
+ }
+ if (relationsBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0)) {
+ relations_ = java.util.Collections.unmodifiableList(relations_);
+ bitField0_ = (bitField0_ & ~0x00000008);
+ }
+ result.relations_ = relations_;
+ } else {
+ result.relations_ = relationsBuilder_.build();
+ }
+ if (changesetsBuilder_ == null) {
+ if (((bitField0_ & 0x00000010) != 0)) {
+ changesets_ = java.util.Collections.unmodifiableList(changesets_);
+ bitField0_ = (bitField0_ & ~0x00000010);
+ }
+ result.changesets_ = changesets_;
+ } else {
+ result.changesets_ = changesetsBuilder_.build();
+ }
+ }
+
+ private void buildPartial0(Osmformat.PrimitiveGroup result) {
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.dense_ = denseBuilder_ == null ? dense_ : denseBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
+ }
+
+ @Override
+ public Builder mergeFrom(proto4.Message other) {
+ if (other instanceof Osmformat.PrimitiveGroup) {
+ return mergeFrom((Osmformat.PrimitiveGroup) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Osmformat.PrimitiveGroup other) {
+ if (other == Osmformat.PrimitiveGroup.getDefaultInstance()) return this;
+ if (nodesBuilder_ == null) {
+ if (!other.nodes_.isEmpty()) {
+ if (nodes_.isEmpty()) {
+ nodes_ = other.nodes_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureNodesIsMutable();
+ nodes_.addAll(other.nodes_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.nodes_.isEmpty()) {
+ if (nodesBuilder_.isEmpty()) {
+ nodesBuilder_.dispose();
+ nodesBuilder_ = null;
+ nodes_ = other.nodes_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ nodesBuilder_ =
+ proto4.GeneratedMessage.alwaysUseFieldBuilders ? getNodesFieldBuilder() : null;
+ } else {
+ nodesBuilder_.addAllMessages(other.nodes_);
+ }
+ }
+ }
+ if (other.hasDense()) {
+ mergeDense(other.getDense());
+ }
+ if (waysBuilder_ == null) {
+ if (!other.ways_.isEmpty()) {
+ if (ways_.isEmpty()) {
+ ways_ = other.ways_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ ensureWaysIsMutable();
+ ways_.addAll(other.ways_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.ways_.isEmpty()) {
+ if (waysBuilder_.isEmpty()) {
+ waysBuilder_.dispose();
+ waysBuilder_ = null;
+ ways_ = other.ways_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ waysBuilder_ =
+ proto4.GeneratedMessage.alwaysUseFieldBuilders ? getWaysFieldBuilder() : null;
+ } else {
+ waysBuilder_.addAllMessages(other.ways_);
+ }
+ }
+ }
+ if (relationsBuilder_ == null) {
+ if (!other.relations_.isEmpty()) {
+ if (relations_.isEmpty()) {
+ relations_ = other.relations_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ } else {
+ ensureRelationsIsMutable();
+ relations_.addAll(other.relations_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.relations_.isEmpty()) {
+ if (relationsBuilder_.isEmpty()) {
+ relationsBuilder_.dispose();
+ relationsBuilder_ = null;
+ relations_ = other.relations_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ relationsBuilder_ =
+ proto4.GeneratedMessage.alwaysUseFieldBuilders
+ ? getRelationsFieldBuilder()
+ : null;
+ } else {
+ relationsBuilder_.addAllMessages(other.relations_);
+ }
+ }
+ }
+ if (changesetsBuilder_ == null) {
+ if (!other.changesets_.isEmpty()) {
+ if (changesets_.isEmpty()) {
+ changesets_ = other.changesets_;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ } else {
+ ensureChangesetsIsMutable();
+ changesets_.addAll(other.changesets_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.changesets_.isEmpty()) {
+ if (changesetsBuilder_.isEmpty()) {
+ changesetsBuilder_.dispose();
+ changesetsBuilder_ = null;
+ changesets_ = other.changesets_;
+ bitField0_ = (bitField0_ & ~0x00000010);
+ changesetsBuilder_ =
+ proto4.GeneratedMessage.alwaysUseFieldBuilders
+ ? getChangesetsFieldBuilder()
+ : null;
+ } else {
+ changesetsBuilder_.addAllMessages(other.changesets_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final boolean isInitialized() {
+ for (int i = 0; i < getNodesCount(); i++) {
+ if (!getNodes(i).isInitialized()) {
+ return false;
+ }
+ }
+ for (int i = 0; i < getWaysCount(); i++) {
+ if (!getWays(i).isInitialized()) {
+ return false;
+ }
+ }
+ for (int i = 0; i < getRelationsCount(); i++) {
+ if (!getRelations(i).isInitialized()) {
+ return false;
+ }
+ }
+ for (int i = 0; i < getChangesetsCount(); i++) {
+ if (!getChangesets(i).isInitialized()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public Builder mergeFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ Osmformat.Node m = input.readMessage(Osmformat.Node.parser(), extensionRegistry);
+ if (nodesBuilder_ == null) {
+ ensureNodesIsMutable();
+ nodes_.add(m);
+ } else {
+ nodesBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 18:
+ {
+ input.readMessage(getDenseFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ case 26:
+ {
+ Osmformat.Way m = input.readMessage(Osmformat.Way.parser(), extensionRegistry);
+ if (waysBuilder_ == null) {
+ ensureWaysIsMutable();
+ ways_.add(m);
+ } else {
+ waysBuilder_.addMessage(m);
+ }
+ break;
+ } // case 26
+ case 34:
+ {
+ Osmformat.Relation m =
+ input.readMessage(Osmformat.Relation.parser(), extensionRegistry);
+ if (relationsBuilder_ == null) {
+ ensureRelationsIsMutable();
+ relations_.add(m);
+ } else {
+ relationsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 34
+ case 42:
+ {
+ Osmformat.ChangeSet m =
+ input.readMessage(Osmformat.ChangeSet.parser(), extensionRegistry);
+ if (changesetsBuilder_ == null) {
+ ensureChangesetsIsMutable();
+ changesets_.add(m);
+ } else {
+ changesetsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 42
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private java.util.List<Osmformat.Node> nodes_ = java.util.Collections.emptyList();
+
+ private void ensureNodesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ nodes_ = new java.util.ArrayList<Osmformat.Node>(nodes_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.Node, Osmformat.Node.Builder, Osmformat.NodeOrBuilder>
+ nodesBuilder_;
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public java.util.List<Osmformat.Node> getNodesList() {
+ if (nodesBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(nodes_);
+ } else {
+ return nodesBuilder_.getMessageList();
+ }
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public int getNodesCount() {
+ if (nodesBuilder_ == null) {
+ return nodes_.size();
+ } else {
+ return nodesBuilder_.getCount();
+ }
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Osmformat.Node getNodes(int index) {
+ if (nodesBuilder_ == null) {
+ return nodes_.get(index);
+ } else {
+ return nodesBuilder_.getMessage(index);
+ }
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Builder setNodes(int index, Osmformat.Node value) {
+ if (nodesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNodesIsMutable();
+ nodes_.set(index, value);
+ onChanged();
+ } else {
+ nodesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Builder setNodes(int index, Osmformat.Node.Builder builderForValue) {
+ if (nodesBuilder_ == null) {
+ ensureNodesIsMutable();
+ nodes_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ nodesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Builder addNodes(Osmformat.Node value) {
+ if (nodesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNodesIsMutable();
+ nodes_.add(value);
+ onChanged();
+ } else {
+ nodesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Builder addNodes(int index, Osmformat.Node value) {
+ if (nodesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNodesIsMutable();
+ nodes_.add(index, value);
+ onChanged();
+ } else {
+ nodesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Builder addNodes(Osmformat.Node.Builder builderForValue) {
+ if (nodesBuilder_ == null) {
+ ensureNodesIsMutable();
+ nodes_.add(builderForValue.build());
+ onChanged();
+ } else {
+ nodesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Builder addNodes(int index, Osmformat.Node.Builder builderForValue) {
+ if (nodesBuilder_ == null) {
+ ensureNodesIsMutable();
+ nodes_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ nodesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Builder addAllNodes(Iterable<? extends Osmformat.Node> values) {
+ if (nodesBuilder_ == null) {
+ ensureNodesIsMutable();
+ proto4.AbstractMessageLite.Builder.addAll(values, nodes_);
+ onChanged();
+ } else {
+ nodesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Builder clearNodes() {
+ if (nodesBuilder_ == null) {
+ nodes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ nodesBuilder_.clear();
+ }
+ return this;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Builder removeNodes(int index) {
+ if (nodesBuilder_ == null) {
+ ensureNodesIsMutable();
+ nodes_.remove(index);
+ onChanged();
+ } else {
+ nodesBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Osmformat.Node.Builder getNodesBuilder(int index) {
+ return getNodesFieldBuilder().getBuilder(index);
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Osmformat.NodeOrBuilder getNodesOrBuilder(int index) {
+ if (nodesBuilder_ == null) {
+ return nodes_.get(index);
+ } else {
+ return nodesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public java.util.List<? extends Osmformat.NodeOrBuilder> getNodesOrBuilderList() {
+ if (nodesBuilder_ != null) {
+ return nodesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(nodes_);
+ }
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Osmformat.Node.Builder addNodesBuilder() {
+ return getNodesFieldBuilder().addBuilder(Osmformat.Node.getDefaultInstance());
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public Osmformat.Node.Builder addNodesBuilder(int index) {
+ return getNodesFieldBuilder().addBuilder(index, Osmformat.Node.getDefaultInstance());
+ }
+
+ /** <code>repeated .Node nodes = 1;</code> */
+ public java.util.List<Osmformat.Node.Builder> getNodesBuilderList() {
+ return getNodesFieldBuilder().getBuilderList();
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.Node, Osmformat.Node.Builder, Osmformat.NodeOrBuilder>
+ getNodesFieldBuilder() {
+ if (nodesBuilder_ == null) {
+ nodesBuilder_ =
+ new proto4.RepeatedFieldBuilder<
+ Osmformat.Node, Osmformat.Node.Builder, Osmformat.NodeOrBuilder>(
+ nodes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+ nodes_ = null;
+ }
+ return nodesBuilder_;
+ }
+
+ private Osmformat.DenseNodes dense_;
+ private proto4.SingleFieldBuilder<
+ Osmformat.DenseNodes, Osmformat.DenseNodes.Builder, Osmformat.DenseNodesOrBuilder>
+ denseBuilder_;
+
+ /**
+ * <code>optional .DenseNodes dense = 2;</code>
+ *
+ * @return Whether the dense field is set.
+ */
+ public boolean hasDense() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ * <code>optional .DenseNodes dense = 2;</code>
+ *
+ * @return The dense.
+ */
+ public Osmformat.DenseNodes getDense() {
+ if (denseBuilder_ == null) {
+ return dense_ == null ? Osmformat.DenseNodes.getDefaultInstance() : dense_;
+ } else {
+ return denseBuilder_.getMessage();
+ }
+ }
+
+ /** <code>optional .DenseNodes dense = 2;</code> */
+ public Builder setDense(Osmformat.DenseNodes value) {
+ if (denseBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ dense_ = value;
+ } else {
+ denseBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /** <code>optional .DenseNodes dense = 2;</code> */
+ public Builder setDense(Osmformat.DenseNodes.Builder builderForValue) {
+ if (denseBuilder_ == null) {
+ dense_ = builderForValue.build();
+ } else {
+ denseBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /** <code>optional .DenseNodes dense = 2;</code> */
+ public Builder mergeDense(Osmformat.DenseNodes value) {
+ if (denseBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && dense_ != null
+ && dense_ != Osmformat.DenseNodes.getDefaultInstance()) {
+ getDenseBuilder().mergeFrom(value);
+ } else {
+ dense_ = value;
+ }
+ } else {
+ denseBuilder_.mergeFrom(value);
+ }
+ if (dense_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+
+ /** <code>optional .DenseNodes dense = 2;</code> */
+ public Builder clearDense() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ dense_ = null;
+ if (denseBuilder_ != null) {
+ denseBuilder_.dispose();
+ denseBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /** <code>optional .DenseNodes dense = 2;</code> */
+ public Osmformat.DenseNodes.Builder getDenseBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getDenseFieldBuilder().getBuilder();
+ }
+
+ /** <code>optional .DenseNodes dense = 2;</code> */
+ public Osmformat.DenseNodesOrBuilder getDenseOrBuilder() {
+ if (denseBuilder_ != null) {
+ return denseBuilder_.getMessageOrBuilder();
+ } else {
+ return dense_ == null ? Osmformat.DenseNodes.getDefaultInstance() : dense_;
+ }
+ }
+
+ /** <code>optional .DenseNodes dense = 2;</code> */
+ private proto4.SingleFieldBuilder<
+ Osmformat.DenseNodes, Osmformat.DenseNodes.Builder, Osmformat.DenseNodesOrBuilder>
+ getDenseFieldBuilder() {
+ if (denseBuilder_ == null) {
+ denseBuilder_ =
+ new proto4.SingleFieldBuilder<
+ Osmformat.DenseNodes,
+ Osmformat.DenseNodes.Builder,
+ Osmformat.DenseNodesOrBuilder>(getDense(), getParentForChildren(), isClean());
+ dense_ = null;
+ }
+ return denseBuilder_;
+ }
+
+ private java.util.List<Osmformat.Way> ways_ = java.util.Collections.emptyList();
+
+ private void ensureWaysIsMutable() {
+ if (!((bitField0_ & 0x00000004) != 0)) {
+ ways_ = new java.util.ArrayList<Osmformat.Way>(ways_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.Way, Osmformat.Way.Builder, Osmformat.WayOrBuilder>
+ waysBuilder_;
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public java.util.List<Osmformat.Way> getWaysList() {
+ if (waysBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(ways_);
+ } else {
+ return waysBuilder_.getMessageList();
+ }
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public int getWaysCount() {
+ if (waysBuilder_ == null) {
+ return ways_.size();
+ } else {
+ return waysBuilder_.getCount();
+ }
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Osmformat.Way getWays(int index) {
+ if (waysBuilder_ == null) {
+ return ways_.get(index);
+ } else {
+ return waysBuilder_.getMessage(index);
+ }
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Builder setWays(int index, Osmformat.Way value) {
+ if (waysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWaysIsMutable();
+ ways_.set(index, value);
+ onChanged();
+ } else {
+ waysBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Builder setWays(int index, Osmformat.Way.Builder builderForValue) {
+ if (waysBuilder_ == null) {
+ ensureWaysIsMutable();
+ ways_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ waysBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Builder addWays(Osmformat.Way value) {
+ if (waysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWaysIsMutable();
+ ways_.add(value);
+ onChanged();
+ } else {
+ waysBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Builder addWays(int index, Osmformat.Way value) {
+ if (waysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWaysIsMutable();
+ ways_.add(index, value);
+ onChanged();
+ } else {
+ waysBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Builder addWays(Osmformat.Way.Builder builderForValue) {
+ if (waysBuilder_ == null) {
+ ensureWaysIsMutable();
+ ways_.add(builderForValue.build());
+ onChanged();
+ } else {
+ waysBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Builder addWays(int index, Osmformat.Way.Builder builderForValue) {
+ if (waysBuilder_ == null) {
+ ensureWaysIsMutable();
+ ways_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ waysBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Builder addAllWays(Iterable<? extends Osmformat.Way> values) {
+ if (waysBuilder_ == null) {
+ ensureWaysIsMutable();
+ proto4.AbstractMessageLite.Builder.addAll(values, ways_);
+ onChanged();
+ } else {
+ waysBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Builder clearWays() {
+ if (waysBuilder_ == null) {
+ ways_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ waysBuilder_.clear();
+ }
+ return this;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Builder removeWays(int index) {
+ if (waysBuilder_ == null) {
+ ensureWaysIsMutable();
+ ways_.remove(index);
+ onChanged();
+ } else {
+ waysBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Osmformat.Way.Builder getWaysBuilder(int index) {
+ return getWaysFieldBuilder().getBuilder(index);
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Osmformat.WayOrBuilder getWaysOrBuilder(int index) {
+ if (waysBuilder_ == null) {
+ return ways_.get(index);
+ } else {
+ return waysBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public java.util.List<? extends Osmformat.WayOrBuilder> getWaysOrBuilderList() {
+ if (waysBuilder_ != null) {
+ return waysBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(ways_);
+ }
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Osmformat.Way.Builder addWaysBuilder() {
+ return getWaysFieldBuilder().addBuilder(Osmformat.Way.getDefaultInstance());
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public Osmformat.Way.Builder addWaysBuilder(int index) {
+ return getWaysFieldBuilder().addBuilder(index, Osmformat.Way.getDefaultInstance());
+ }
+
+ /** <code>repeated .Way ways = 3;</code> */
+ public java.util.List<Osmformat.Way.Builder> getWaysBuilderList() {
+ return getWaysFieldBuilder().getBuilderList();
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.Way, Osmformat.Way.Builder, Osmformat.WayOrBuilder>
+ getWaysFieldBuilder() {
+ if (waysBuilder_ == null) {
+ waysBuilder_ =
+ new proto4.RepeatedFieldBuilder<
+ Osmformat.Way, Osmformat.Way.Builder, Osmformat.WayOrBuilder>(
+ ways_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
+ ways_ = null;
+ }
+ return waysBuilder_;
+ }
+
+ private java.util.List<Osmformat.Relation> relations_ = java.util.Collections.emptyList();
+
+ private void ensureRelationsIsMutable() {
+ if (!((bitField0_ & 0x00000008) != 0)) {
+ relations_ = new java.util.ArrayList<Osmformat.Relation>(relations_);
+ bitField0_ |= 0x00000008;
+ }
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.Relation, Osmformat.Relation.Builder, Osmformat.RelationOrBuilder>
+ relationsBuilder_;
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public java.util.List<Osmformat.Relation> getRelationsList() {
+ if (relationsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(relations_);
+ } else {
+ return relationsBuilder_.getMessageList();
+ }
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public int getRelationsCount() {
+ if (relationsBuilder_ == null) {
+ return relations_.size();
+ } else {
+ return relationsBuilder_.getCount();
+ }
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Osmformat.Relation getRelations(int index) {
+ if (relationsBuilder_ == null) {
+ return relations_.get(index);
+ } else {
+ return relationsBuilder_.getMessage(index);
+ }
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Builder setRelations(int index, Osmformat.Relation value) {
+ if (relationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRelationsIsMutable();
+ relations_.set(index, value);
+ onChanged();
+ } else {
+ relationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Builder setRelations(int index, Osmformat.Relation.Builder builderForValue) {
+ if (relationsBuilder_ == null) {
+ ensureRelationsIsMutable();
+ relations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ relationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Builder addRelations(Osmformat.Relation value) {
+ if (relationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRelationsIsMutable();
+ relations_.add(value);
+ onChanged();
+ } else {
+ relationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Builder addRelations(int index, Osmformat.Relation value) {
+ if (relationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRelationsIsMutable();
+ relations_.add(index, value);
+ onChanged();
+ } else {
+ relationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Builder addRelations(Osmformat.Relation.Builder builderForValue) {
+ if (relationsBuilder_ == null) {
+ ensureRelationsIsMutable();
+ relations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ relationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Builder addRelations(int index, Osmformat.Relation.Builder builderForValue) {
+ if (relationsBuilder_ == null) {
+ ensureRelationsIsMutable();
+ relations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ relationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Builder addAllRelations(Iterable<? extends Osmformat.Relation> values) {
+ if (relationsBuilder_ == null) {
+ ensureRelationsIsMutable();
+ proto4.AbstractMessageLite.Builder.addAll(values, relations_);
+ onChanged();
+ } else {
+ relationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Builder clearRelations() {
+ if (relationsBuilder_ == null) {
+ relations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ relationsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Builder removeRelations(int index) {
+ if (relationsBuilder_ == null) {
+ ensureRelationsIsMutable();
+ relations_.remove(index);
+ onChanged();
+ } else {
+ relationsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Osmformat.Relation.Builder getRelationsBuilder(int index) {
+ return getRelationsFieldBuilder().getBuilder(index);
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Osmformat.RelationOrBuilder getRelationsOrBuilder(int index) {
+ if (relationsBuilder_ == null) {
+ return relations_.get(index);
+ } else {
+ return relationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public java.util.List<? extends Osmformat.RelationOrBuilder> getRelationsOrBuilderList() {
+ if (relationsBuilder_ != null) {
+ return relationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(relations_);
+ }
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Osmformat.Relation.Builder addRelationsBuilder() {
+ return getRelationsFieldBuilder().addBuilder(Osmformat.Relation.getDefaultInstance());
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public Osmformat.Relation.Builder addRelationsBuilder(int index) {
+ return getRelationsFieldBuilder()
+ .addBuilder(index, Osmformat.Relation.getDefaultInstance());
+ }
+
+ /** <code>repeated .Relation relations = 4;</code> */
+ public java.util.List<Osmformat.Relation.Builder> getRelationsBuilderList() {
+ return getRelationsFieldBuilder().getBuilderList();
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.Relation, Osmformat.Relation.Builder, Osmformat.RelationOrBuilder>
+ getRelationsFieldBuilder() {
+ if (relationsBuilder_ == null) {
+ relationsBuilder_ =
+ new proto4.RepeatedFieldBuilder<
+ Osmformat.Relation, Osmformat.Relation.Builder, Osmformat.RelationOrBuilder>(
+ relations_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
+ relations_ = null;
+ }
+ return relationsBuilder_;
+ }
+
+ private java.util.List<Osmformat.ChangeSet> changesets_ = java.util.Collections.emptyList();
+
+ private void ensureChangesetsIsMutable() {
+ if (!((bitField0_ & 0x00000010) != 0)) {
+ changesets_ = new java.util.ArrayList<Osmformat.ChangeSet>(changesets_);
+ bitField0_ |= 0x00000010;
+ }
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.ChangeSet, Osmformat.ChangeSet.Builder, Osmformat.ChangeSetOrBuilder>
+ changesetsBuilder_;
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public java.util.List<Osmformat.ChangeSet> getChangesetsList() {
+ if (changesetsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(changesets_);
+ } else {
+ return changesetsBuilder_.getMessageList();
+ }
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public int getChangesetsCount() {
+ if (changesetsBuilder_ == null) {
+ return changesets_.size();
+ } else {
+ return changesetsBuilder_.getCount();
+ }
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Osmformat.ChangeSet getChangesets(int index) {
+ if (changesetsBuilder_ == null) {
+ return changesets_.get(index);
+ } else {
+ return changesetsBuilder_.getMessage(index);
+ }
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Builder setChangesets(int index, Osmformat.ChangeSet value) {
+ if (changesetsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureChangesetsIsMutable();
+ changesets_.set(index, value);
+ onChanged();
+ } else {
+ changesetsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Builder setChangesets(int index, Osmformat.ChangeSet.Builder builderForValue) {
+ if (changesetsBuilder_ == null) {
+ ensureChangesetsIsMutable();
+ changesets_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ changesetsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Builder addChangesets(Osmformat.ChangeSet value) {
+ if (changesetsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureChangesetsIsMutable();
+ changesets_.add(value);
+ onChanged();
+ } else {
+ changesetsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Builder addChangesets(int index, Osmformat.ChangeSet value) {
+ if (changesetsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureChangesetsIsMutable();
+ changesets_.add(index, value);
+ onChanged();
+ } else {
+ changesetsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Builder addChangesets(Osmformat.ChangeSet.Builder builderForValue) {
+ if (changesetsBuilder_ == null) {
+ ensureChangesetsIsMutable();
+ changesets_.add(builderForValue.build());
+ onChanged();
+ } else {
+ changesetsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Builder addChangesets(int index, Osmformat.ChangeSet.Builder builderForValue) {
+ if (changesetsBuilder_ == null) {
+ ensureChangesetsIsMutable();
+ changesets_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ changesetsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Builder addAllChangesets(Iterable<? extends Osmformat.ChangeSet> values) {
+ if (changesetsBuilder_ == null) {
+ ensureChangesetsIsMutable();
+ proto4.AbstractMessageLite.Builder.addAll(values, changesets_);
+ onChanged();
+ } else {
+ changesetsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Builder clearChangesets() {
+ if (changesetsBuilder_ == null) {
+ changesets_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ } else {
+ changesetsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Builder removeChangesets(int index) {
+ if (changesetsBuilder_ == null) {
+ ensureChangesetsIsMutable();
+ changesets_.remove(index);
+ onChanged();
+ } else {
+ changesetsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Osmformat.ChangeSet.Builder getChangesetsBuilder(int index) {
+ return getChangesetsFieldBuilder().getBuilder(index);
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Osmformat.ChangeSetOrBuilder getChangesetsOrBuilder(int index) {
+ if (changesetsBuilder_ == null) {
+ return changesets_.get(index);
+ } else {
+ return changesetsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public java.util.List<? extends Osmformat.ChangeSetOrBuilder> getChangesetsOrBuilderList() {
+ if (changesetsBuilder_ != null) {
+ return changesetsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(changesets_);
+ }
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Osmformat.ChangeSet.Builder addChangesetsBuilder() {
+ return getChangesetsFieldBuilder().addBuilder(Osmformat.ChangeSet.getDefaultInstance());
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public Osmformat.ChangeSet.Builder addChangesetsBuilder(int index) {
+ return getChangesetsFieldBuilder()
+ .addBuilder(index, Osmformat.ChangeSet.getDefaultInstance());
+ }
+
+ /** <code>repeated .ChangeSet changesets = 5;</code> */
+ public java.util.List<Osmformat.ChangeSet.Builder> getChangesetsBuilderList() {
+ return getChangesetsFieldBuilder().getBuilderList();
+ }
+
+ private proto4.RepeatedFieldBuilder<
+ Osmformat.ChangeSet, Osmformat.ChangeSet.Builder, Osmformat.ChangeSetOrBuilder>
+ getChangesetsFieldBuilder() {
+ if (changesetsBuilder_ == null) {
+ changesetsBuilder_ =
+ new proto4.RepeatedFieldBuilder<
+ Osmformat.ChangeSet, Osmformat.ChangeSet.Builder, Osmformat.ChangeSetOrBuilder>(
+ changesets_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean());
+ changesets_ = null;
+ }
+ return changesetsBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:PrimitiveGroup)
+ }
+
+ // @@protoc_insertion_point(class_scope:PrimitiveGroup)
+ private static final Osmformat.PrimitiveGroup DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Osmformat.PrimitiveGroup();
+ }
+
+ public static Osmformat.PrimitiveGroup getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final proto4.Parser<PrimitiveGroup> PARSER =
+ new proto4.AbstractParser<PrimitiveGroup>() {
+ @Override
+ public PrimitiveGroup parsePartialFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (proto4.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new proto4.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static proto4.Parser<PrimitiveGroup> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public proto4.Parser<PrimitiveGroup> getParserForType() {
+ return PARSER;
+ }
+
+ @Override
+ public Osmformat.PrimitiveGroup getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface StringTableOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:StringTable)
+ proto4.MessageOrBuilder {
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @return A list containing the s.
+ */
+ java.util.List<proto4.ByteString> getSList();
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @return The count of s.
+ */
+ int getSCount();
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @param index The index of the element to return.
+ * @return The s at the given index.
+ */
+ proto4.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>
+ *
+ * <p>Protobuf type {@code StringTable}
+ */
+ public static final class StringTable extends proto4.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:StringTable)
+ StringTableOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ StringTable.class.getName());
+ }
+
+ // Use StringTable.newBuilder() to construct.
+ private StringTable(proto4.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ }
+
+ private StringTable() {
+ s_ = emptyList(proto4.ByteString.class);
+ }
+
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_StringTable_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_StringTable_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.StringTable.class, Osmformat.StringTable.Builder.class);
+ }
+
+ public static final int S_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private proto4.Internal.ProtobufList<proto4.ByteString> s_ = emptyList(proto4.ByteString.class);
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @return A list containing the s.
+ */
+ @Override
+ public java.util.List<proto4.ByteString> getSList() {
+ return s_;
+ }
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @return The count of s.
+ */
+ public int getSCount() {
+ return s_.size();
+ }
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @param index The index of the element to return.
+ * @return The s at the given index.
+ */
+ public proto4.ByteString getS(int index) {
+ return s_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(proto4.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < s_.size(); i++) {
+ output.writeBytes(1, s_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < s_.size(); i++) {
+ dataSize += proto4.CodedOutputStream.computeBytesSizeNoTag(s_.get(i));
+ }
+ size += dataSize;
+ size += 1 * getSList().size();
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Osmformat.StringTable)) {
+ return super.equals(obj);
+ }
+ Osmformat.StringTable other = (Osmformat.StringTable) obj;
+
+ if (!getSList().equals(other.getSList())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getSCount() > 0) {
+ hash = (37 * hash) + S_FIELD_NUMBER;
+ hash = (53 * hash) + getSList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Osmformat.StringTable parseFrom(java.nio.ByteBuffer data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.StringTable parseFrom(
+ java.nio.ByteBuffer data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.StringTable parseFrom(proto4.ByteString data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.StringTable parseFrom(
+ proto4.ByteString data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.StringTable parseFrom(byte[] data)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Osmformat.StringTable parseFrom(
+ byte[] data, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Osmformat.StringTable parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.StringTable parseFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.StringTable parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.StringTable parseDelimitedFrom(
+ java.io.InputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Osmformat.StringTable parseFrom(proto4.CodedInputStream input)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static Osmformat.StringTable parseFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return proto4.GeneratedMessage.parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Osmformat.StringTable prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * <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>
+ *
+ * <p>Protobuf type {@code StringTable}
+ */
+ public static final class Builder extends proto4.GeneratedMessage.Builder<Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:StringTable)
+ Osmformat.StringTableOrBuilder {
+ public static final proto4.Descriptors.Descriptor getDescriptor() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_StringTable_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_StringTable_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Osmformat.StringTable.class, Osmformat.StringTable.Builder.class);
+ }
+
+ // Construct using Osmformat.StringTable.newBuilder()
+ private Builder() {}
+
+ private Builder(BuilderParent parent) {
+ super(parent);
+ }
+
+ @Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ s_ = emptyList(proto4.ByteString.class);
+ return this;
+ }
+
+ @Override
+ public proto4.Descriptors.Descriptor getDescriptorForType() {
+ return Osmformat.internal_static_org_apache_sedona_osm_build_StringTable_descriptor;
+ }
+
+ @Override
+ public Osmformat.StringTable getDefaultInstanceForType() {
+ return Osmformat.StringTable.getDefaultInstance();
+ }
+
+ @Override
+ public Osmformat.StringTable build() {
+ Osmformat.StringTable result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @Override
+ public Osmformat.StringTable buildPartial() {
+ Osmformat.StringTable result = new Osmformat.StringTable(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(Osmformat.StringTable result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ s_.makeImmutable();
+ result.s_ = s_;
+ }
+ }
+
+ @Override
+ public Builder mergeFrom(proto4.Message other) {
+ if (other instanceof Osmformat.StringTable) {
+ return mergeFrom((Osmformat.StringTable) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Osmformat.StringTable other) {
+ if (other == Osmformat.StringTable.getDefaultInstance()) return this;
+ if (!other.s_.isEmpty()) {
+ if (s_.isEmpty()) {
+ s_ = other.s_;
+ s_.makeImmutable();
+ bitField0_ |= 0x00000001;
+ } else {
+ ensureSIsMutable();
+ s_.addAll(other.s_);
+ }
+ onChanged();
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @Override
+ public Builder mergeFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ proto4.ByteString v = input.readBytes();
+ ensureSIsMutable();
+ s_.add(v);
+ break;
+ } // case 10
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private proto4.Internal.ProtobufList<proto4.ByteString> s_ =
+ emptyList(proto4.ByteString.class);
+
+ private void ensureSIsMutable() {
+ if (!s_.isModifiable()) {
+ s_ = makeMutableCopy(s_);
+ }
+ bitField0_ |= 0x00000001;
+ }
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @return A list containing the s.
+ */
+ public java.util.List<proto4.ByteString> getSList() {
+ s_.makeImmutable();
+ return s_;
+ }
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @return The count of s.
+ */
+ public int getSCount() {
+ return s_.size();
+ }
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @param index The index of the element to return.
+ * @return The s at the given index.
+ */
+ public proto4.ByteString getS(int index) {
+ return s_.get(index);
+ }
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @param index The index to set the value at.
+ * @param value The s to set.
+ * @return This builder for chaining.
+ */
+ public Builder setS(int index, proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSIsMutable();
+ s_.set(index, value);
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @param value The s to add.
+ * @return This builder for chaining.
+ */
+ public Builder addS(proto4.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSIsMutable();
+ s_.add(value);
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @param values The s to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllS(Iterable<? extends proto4.ByteString> values) {
+ ensureSIsMutable();
+ proto4.AbstractMessageLite.Builder.addAll(values, s_);
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * <code>repeated bytes s = 1;</code>
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearS() {
+ s_ = emptyList(proto4.ByteString.class);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:StringTable)
+ }
+
+ // @@protoc_insertion_point(class_scope:StringTable)
+ private static final Osmformat.StringTable DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Osmformat.StringTable();
+ }
+
+ public static Osmformat.StringTable getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final proto4.Parser<StringTable> PARSER =
+ new proto4.AbstractParser<StringTable>() {
+ @Override
+ public StringTable parsePartialFrom(
+ proto4.CodedInputStream input, proto4.ExtensionRegistryLite extensionRegistry)
+ throws proto4.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (proto4.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (proto4.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new proto4.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static proto4.Parser<StringTable> parser() {
+ return PARSER;
+ }
+
+ @Override
+ public proto4.Parser<StringTable> getParserForType() {
+ return PARSER;
+ }
+
+ @Override
+ public Osmformat.StringTable getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface InfoOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:Info)
+ proto4.MessageOrBuilder {
+
+ /**
+ * <code>optional int32 version = 1 [default = -1];</code>
+ *
+ * @return Whether the version field is set.
+ */
+ boolean hasVersion();
+
+ /**
+ * <code>optional int32 version = 1 [default = -1];</code>
+ *
+ * @return The version.
+ */
+ int getVersion();
+
+ /**
+ * <code>optional int64 timestamp = 2;</code>
+ *
+ * @return Whether the timestamp field is set.
+ */
+ boolean hasTimestamp();
+
+ /**
+ * <code>optional int64 timestamp = 2;</code>
+ *
+ * @return The timestamp.
+ */
+ long getTimestamp();
+
+ /**
+ * <code>optional int64 changeset = 3;</code>
+ *
+ * @return Whether the changeset field is set.
+ */
+ boolean hasChangeset();
+
+ /**
+ * <code>optional int64 changeset = 3;</code>
+ *
+ * @return The changeset.
+ */
+ long getChangeset();
+
+ /**
+ * <code>optional int32 uid = 4;</code>
+ *
+ * @return Whether the uid field is set.
+ */
+ boolean hasUid();
+
+ /**
+ * <code>optional int32 uid = 4;</code>
+ *
+ * @return The uid.
+ */
+ int getUid();
+
+ /**
+ *
+ *
+ * <pre>
+ * String IDs
+ * </pre>
+ *
+ * <code>optional uint32 user_sid = 5;</code>
+ *
+ * @return Whether the userSid field is set.
+ */
+ boolean hasUserSid();
+
+ /**
+ *
+ *
+ * <pre>
+ * String IDs
+ * </pre>
+ *
+ * <code>optional uint32 user_sid = 5;</code>
+ *
+ * @return The userSid.
+ */
+ 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>
+ *
+ * @return Whether the visible field is set.
+ */
+ 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>
+ *
+ * @return The visible.
+ */
+ boolean getVisible();
+ }
+
+ /**
+ *
+ *
+ * <pre>
+ * Optional metadata that may be included into each primitive.
+ * </pre>
+ *
+ * <p>Protobuf type {@code Info}
+ */
+ public static final class Info extends proto4.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:Info)
+ InfoOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ proto4.RuntimeVersion.validateProtobufGencodeVersion(
+ proto4.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 27,
+ /* patch= */ 0,
+ /* suffix= */ "",
+ Info.class.getName());
+ }
+
+ // Use Info.newBuilder() to construct.
+ private Info(proto4.GeneratedMessage.Builder<?> builder) {
+ super(builder);
+ }
... 12809 lines suppressed ...