diff --git a/core/pom.xml b/core/pom.xml new file mode 100644 index 00000000..4fb0d495 --- /dev/null +++ b/core/pom.xml @@ -0,0 +1,150 @@ + + + 4.0.0 + + flatmap-core + + + com.onthegomap + flatmap-parent + 0.1-SNAPSHOT + + + + 2.3 + 25.0 + 5.7.1 + 2.12.3 + 2.14.1 + 0.11.0 + + + + + com.graphhopper + graphhopper-reader-osm + ${graphhopper.version} + + + org.locationtech.jts + jts-core + 1.18.0 + + + org.geotools + gt-shapefile + ${geotools.version} + + + org.geotools + gt-epsg-hsql + ${geotools.version} + + + org.xerial + sqlite-jdbc + 3.34.0 + + + org.mapdb + mapdb + 3.0.8 + + + org.msgpack + msgpack-core + 0.8.22 + + + org.slf4j + slf4j-api + 1.7.30 + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + ${jackson.version} + + + io.prometheus + simpleclient + ${prometheus.version} + + + io.prometheus + simpleclient_common + ${prometheus.version} + + + io.prometheus + simpleclient_pushgateway + ${prometheus.version} + + + io.prometheus + simpleclient_hotspot + ${prometheus.version} + + + + org.junit.jupiter + junit-jupiter-api + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-params + ${junit.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + + + org.mockito + mockito-core + 3.9.0 + test + + + + + + + src/test/resources + true + + + + diff --git a/src/main/java/com/graphhopper/reader/ReaderElementUtils.java b/core/src/main/java/com/graphhopper/reader/ReaderElementUtils.java similarity index 100% rename from src/main/java/com/graphhopper/reader/ReaderElementUtils.java rename to core/src/main/java/com/graphhopper/reader/ReaderElementUtils.java diff --git a/src/main/java/com/onthegomap/flatmap/Arguments.java b/core/src/main/java/com/onthegomap/flatmap/Arguments.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/Arguments.java rename to core/src/main/java/com/onthegomap/flatmap/Arguments.java diff --git a/src/main/java/com/onthegomap/flatmap/BoundsProvider.java b/core/src/main/java/com/onthegomap/flatmap/BoundsProvider.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/BoundsProvider.java rename to core/src/main/java/com/onthegomap/flatmap/BoundsProvider.java diff --git a/src/main/java/com/onthegomap/flatmap/CommonParams.java b/core/src/main/java/com/onthegomap/flatmap/CommonParams.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/CommonParams.java rename to core/src/main/java/com/onthegomap/flatmap/CommonParams.java diff --git a/src/main/java/com/onthegomap/flatmap/FeatureCollector.java b/core/src/main/java/com/onthegomap/flatmap/FeatureCollector.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/FeatureCollector.java rename to core/src/main/java/com/onthegomap/flatmap/FeatureCollector.java diff --git a/src/main/java/com/onthegomap/flatmap/FeatureMerge.java b/core/src/main/java/com/onthegomap/flatmap/FeatureMerge.java similarity index 99% rename from src/main/java/com/onthegomap/flatmap/FeatureMerge.java rename to core/src/main/java/com/onthegomap/flatmap/FeatureMerge.java index 1ca5ff42..d316205d 100644 --- a/src/main/java/com/onthegomap/flatmap/FeatureMerge.java +++ b/core/src/main/java/com/onthegomap/flatmap/FeatureMerge.java @@ -121,7 +121,7 @@ public class FeatureMerge { current.addPoint(lastX, lastY); } - if (!current.isEmpty()) { + if (current.size() >= 2) { output.add(GeoUtils.JTS_FACTORY.createLineString(current)); } } diff --git a/src/main/java/com/onthegomap/flatmap/FileUtils.java b/core/src/main/java/com/onthegomap/flatmap/FileUtils.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/FileUtils.java rename to core/src/main/java/com/onthegomap/flatmap/FileUtils.java diff --git a/src/main/java/com/onthegomap/flatmap/Format.java b/core/src/main/java/com/onthegomap/flatmap/Format.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/Format.java rename to core/src/main/java/com/onthegomap/flatmap/Format.java diff --git a/src/main/java/com/onthegomap/flatmap/GeometryType.java b/core/src/main/java/com/onthegomap/flatmap/GeometryType.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/GeometryType.java rename to core/src/main/java/com/onthegomap/flatmap/GeometryType.java diff --git a/src/main/java/com/onthegomap/flatmap/LayerStats.java b/core/src/main/java/com/onthegomap/flatmap/LayerStats.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/LayerStats.java rename to core/src/main/java/com/onthegomap/flatmap/LayerStats.java diff --git a/src/main/java/com/onthegomap/flatmap/MemoryEstimator.java b/core/src/main/java/com/onthegomap/flatmap/MemoryEstimator.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/MemoryEstimator.java rename to core/src/main/java/com/onthegomap/flatmap/MemoryEstimator.java diff --git a/src/main/java/com/onthegomap/flatmap/OpenMapTilesMain.java b/core/src/main/java/com/onthegomap/flatmap/OpenMapTilesMain.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/OpenMapTilesMain.java rename to core/src/main/java/com/onthegomap/flatmap/OpenMapTilesMain.java diff --git a/src/main/java/com/onthegomap/flatmap/Parse.java b/core/src/main/java/com/onthegomap/flatmap/Parse.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/Parse.java rename to core/src/main/java/com/onthegomap/flatmap/Parse.java diff --git a/src/main/java/com/onthegomap/flatmap/Profile.java b/core/src/main/java/com/onthegomap/flatmap/Profile.java similarity index 71% rename from src/main/java/com/onthegomap/flatmap/Profile.java rename to core/src/main/java/com/onthegomap/flatmap/Profile.java index 4d5c3dcd..bf305919 100644 --- a/src/main/java/com/onthegomap/flatmap/Profile.java +++ b/core/src/main/java/com/onthegomap/flatmap/Profile.java @@ -7,14 +7,19 @@ import java.util.List; public interface Profile { - List preprocessOsmRelation(ReaderRelation relation); + default List preprocessOsmRelation(ReaderRelation relation) { + return null; + } void processFeature(SourceFeature sourceFeature, FeatureCollector features); - void release(); + default void release() { + } - List postProcessLayerFeatures(String layer, int zoom, - List items) throws GeometryException; + default List postProcessLayerFeatures(String layer, int zoom, + List items) throws GeometryException { + return items; + } String name(); @@ -30,23 +35,17 @@ public interface Profile { return null; } + default boolean isOverlay() { + return false; + } + class NullProfile implements Profile { - @Override - public List preprocessOsmRelation(ReaderRelation relation) { - return null; - } - @Override public void processFeature(SourceFeature sourceFeature, FeatureCollector features) { } - @Override - public void release() { - - } - @Override public List postProcessLayerFeatures(String layer, int zoom, List items) { diff --git a/src/main/java/com/onthegomap/flatmap/SourceFeature.java b/core/src/main/java/com/onthegomap/flatmap/SourceFeature.java similarity index 96% rename from src/main/java/com/onthegomap/flatmap/SourceFeature.java rename to core/src/main/java/com/onthegomap/flatmap/SourceFeature.java index de740d6f..9d73cfc8 100644 --- a/src/main/java/com/onthegomap/flatmap/SourceFeature.java +++ b/core/src/main/java/com/onthegomap/flatmap/SourceFeature.java @@ -15,13 +15,15 @@ public abstract class SourceFeature { private final String source; private final String sourceLayer; private final List relationInfos; + private final long id; protected SourceFeature(Map properties, String source, String sourceLayer, - List relationInfos) { + List relationInfos, long id) { this.properties = properties; this.source = source; this.sourceLayer = sourceLayer; this.relationInfos = relationInfos; + this.id = id; } public abstract Geometry latLonGeometry() throws GeometryException; @@ -168,4 +170,8 @@ public abstract class SourceFeature { } return result == null ? List.of() : result; } + + public final long id() { + return id; + } } diff --git a/src/main/java/com/onthegomap/flatmap/TileExtents.java b/core/src/main/java/com/onthegomap/flatmap/TileExtents.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/TileExtents.java rename to core/src/main/java/com/onthegomap/flatmap/TileExtents.java diff --git a/src/main/java/com/onthegomap/flatmap/Translations.java b/core/src/main/java/com/onthegomap/flatmap/Translations.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/Translations.java rename to core/src/main/java/com/onthegomap/flatmap/Translations.java diff --git a/src/main/java/com/onthegomap/flatmap/VectorTileEncoder.java b/core/src/main/java/com/onthegomap/flatmap/VectorTileEncoder.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/VectorTileEncoder.java rename to core/src/main/java/com/onthegomap/flatmap/VectorTileEncoder.java diff --git a/src/main/java/com/onthegomap/flatmap/Wikidata.java b/core/src/main/java/com/onthegomap/flatmap/Wikidata.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/Wikidata.java rename to core/src/main/java/com/onthegomap/flatmap/Wikidata.java diff --git a/src/main/java/com/onthegomap/flatmap/ZoomFunction.java b/core/src/main/java/com/onthegomap/flatmap/ZoomFunction.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/ZoomFunction.java rename to core/src/main/java/com/onthegomap/flatmap/ZoomFunction.java diff --git a/src/main/java/com/onthegomap/flatmap/collections/CacheByZoom.java b/core/src/main/java/com/onthegomap/flatmap/collections/CacheByZoom.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/collections/CacheByZoom.java rename to core/src/main/java/com/onthegomap/flatmap/collections/CacheByZoom.java diff --git a/src/main/java/com/onthegomap/flatmap/collections/CommonStringEncoder.java b/core/src/main/java/com/onthegomap/flatmap/collections/CommonStringEncoder.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/collections/CommonStringEncoder.java rename to core/src/main/java/com/onthegomap/flatmap/collections/CommonStringEncoder.java diff --git a/src/main/java/com/onthegomap/flatmap/collections/ExternalMergeSort.java b/core/src/main/java/com/onthegomap/flatmap/collections/ExternalMergeSort.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/collections/ExternalMergeSort.java rename to core/src/main/java/com/onthegomap/flatmap/collections/ExternalMergeSort.java diff --git a/src/main/java/com/onthegomap/flatmap/collections/FeatureGroup.java b/core/src/main/java/com/onthegomap/flatmap/collections/FeatureGroup.java similarity index 98% rename from src/main/java/com/onthegomap/flatmap/collections/FeatureGroup.java rename to core/src/main/java/com/onthegomap/flatmap/collections/FeatureGroup.java index 85fdbfb0..69cfcfa4 100644 --- a/src/main/java/com/onthegomap/flatmap/collections/FeatureGroup.java +++ b/core/src/main/java/com/onthegomap/flatmap/collections/FeatureGroup.java @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.concurrent.atomic.AtomicLong; import java.util.function.Consumer; import java.util.function.Function; import org.msgpack.core.MessageBufferPacker; @@ -329,14 +330,14 @@ public final class FeatureGroup implements Consumer, Iterable private final List entries = new ArrayList<>(); private LongLongHashMap counts = null; private byte layer = Byte.MAX_VALUE; - private long numFeaturesProcessed = 0; + private final AtomicLong numFeaturesProcessed = new AtomicLong(0); public TileFeatures(int tile) { this.tile = TileCoord.decode(tile); } public long getNumFeatures() { - return numFeaturesProcessed; + return numFeaturesProcessed.get(); } public TileCoord coord() { @@ -395,7 +396,7 @@ public final class FeatureGroup implements Consumer, Iterable @Override public void accept(FeatureSort.Entry entry) { - numFeaturesProcessed++; + numFeaturesProcessed.incrementAndGet(); long sortKey = entry.sortKey(); if (extractHasGroupFromSortKey(sortKey)) { byte thisLayer = extractLayerIdFromSortKey(sortKey); diff --git a/src/main/java/com/onthegomap/flatmap/collections/FeatureSort.java b/core/src/main/java/com/onthegomap/flatmap/collections/FeatureSort.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/collections/FeatureSort.java rename to core/src/main/java/com/onthegomap/flatmap/collections/FeatureSort.java diff --git a/src/main/java/com/onthegomap/flatmap/collections/IntRange.java b/core/src/main/java/com/onthegomap/flatmap/collections/IntRange.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/collections/IntRange.java rename to core/src/main/java/com/onthegomap/flatmap/collections/IntRange.java diff --git a/src/main/java/com/onthegomap/flatmap/collections/LongLongMap.java b/core/src/main/java/com/onthegomap/flatmap/collections/LongLongMap.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/collections/LongLongMap.java rename to core/src/main/java/com/onthegomap/flatmap/collections/LongLongMap.java diff --git a/src/main/java/com/onthegomap/flatmap/collections/LongLongMultimap.java b/core/src/main/java/com/onthegomap/flatmap/collections/LongLongMultimap.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/collections/LongLongMultimap.java rename to core/src/main/java/com/onthegomap/flatmap/collections/LongLongMultimap.java diff --git a/src/main/java/com/onthegomap/flatmap/collections/MutableCoordinateSequence.java b/core/src/main/java/com/onthegomap/flatmap/collections/MutableCoordinateSequence.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/collections/MutableCoordinateSequence.java rename to core/src/main/java/com/onthegomap/flatmap/collections/MutableCoordinateSequence.java diff --git a/src/main/java/com/onthegomap/flatmap/geo/GeoUtils.java b/core/src/main/java/com/onthegomap/flatmap/geo/GeoUtils.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/geo/GeoUtils.java rename to core/src/main/java/com/onthegomap/flatmap/geo/GeoUtils.java diff --git a/src/main/java/com/onthegomap/flatmap/geo/GeometryException.java b/core/src/main/java/com/onthegomap/flatmap/geo/GeometryException.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/geo/GeometryException.java rename to core/src/main/java/com/onthegomap/flatmap/geo/GeometryException.java diff --git a/src/main/java/com/onthegomap/flatmap/geo/TileCoord.java b/core/src/main/java/com/onthegomap/flatmap/geo/TileCoord.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/geo/TileCoord.java rename to core/src/main/java/com/onthegomap/flatmap/geo/TileCoord.java diff --git a/src/main/java/com/onthegomap/flatmap/monitoring/Counter.java b/core/src/main/java/com/onthegomap/flatmap/monitoring/Counter.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/monitoring/Counter.java rename to core/src/main/java/com/onthegomap/flatmap/monitoring/Counter.java diff --git a/src/main/java/com/onthegomap/flatmap/monitoring/ProcessInfo.java b/core/src/main/java/com/onthegomap/flatmap/monitoring/ProcessInfo.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/monitoring/ProcessInfo.java rename to core/src/main/java/com/onthegomap/flatmap/monitoring/ProcessInfo.java diff --git a/src/main/java/com/onthegomap/flatmap/monitoring/ProcessTime.java b/core/src/main/java/com/onthegomap/flatmap/monitoring/ProcessTime.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/monitoring/ProcessTime.java rename to core/src/main/java/com/onthegomap/flatmap/monitoring/ProcessTime.java diff --git a/src/main/java/com/onthegomap/flatmap/monitoring/ProgressLoggers.java b/core/src/main/java/com/onthegomap/flatmap/monitoring/ProgressLoggers.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/monitoring/ProgressLoggers.java rename to core/src/main/java/com/onthegomap/flatmap/monitoring/ProgressLoggers.java diff --git a/src/main/java/com/onthegomap/flatmap/monitoring/PrometheusStats.java b/core/src/main/java/com/onthegomap/flatmap/monitoring/PrometheusStats.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/monitoring/PrometheusStats.java rename to core/src/main/java/com/onthegomap/flatmap/monitoring/PrometheusStats.java diff --git a/src/main/java/com/onthegomap/flatmap/monitoring/Stats.java b/core/src/main/java/com/onthegomap/flatmap/monitoring/Stats.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/monitoring/Stats.java rename to core/src/main/java/com/onthegomap/flatmap/monitoring/Stats.java diff --git a/src/main/java/com/onthegomap/flatmap/monitoring/Timer.java b/core/src/main/java/com/onthegomap/flatmap/monitoring/Timer.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/monitoring/Timer.java rename to core/src/main/java/com/onthegomap/flatmap/monitoring/Timer.java diff --git a/src/main/java/com/onthegomap/flatmap/monitoring/Timers.java b/core/src/main/java/com/onthegomap/flatmap/monitoring/Timers.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/monitoring/Timers.java rename to core/src/main/java/com/onthegomap/flatmap/monitoring/Timers.java diff --git a/src/main/java/com/onthegomap/flatmap/profiles/OpenMapTilesProfile.java b/core/src/main/java/com/onthegomap/flatmap/profiles/OpenMapTilesProfile.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/profiles/OpenMapTilesProfile.java rename to core/src/main/java/com/onthegomap/flatmap/profiles/OpenMapTilesProfile.java diff --git a/src/main/java/com/onthegomap/flatmap/read/NaturalEarthReader.java b/core/src/main/java/com/onthegomap/flatmap/read/NaturalEarthReader.java similarity index 98% rename from src/main/java/com/onthegomap/flatmap/read/NaturalEarthReader.java rename to core/src/main/java/com/onthegomap/flatmap/read/NaturalEarthReader.java index d884bbe4..a6c8e268 100644 --- a/src/main/java/com/onthegomap/flatmap/read/NaturalEarthReader.java +++ b/core/src/main/java/com/onthegomap/flatmap/read/NaturalEarthReader.java @@ -104,6 +104,7 @@ public class NaturalEarthReader extends Reader { @Override public Topology.SourceStep read() { return next -> { + long id = 0; var tables = tableNames(); for (int i = 0; i < tables.size(); i++) { String table = tables.get(i); @@ -127,7 +128,8 @@ public class NaturalEarthReader extends Reader { continue; } Geometry latLonGeometry = GeoUtils.wkbReader.read(geometry); - ReaderFeature readerGeometry = new ReaderFeature(latLonGeometry, column.length - 1, sourceName, table); + ReaderFeature readerGeometry = new ReaderFeature(latLonGeometry, column.length - 1, sourceName, table, + id); for (int c = 0; c < column.length; c++) { if (c != geometryColumn) { Object value = rs.getObject(c + 1); diff --git a/src/main/java/com/onthegomap/flatmap/read/OpenStreetMapReader.java b/core/src/main/java/com/onthegomap/flatmap/read/OpenStreetMapReader.java similarity index 98% rename from src/main/java/com/onthegomap/flatmap/read/OpenStreetMapReader.java rename to core/src/main/java/com/onthegomap/flatmap/read/OpenStreetMapReader.java index 54542c4b..f023b95f 100644 --- a/src/main/java/com/onthegomap/flatmap/read/OpenStreetMapReader.java +++ b/core/src/main/java/com/onthegomap/flatmap/read/OpenStreetMapReader.java @@ -280,15 +280,13 @@ public class OpenStreetMapReader implements Closeable, MemoryEstimator.HasEstima final boolean polygon; final boolean line; final boolean point; - final long osmId; public ProxyFeature(ReaderElement elem, boolean point, boolean line, boolean polygon, List relationInfo) { - super(ReaderElementUtils.getProperties(elem), name, null, relationInfo); + super(ReaderElementUtils.getProperties(elem), name, null, relationInfo, elem.getId()); this.point = point; this.line = line; this.polygon = polygon; - this.osmId = elem.getId(); } private Geometry latLonGeom; @@ -349,7 +347,7 @@ public class OpenStreetMapReader implements Closeable, MemoryEstimator.HasEstima @Override public String toString() { - return "OsmNode[" + osmId + ']'; + return "OsmNode[" + id() + ']'; } } @@ -375,7 +373,7 @@ public class OpenStreetMapReader implements Closeable, MemoryEstimator.HasEstima CoordinateSequence coords = nodeCache.getWayGeometry(nodeIds); return GeoUtils.JTS_FACTORY.createLineString(coords); } catch (IllegalArgumentException e) { - throw new GeometryException("osm_invalid_line", "Error building line for way " + osmId + ": " + e); + throw new GeometryException("osm_invalid_line", "Error building line for way " + id() + ": " + e); } } @@ -385,7 +383,7 @@ public class OpenStreetMapReader implements Closeable, MemoryEstimator.HasEstima CoordinateSequence coords = nodeCache.getWayGeometry(nodeIds); return GeoUtils.JTS_FACTORY.createPolygon(coords); } catch (IllegalArgumentException e) { - throw new GeometryException("osm_invalid_polygon", "Error building polygon for way " + osmId + ": " + e); + throw new GeometryException("osm_invalid_polygon", "Error building polygon for way " + id() + ": " + e); } } @@ -396,7 +394,7 @@ public class OpenStreetMapReader implements Closeable, MemoryEstimator.HasEstima @Override public String toString() { - return "OsmWay[" + osmId + ']'; + return "OsmWay[" + id() + ']'; } } @@ -425,12 +423,12 @@ public class OpenStreetMapReader implements Closeable, MemoryEstimator.HasEstima } } } - return OsmMultipolygon.build(rings, nodeCache, osmId); + return OsmMultipolygon.build(rings, nodeCache, id()); } @Override public String toString() { - return "OsmRelation[" + osmId + ']'; + return "OsmRelation[" + id() + ']'; } } diff --git a/src/main/java/com/onthegomap/flatmap/read/OsmInputFile.java b/core/src/main/java/com/onthegomap/flatmap/read/OsmInputFile.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/read/OsmInputFile.java rename to core/src/main/java/com/onthegomap/flatmap/read/OsmInputFile.java diff --git a/src/main/java/com/onthegomap/flatmap/read/OsmMultipolygon.java b/core/src/main/java/com/onthegomap/flatmap/read/OsmMultipolygon.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/read/OsmMultipolygon.java rename to core/src/main/java/com/onthegomap/flatmap/read/OsmMultipolygon.java diff --git a/src/main/java/com/onthegomap/flatmap/read/OsmSource.java b/core/src/main/java/com/onthegomap/flatmap/read/OsmSource.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/read/OsmSource.java rename to core/src/main/java/com/onthegomap/flatmap/read/OsmSource.java diff --git a/src/main/java/com/onthegomap/flatmap/read/Reader.java b/core/src/main/java/com/onthegomap/flatmap/read/Reader.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/read/Reader.java rename to core/src/main/java/com/onthegomap/flatmap/read/Reader.java diff --git a/src/main/java/com/onthegomap/flatmap/read/ReaderFeature.java b/core/src/main/java/com/onthegomap/flatmap/read/ReaderFeature.java similarity index 88% rename from src/main/java/com/onthegomap/flatmap/read/ReaderFeature.java rename to core/src/main/java/com/onthegomap/flatmap/read/ReaderFeature.java index 9857e126..d3f8b61a 100644 --- a/src/main/java/com/onthegomap/flatmap/read/ReaderFeature.java +++ b/core/src/main/java/com/onthegomap/flatmap/read/ReaderFeature.java @@ -14,18 +14,19 @@ public class ReaderFeature extends SourceFeature { private final Geometry latLonGeometry; private final Map properties; - public ReaderFeature(Geometry latLonGeometry, Map properties) { - this(latLonGeometry, properties, null, null); + public ReaderFeature(Geometry latLonGeometry, Map properties, long id) { + this(latLonGeometry, properties, null, null, id); } - public ReaderFeature(Geometry latLonGeometry, Map properties, String source, String sourceLayer) { - super(properties, source, sourceLayer, null); + public ReaderFeature(Geometry latLonGeometry, Map properties, String source, String sourceLayer, + long id) { + super(properties, source, sourceLayer, null, id); this.latLonGeometry = latLonGeometry; this.properties = properties; } - public ReaderFeature(Geometry latLonGeometry, int numProperties, String source, String sourceLayer) { - this(latLonGeometry, new HashMap<>(numProperties), source, sourceLayer); + public ReaderFeature(Geometry latLonGeometry, int numProperties, String source, String sourceLayer, long id) { + this(latLonGeometry, new HashMap<>(numProperties), source, sourceLayer, id); } @Override diff --git a/src/main/java/com/onthegomap/flatmap/read/ShapefileReader.java b/core/src/main/java/com/onthegomap/flatmap/read/ShapefileReader.java similarity index 98% rename from src/main/java/com/onthegomap/flatmap/read/ShapefileReader.java rename to core/src/main/java/com/onthegomap/flatmap/read/ShapefileReader.java index ad37d5d7..b029290a 100644 --- a/src/main/java/com/onthegomap/flatmap/read/ShapefileReader.java +++ b/core/src/main/java/com/onthegomap/flatmap/read/ShapefileReader.java @@ -106,7 +106,9 @@ public class ShapefileReader extends Reader implements Closeable { public Topology.SourceStep read() { return next -> { try (var iter = inputSource.features()) { + long id = 0; while (iter.hasNext()) { + id++; SimpleFeature feature = iter.next(); Geometry source = (Geometry) feature.getDefaultGeometry(); Geometry latLonGeometry = source; @@ -114,7 +116,7 @@ public class ShapefileReader extends Reader implements Closeable { latLonGeometry = JTS.transform(source, transformToLatLon); } if (latLonGeometry != null) { - ReaderFeature geom = new ReaderFeature(latLonGeometry, attributeNames.length, sourceName, null); + ReaderFeature geom = new ReaderFeature(latLonGeometry, attributeNames.length, sourceName, null, id); for (int i = 1; i < attributeNames.length; i++) { geom.setTag(attributeNames[i], feature.getAttribute(i)); } diff --git a/src/main/java/com/onthegomap/flatmap/render/CoordinateSequenceExtractor.java b/core/src/main/java/com/onthegomap/flatmap/render/CoordinateSequenceExtractor.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/render/CoordinateSequenceExtractor.java rename to core/src/main/java/com/onthegomap/flatmap/render/CoordinateSequenceExtractor.java diff --git a/src/main/java/com/onthegomap/flatmap/render/FeatureRenderer.java b/core/src/main/java/com/onthegomap/flatmap/render/FeatureRenderer.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/render/FeatureRenderer.java rename to core/src/main/java/com/onthegomap/flatmap/render/FeatureRenderer.java diff --git a/src/main/java/com/onthegomap/flatmap/render/RenderedFeature.java b/core/src/main/java/com/onthegomap/flatmap/render/RenderedFeature.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/render/RenderedFeature.java rename to core/src/main/java/com/onthegomap/flatmap/render/RenderedFeature.java diff --git a/src/main/java/com/onthegomap/flatmap/render/TiledGeometry.java b/core/src/main/java/com/onthegomap/flatmap/render/TiledGeometry.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/render/TiledGeometry.java rename to core/src/main/java/com/onthegomap/flatmap/render/TiledGeometry.java diff --git a/src/main/java/com/onthegomap/flatmap/worker/Topology.java b/core/src/main/java/com/onthegomap/flatmap/worker/Topology.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/worker/Topology.java rename to core/src/main/java/com/onthegomap/flatmap/worker/Topology.java diff --git a/src/main/java/com/onthegomap/flatmap/worker/WorkQueue.java b/core/src/main/java/com/onthegomap/flatmap/worker/WorkQueue.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/worker/WorkQueue.java rename to core/src/main/java/com/onthegomap/flatmap/worker/WorkQueue.java diff --git a/src/main/java/com/onthegomap/flatmap/worker/Worker.java b/core/src/main/java/com/onthegomap/flatmap/worker/Worker.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/worker/Worker.java rename to core/src/main/java/com/onthegomap/flatmap/worker/Worker.java diff --git a/src/main/java/com/onthegomap/flatmap/write/Mbtiles.java b/core/src/main/java/com/onthegomap/flatmap/write/Mbtiles.java similarity index 100% rename from src/main/java/com/onthegomap/flatmap/write/Mbtiles.java rename to core/src/main/java/com/onthegomap/flatmap/write/Mbtiles.java diff --git a/src/main/java/com/onthegomap/flatmap/write/MbtilesWriter.java b/core/src/main/java/com/onthegomap/flatmap/write/MbtilesWriter.java similarity index 99% rename from src/main/java/com/onthegomap/flatmap/write/MbtilesWriter.java rename to core/src/main/java/com/onthegomap/flatmap/write/MbtilesWriter.java index ab5205c5..50792c99 100644 --- a/src/main/java/com/onthegomap/flatmap/write/MbtilesWriter.java +++ b/core/src/main/java/com/onthegomap/flatmap/write/MbtilesWriter.java @@ -138,7 +138,7 @@ public class MbtilesWriter { .setDescription(profile.description()) .setAttribution(profile.attribution()) .setVersion(profile.version()) - .setTypeIsBaselayer() + .setType(profile.isOverlay() ? "overlay" : "baselayer") .setBoundsAndCenter(config.latLonBounds()) .setMinzoom(config.minzoom()) .setMaxzoom(config.maxzoom()) diff --git a/src/main/java/vector_tile/VectorTile.java b/core/src/main/java/vector_tile/VectorTile.java similarity index 83% rename from src/main/java/vector_tile/VectorTile.java rename to core/src/main/java/vector_tile/VectorTile.java index 991a122d..a38d4382 100644 --- a/src/main/java/vector_tile/VectorTile.java +++ b/core/src/main/java/vector_tile/VectorTile.java @@ -1,61 +1,73 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: src/main/resources/vector_tile.proto +// source: core/src/main/resources/vector_tile.proto package vector_tile; public final class VectorTile { - private VectorTile() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { + + private VectorTile() { } public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); + com.google.protobuf.ExtensionRegistryLite registry) { } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TileOrBuilder extends - // @@protoc_insertion_point(interface_extends:vector_tile.Tile) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { + // @@protoc_insertion_point(interface_extends:vector_tile.Tile) + com.google.protobuf.GeneratedMessageV3. + ExtendableMessageOrBuilder { /** * repeated .vector_tile.Tile.Layer layers = 3; */ - java.util.List - getLayersList(); + java.util.List + getLayersList(); + /** * repeated .vector_tile.Tile.Layer layers = 3; */ vector_tile.VectorTile.Tile.Layer getLayers(int index); + /** * repeated .vector_tile.Tile.Layer layers = 3; */ int getLayersCount(); + /** * repeated .vector_tile.Tile.Layer layers = 3; */ - java.util.List - getLayersOrBuilderList(); + java.util.List + getLayersOrBuilderList(); + /** * repeated .vector_tile.Tile.Layer layers = 3; */ vector_tile.VectorTile.Tile.LayerOrBuilder getLayersOrBuilder( - int index); + int index); } + /** * Protobuf type {@code vector_tile.Tile} */ public static final class Tile extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - Tile> implements - // @@protoc_insertion_point(message_implements:vector_tile.Tile) - TileOrBuilder { - private static final long serialVersionUID = 0L; + com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + Tile> implements + // @@protoc_insertion_point(message_implements:vector_tile.Tile) + TileOrBuilder { + + private static final long serialVersionUID = 0L; + // Use Tile.newBuilder() to construct. private Tile(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { super(builder); } + private Tile() { layers_ = java.util.Collections.emptyList(); } @@ -63,7 +75,7 @@ public final class VectorTile { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + UnusedPrivateParameter unused) { return new Tile(); } @@ -72,17 +84,18 @@ public final class VectorTile { getUnknownFields() { return this.unknownFields; } + private Tile( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -97,12 +110,12 @@ public final class VectorTile { mutable_bitField0_ |= 0x00000001; } layers_.add( - input.readMessage(vector_tile.VectorTile.Tile.Layer.PARSER, extensionRegistry)); + input.readMessage(vector_tile.VectorTile.Tile.Layer.PARSER, extensionRegistry)); break; } default: { if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -113,7 +126,7 @@ public final class VectorTile { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { layers_ = java.util.Collections.unmodifiableList(layers_); @@ -122,28 +135,29 @@ public final class VectorTile { makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - vector_tile.VectorTile.Tile.class, vector_tile.VectorTile.Tile.Builder.class); + .ensureFieldAccessorsInitialized( + vector_tile.VectorTile.Tile.class, vector_tile.VectorTile.Tile.Builder.class); } /** *
      * GeomType is described in section 4.3.4 of the specification
      * 
- * + *

* Protobuf enum {@code vector_tile.Tile.GeomType} */ public enum GeomType - implements com.google.protobuf.ProtocolMessageEnum { + implements com.google.protobuf.ProtocolMessageEnum { /** * UNKNOWN = 0; */ @@ -200,43 +214,51 @@ public final class VectorTile { */ public static GeomType forNumber(int value) { switch (value) { - case 0: return UNKNOWN; - case 1: return POINT; - case 2: return LINESTRING; - case 3: return POLYGON; - default: return null; + case 0: + return UNKNOWN; + case 1: + return POINT; + case 2: + return LINESTRING; + case 3: + return POLYGON; + default: + return null; } } public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { + internalGetValueMap() { return internalValueMap; } + private static final com.google.protobuf.Internal.EnumLiteMap< - GeomType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public GeomType findValueByNumber(int number) { - return GeomType.forNumber(number); - } - }; + GeomType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GeomType findValueByNumber(int number) { + return GeomType.forNumber(number); + } + }; public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { + getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } + public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { + getDescriptorForType() { return getDescriptor(); } + public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { + getDescriptor() { return vector_tile.VectorTile.Tile.getDescriptor().getEnumTypes().get(0); } private static final GeomType[] VALUES = values(); public static GeomType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); @@ -254,9 +276,9 @@ public final class VectorTile { } public interface ValueOrBuilder extends - // @@protoc_insertion_point(interface_extends:vector_tile.Tile.Value) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { + // @@protoc_insertion_point(interface_extends:vector_tile.Tile.Value) + com.google.protobuf.GeneratedMessageV3. + ExtendableMessageOrBuilder { /** *

@@ -264,113 +286,141 @@ public final class VectorTile {
        * 
* * optional string string_value = 1; + * * @return Whether the stringValue field is set. */ boolean hasStringValue(); + /** *
        * Exactly one of these values must be present in a valid message
        * 
* * optional string string_value = 1; + * * @return The stringValue. */ java.lang.String getStringValue(); + /** *
        * Exactly one of these values must be present in a valid message
        * 
* * optional string string_value = 1; + * * @return The bytes for stringValue. */ com.google.protobuf.ByteString - getStringValueBytes(); + getStringValueBytes(); /** * optional float float_value = 2; + * * @return Whether the floatValue field is set. */ boolean hasFloatValue(); + /** * optional float float_value = 2; + * * @return The floatValue. */ float getFloatValue(); /** * optional double double_value = 3; + * * @return Whether the doubleValue field is set. */ boolean hasDoubleValue(); + /** * optional double double_value = 3; + * * @return The doubleValue. */ double getDoubleValue(); /** * optional int64 int_value = 4; + * * @return Whether the intValue field is set. */ boolean hasIntValue(); + /** * optional int64 int_value = 4; + * * @return The intValue. */ long getIntValue(); /** * optional uint64 uint_value = 5; + * * @return Whether the uintValue field is set. */ boolean hasUintValue(); + /** * optional uint64 uint_value = 5; + * * @return The uintValue. */ long getUintValue(); /** * optional sint64 sint_value = 6; + * * @return Whether the sintValue field is set. */ boolean hasSintValue(); + /** * optional sint64 sint_value = 6; + * * @return The sintValue. */ long getSintValue(); /** * optional bool bool_value = 7; + * * @return Whether the boolValue field is set. */ boolean hasBoolValue(); + /** * optional bool bool_value = 7; + * * @return The boolValue. */ boolean getBoolValue(); } + /** *
      * Variant type encoding
      * The use of values is described in section 4.1 of the specification
      * 
- * + *

* Protobuf type {@code vector_tile.Tile.Value} */ public static final class Value extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - Value> implements - // @@protoc_insertion_point(message_implements:vector_tile.Tile.Value) - ValueOrBuilder { - private static final long serialVersionUID = 0L; + com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + Value> implements + // @@protoc_insertion_point(message_implements:vector_tile.Tile.Value) + ValueOrBuilder { + + private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. - private Value(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private Value( + com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { super(builder); } + private Value() { stringValue_ = ""; } @@ -378,7 +428,7 @@ public final class VectorTile { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + UnusedPrivateParameter unused) { return new Value(); } @@ -387,17 +437,18 @@ public final class VectorTile { getUnknownFields() { return this.unknownFields; } + private Value( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -444,7 +495,7 @@ public final class VectorTile { } default: { if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -455,46 +506,51 @@ public final class VectorTile { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Value_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - vector_tile.VectorTile.Tile.Value.class, vector_tile.VectorTile.Tile.Value.Builder.class); + .ensureFieldAccessorsInitialized( + vector_tile.VectorTile.Tile.Value.class, vector_tile.VectorTile.Tile.Value.Builder.class); } private int bitField0_; public static final int STRING_VALUE_FIELD_NUMBER = 1; private volatile java.lang.Object stringValue_; + /** *

        * Exactly one of these values must be present in a valid message
        * 
* * optional string string_value = 1; + * * @return Whether the stringValue field is set. */ @java.lang.Override public boolean hasStringValue() { return ((bitField0_ & 0x00000001) != 0); } + /** *
        * Exactly one of these values must be present in a valid message
        * 
* * optional string string_value = 1; + * * @return The stringValue. */ @java.lang.Override @@ -503,8 +559,8 @@ public final class VectorTile { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { stringValue_ = s; @@ -512,22 +568,24 @@ public final class VectorTile { return s; } } + /** *
        * Exactly one of these values must be present in a valid message
        * 
* * optional string string_value = 1; + * * @return The bytes for stringValue. */ @java.lang.Override public com.google.protobuf.ByteString - getStringValueBytes() { + getStringValueBytes() { java.lang.Object ref = stringValue_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); stringValue_ = b; return b; } else { @@ -537,16 +595,20 @@ public final class VectorTile { public static final int FLOAT_VALUE_FIELD_NUMBER = 2; private float floatValue_; + /** * optional float float_value = 2; + * * @return Whether the floatValue field is set. */ @java.lang.Override public boolean hasFloatValue() { return ((bitField0_ & 0x00000002) != 0); } + /** * optional float float_value = 2; + * * @return The floatValue. */ @java.lang.Override @@ -556,16 +618,20 @@ public final class VectorTile { public static final int DOUBLE_VALUE_FIELD_NUMBER = 3; private double doubleValue_; + /** * optional double double_value = 3; + * * @return Whether the doubleValue field is set. */ @java.lang.Override public boolean hasDoubleValue() { return ((bitField0_ & 0x00000004) != 0); } + /** * optional double double_value = 3; + * * @return The doubleValue. */ @java.lang.Override @@ -575,16 +641,20 @@ public final class VectorTile { public static final int INT_VALUE_FIELD_NUMBER = 4; private long intValue_; + /** * optional int64 int_value = 4; + * * @return Whether the intValue field is set. */ @java.lang.Override public boolean hasIntValue() { return ((bitField0_ & 0x00000008) != 0); } + /** * optional int64 int_value = 4; + * * @return The intValue. */ @java.lang.Override @@ -594,16 +664,20 @@ public final class VectorTile { public static final int UINT_VALUE_FIELD_NUMBER = 5; private long uintValue_; + /** * optional uint64 uint_value = 5; + * * @return Whether the uintValue field is set. */ @java.lang.Override public boolean hasUintValue() { return ((bitField0_ & 0x00000010) != 0); } + /** * optional uint64 uint_value = 5; + * * @return The uintValue. */ @java.lang.Override @@ -613,16 +687,20 @@ public final class VectorTile { public static final int SINT_VALUE_FIELD_NUMBER = 6; private long sintValue_; + /** * optional sint64 sint_value = 6; + * * @return Whether the sintValue field is set. */ @java.lang.Override public boolean hasSintValue() { return ((bitField0_ & 0x00000020) != 0); } + /** * optional sint64 sint_value = 6; + * * @return The sintValue. */ @java.lang.Override @@ -632,16 +710,20 @@ public final class VectorTile { public static final int BOOL_VALUE_FIELD_NUMBER = 7; private boolean boolValue_; + /** * optional bool bool_value = 7; + * * @return Whether the boolValue field is set. */ @java.lang.Override public boolean hasBoolValue() { return ((bitField0_ & 0x00000040) != 0); } + /** * optional bool bool_value = 7; + * * @return The boolValue. */ @java.lang.Override @@ -650,11 +732,16 @@ public final class VectorTile { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized == 1) { + return true; + } + if (isInitialized == 0) { + return false; + } if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; @@ -666,10 +753,10 @@ public final class VectorTile { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { com.google.protobuf.GeneratedMessageV3 .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); + extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stringValue_); } @@ -698,7 +785,9 @@ public final class VectorTile { @java.lang.Override public int getSerializedSize() { int size = memoizedSize; - if (size != -1) return size; + if (size != -1) { + return size; + } size = 0; if (((bitField0_ & 0x00000001) != 0)) { @@ -737,53 +826,84 @@ public final class VectorTile { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof vector_tile.VectorTile.Tile.Value)) { return super.equals(obj); } vector_tile.VectorTile.Tile.Value other = (vector_tile.VectorTile.Tile.Value) obj; - if (hasStringValue() != other.hasStringValue()) return false; + if (hasStringValue() != other.hasStringValue()) { + return false; + } if (hasStringValue()) { if (!getStringValue() - .equals(other.getStringValue())) return false; + .equals(other.getStringValue())) { + return false; + } + } + if (hasFloatValue() != other.hasFloatValue()) { + return false; } - if (hasFloatValue() != other.hasFloatValue()) return false; if (hasFloatValue()) { if (java.lang.Float.floatToIntBits(getFloatValue()) - != java.lang.Float.floatToIntBits( - other.getFloatValue())) return false; + != java.lang.Float.floatToIntBits( + other.getFloatValue())) { + return false; + } + } + if (hasDoubleValue() != other.hasDoubleValue()) { + return false; } - if (hasDoubleValue() != other.hasDoubleValue()) return false; if (hasDoubleValue()) { if (java.lang.Double.doubleToLongBits(getDoubleValue()) - != java.lang.Double.doubleToLongBits( - other.getDoubleValue())) return false; + != java.lang.Double.doubleToLongBits( + other.getDoubleValue())) { + return false; + } + } + if (hasIntValue() != other.hasIntValue()) { + return false; } - if (hasIntValue() != other.hasIntValue()) return false; if (hasIntValue()) { if (getIntValue() - != other.getIntValue()) return false; + != other.getIntValue()) { + return false; + } + } + if (hasUintValue() != other.hasUintValue()) { + return false; } - if (hasUintValue() != other.hasUintValue()) return false; if (hasUintValue()) { if (getUintValue() - != other.getUintValue()) return false; + != other.getUintValue()) { + return false; + } + } + if (hasSintValue() != other.hasSintValue()) { + return false; } - if (hasSintValue() != other.hasSintValue()) return false; if (hasSintValue()) { if (getSintValue() - != other.getSintValue()) return false; + != other.getSintValue()) { + return false; + } + } + if (hasBoolValue() != other.hasBoolValue()) { + return false; } - if (hasBoolValue() != other.hasBoolValue()) return false; if (hasBoolValue()) { if (getBoolValue() - != other.getBoolValue()) return false; + != other.getBoolValue()) { + return false; + } } - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) + if (!unknownFields.equals(other.unknownFields)) { return false; + } + if (!getExtensionFields().equals(other.getExtensionFields())) { + return false; + } return true; } @@ -801,32 +921,32 @@ public final class VectorTile { if (hasFloatValue()) { hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( - getFloatValue()); + getFloatValue()); } if (hasDoubleValue()) { hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getDoubleValue())); + java.lang.Double.doubleToLongBits(getDoubleValue())); } if (hasIntValue()) { hash = (37 * hash) + INT_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getIntValue()); + getIntValue()); } if (hasUintValue()) { hash = (37 * hash) + UINT_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getUintValue()); + getUintValue()); } if (hasSintValue()) { hash = (37 * hash) + SINT_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getSintValue()); + getSintValue()); } if (hasBoolValue()) { hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getBoolValue()); + getBoolValue()); } hash = hashFields(hash, getExtensionFields()); hash = (29 * hash) + unknownFields.hashCode(); @@ -835,119 +955,137 @@ public final class VectorTile { } public static vector_tile.VectorTile.Tile.Value parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile.Value parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Value parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile.Value parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Value parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile.Value parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Value parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + .parseWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile.Value parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + .parseWithIOException(PARSER, input, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Value parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + .parseDelimitedWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile.Value parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Value parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + .parseWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile.Value parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(vector_tile.VectorTile.Tile.Value prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** *
        * Variant type encoding
        * The use of values is described in section 4.1 of the specification
        * 
- * + *

* Protobuf type {@code vector_tile.Tile.Value} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - vector_tile.VectorTile.Tile.Value, Builder> implements - // @@protoc_insertion_point(builder_implements:vector_tile.Tile.Value) - vector_tile.VectorTile.Tile.ValueOrBuilder { + com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + vector_tile.VectorTile.Tile.Value, Builder> implements + // @@protoc_insertion_point(builder_implements:vector_tile.Tile.Value) + vector_tile.VectorTile.Tile.ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Value_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Value_fieldAccessorTable - .ensureFieldAccessorsInitialized( - vector_tile.VectorTile.Tile.Value.class, vector_tile.VectorTile.Tile.Value.Builder.class); + .ensureFieldAccessorsInitialized( + vector_tile.VectorTile.Tile.Value.class, vector_tile.VectorTile.Tile.Value.Builder.class); } // Construct using vector_tile.VectorTile.Tile.Value.newBuilder() @@ -956,15 +1094,17 @@ public final class VectorTile { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { + .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); @@ -987,7 +1127,7 @@ public final class VectorTile { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Value_descriptor; } @@ -1047,65 +1187,75 @@ public final class VectorTile { public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile.Value, Type> extension, - Type value) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile.Value, Type> extension, + Type value) { return super.setExtension(extension, value); } + @java.lang.Override public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile.Value, java.util.List> extension, - int index, Type value) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile.Value, java.util.List> extension, + int index, Type value) { return super.setExtension(extension, index, value); } + @java.lang.Override public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile.Value, java.util.List> extension, - Type value) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile.Value, java.util.List> extension, + Type value) { return super.addExtension(extension, value); } + @java.lang.Override public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile.Value, ?> extension) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile.Value, ?> extension) { return super.clearExtension(extension); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof vector_tile.VectorTile.Tile.Value) { - return mergeFrom((vector_tile.VectorTile.Tile.Value)other); + return mergeFrom((vector_tile.VectorTile.Tile.Value) other); } else { super.mergeFrom(other); return this; @@ -1113,7 +1263,9 @@ public final class VectorTile { } public Builder mergeFrom(vector_tile.VectorTile.Tile.Value other) { - if (other == vector_tile.VectorTile.Tile.Value.getDefaultInstance()) return this; + if (other == vector_tile.VectorTile.Tile.Value.getDefaultInstance()) { + return this; + } if (other.hasStringValue()) { bitField0_ |= 0x00000001; stringValue_ = other.stringValue_; @@ -1153,9 +1305,9 @@ public final class VectorTile { @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { vector_tile.VectorTile.Tile.Value parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -1169,33 +1321,38 @@ public final class VectorTile { } return this; } + private int bitField0_; private java.lang.Object stringValue_ = ""; + /** *

          * Exactly one of these values must be present in a valid message
          * 
* * optional string string_value = 1; + * * @return Whether the stringValue field is set. */ public boolean hasStringValue() { return ((bitField0_ & 0x00000001) != 0); } + /** *
          * Exactly one of these values must be present in a valid message
          * 
* * optional string string_value = 1; + * * @return The stringValue. */ public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { stringValue_ = s; @@ -1205,52 +1362,58 @@ public final class VectorTile { return (java.lang.String) ref; } } + /** *
          * Exactly one of these values must be present in a valid message
          * 
* * optional string string_value = 1; + * * @return The bytes for stringValue. */ public com.google.protobuf.ByteString - getStringValueBytes() { + getStringValueBytes() { java.lang.Object ref = stringValue_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); stringValue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** *
          * Exactly one of these values must be present in a valid message
          * 
* * optional string string_value = 1; + * * @param value The stringValue to set. * @return This builder for chaining. */ public Builder setStringValue( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; stringValue_ = value; onChanged(); return this; } + /** *
          * Exactly one of these values must be present in a valid message
          * 
* * optional string string_value = 1; + * * @return This builder for chaining. */ public Builder clearStringValue() { @@ -1259,45 +1422,53 @@ public final class VectorTile { onChanged(); return this; } + /** *
          * Exactly one of these values must be present in a valid message
          * 
* * optional string string_value = 1; + * * @param value The bytes for stringValue to set. * @return This builder for chaining. */ public Builder setStringValueBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; stringValue_ = value; onChanged(); return this; } - private float floatValue_ ; + private float floatValue_; + /** * optional float float_value = 2; + * * @return Whether the floatValue field is set. */ @java.lang.Override public boolean hasFloatValue() { return ((bitField0_ & 0x00000002) != 0); } + /** * optional float float_value = 2; + * * @return The floatValue. */ @java.lang.Override public float getFloatValue() { return floatValue_; } + /** * optional float float_value = 2; + * * @param value The floatValue to set. * @return This builder for chaining. */ @@ -1307,8 +1478,10 @@ public final class VectorTile { onChanged(); return this; } + /** * optional float float_value = 2; + * * @return This builder for chaining. */ public Builder clearFloatValue() { @@ -1318,25 +1491,31 @@ public final class VectorTile { return this; } - private double doubleValue_ ; + private double doubleValue_; + /** * optional double double_value = 3; + * * @return Whether the doubleValue field is set. */ @java.lang.Override public boolean hasDoubleValue() { return ((bitField0_ & 0x00000004) != 0); } + /** * optional double double_value = 3; + * * @return The doubleValue. */ @java.lang.Override public double getDoubleValue() { return doubleValue_; } + /** * optional double double_value = 3; + * * @param value The doubleValue to set. * @return This builder for chaining. */ @@ -1346,8 +1525,10 @@ public final class VectorTile { onChanged(); return this; } + /** * optional double double_value = 3; + * * @return This builder for chaining. */ public Builder clearDoubleValue() { @@ -1357,25 +1538,31 @@ public final class VectorTile { return this; } - private long intValue_ ; + private long intValue_; + /** * optional int64 int_value = 4; + * * @return Whether the intValue field is set. */ @java.lang.Override public boolean hasIntValue() { return ((bitField0_ & 0x00000008) != 0); } + /** * optional int64 int_value = 4; + * * @return The intValue. */ @java.lang.Override public long getIntValue() { return intValue_; } + /** * optional int64 int_value = 4; + * * @param value The intValue to set. * @return This builder for chaining. */ @@ -1385,8 +1572,10 @@ public final class VectorTile { onChanged(); return this; } + /** * optional int64 int_value = 4; + * * @return This builder for chaining. */ public Builder clearIntValue() { @@ -1396,25 +1585,31 @@ public final class VectorTile { return this; } - private long uintValue_ ; + private long uintValue_; + /** * optional uint64 uint_value = 5; + * * @return Whether the uintValue field is set. */ @java.lang.Override public boolean hasUintValue() { return ((bitField0_ & 0x00000010) != 0); } + /** * optional uint64 uint_value = 5; + * * @return The uintValue. */ @java.lang.Override public long getUintValue() { return uintValue_; } + /** * optional uint64 uint_value = 5; + * * @param value The uintValue to set. * @return This builder for chaining. */ @@ -1424,8 +1619,10 @@ public final class VectorTile { onChanged(); return this; } + /** * optional uint64 uint_value = 5; + * * @return This builder for chaining. */ public Builder clearUintValue() { @@ -1435,25 +1632,31 @@ public final class VectorTile { return this; } - private long sintValue_ ; + private long sintValue_; + /** * optional sint64 sint_value = 6; + * * @return Whether the sintValue field is set. */ @java.lang.Override public boolean hasSintValue() { return ((bitField0_ & 0x00000020) != 0); } + /** * optional sint64 sint_value = 6; + * * @return The sintValue. */ @java.lang.Override public long getSintValue() { return sintValue_; } + /** * optional sint64 sint_value = 6; + * * @param value The sintValue to set. * @return This builder for chaining. */ @@ -1463,8 +1666,10 @@ public final class VectorTile { onChanged(); return this; } + /** * optional sint64 sint_value = 6; + * * @return This builder for chaining. */ public Builder clearSintValue() { @@ -1474,25 +1679,31 @@ public final class VectorTile { return this; } - private boolean boolValue_ ; + private boolean boolValue_; + /** * optional bool bool_value = 7; + * * @return Whether the boolValue field is set. */ @java.lang.Override public boolean hasBoolValue() { return ((bitField0_ & 0x00000040) != 0); } + /** * optional bool bool_value = 7; + * * @return The boolValue. */ @java.lang.Override public boolean getBoolValue() { return boolValue_; } + /** * optional bool bool_value = 7; + * * @param value The boolValue to set. * @return This builder for chaining. */ @@ -1502,8 +1713,10 @@ public final class VectorTile { onChanged(); return this; } + /** * optional bool bool_value = 7; + * * @return This builder for chaining. */ public Builder clearBoolValue() { @@ -1512,24 +1725,25 @@ public final class VectorTile { onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:vector_tile.Tile.Value) } // @@protoc_insertion_point(class_scope:vector_tile.Tile.Value) private static final vector_tile.VectorTile.Tile.Value DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new vector_tile.VectorTile.Tile.Value(); } @@ -1538,13 +1752,14 @@ public final class VectorTile { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Deprecated + public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Value parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return new Value(input, extensionRegistry); } }; @@ -1566,16 +1781,19 @@ public final class VectorTile { } public interface FeatureOrBuilder extends - // @@protoc_insertion_point(interface_extends:vector_tile.Tile.Feature) - com.google.protobuf.MessageOrBuilder { + // @@protoc_insertion_point(interface_extends:vector_tile.Tile.Feature) + com.google.protobuf.MessageOrBuilder { /** * optional uint64 id = 1 [default = 0]; + * * @return Whether the id field is set. */ boolean hasId(); + /** * optional uint64 id = 1 [default = 0]; + * * @return The id. */ long getId(); @@ -1589,9 +1807,11 @@ public final class VectorTile { * * * repeated uint32 tags = 2 [packed = true]; + * * @return A list containing the tags. */ java.util.List getTagsList(); + /** *
        * Tags of this feature are encoded as repeated pairs of
@@ -1601,9 +1821,11 @@ public final class VectorTile {
        * 
* * repeated uint32 tags = 2 [packed = true]; + * * @return The count of tags. */ int getTagsCount(); + /** *
        * Tags of this feature are encoded as repeated pairs of
@@ -1613,6 +1835,7 @@ public final class VectorTile {
        * 
* * repeated uint32 tags = 2 [packed = true]; + * * @param index The index of the element to return. * @return The tags at the given index. */ @@ -1624,15 +1847,18 @@ public final class VectorTile { * * * optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN]; + * * @return Whether the type field is set. */ boolean hasType(); + /** *
        * The type of geometry stored in this feature.
        * 
* * optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN]; + * * @return The type. */ vector_tile.VectorTile.Tile.GeomType getType(); @@ -1645,9 +1871,11 @@ public final class VectorTile { * * * repeated uint32 geometry = 4 [packed = true]; + * * @return A list containing the geometry. */ java.util.List getGeometryList(); + /** *
        * Contains a stream of commands and parameters (vertices).
@@ -1656,9 +1884,11 @@ public final class VectorTile {
        * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @return The count of geometry. */ int getGeometryCount(); + /** *
        * Contains a stream of commands and parameters (vertices).
@@ -1667,27 +1897,32 @@ public final class VectorTile {
        * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @param index The index of the element to return. * @return The geometry at the given index. */ int getGeometry(int index); } + /** *
      * Features are described in section 4.2 of the specification
      * 
- * + *

* Protobuf type {@code vector_tile.Tile.Feature} */ public static final class Feature extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:vector_tile.Tile.Feature) - FeatureOrBuilder { - private static final long serialVersionUID = 0L; + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:vector_tile.Tile.Feature) + FeatureOrBuilder { + + private static final long serialVersionUID = 0L; + // Use Feature.newBuilder() to construct. private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } + private Feature() { tags_ = emptyIntList(); type_ = 0; @@ -1697,7 +1932,7 @@ public final class VectorTile { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + UnusedPrivateParameter unused) { return new Feature(); } @@ -1706,17 +1941,18 @@ public final class VectorTile { getUnknownFields() { return this.unknownFields; } + private Feature( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -1753,7 +1989,7 @@ public final class VectorTile { } case 24: { int rawValue = input.readEnum(); - @SuppressWarnings("deprecation") + @SuppressWarnings("deprecation") vector_tile.VectorTile.Tile.GeomType value = vector_tile.VectorTile.Tile.GeomType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(3, rawValue); @@ -1786,7 +2022,7 @@ public final class VectorTile { } default: { if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1797,7 +2033,7 @@ public final class VectorTile { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) != 0)) { tags_.makeImmutable(); // C @@ -1809,32 +2045,37 @@ public final class VectorTile { makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Feature_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - vector_tile.VectorTile.Tile.Feature.class, vector_tile.VectorTile.Tile.Feature.Builder.class); + .ensureFieldAccessorsInitialized( + vector_tile.VectorTile.Tile.Feature.class, vector_tile.VectorTile.Tile.Feature.Builder.class); } private int bitField0_; public static final int ID_FIELD_NUMBER = 1; private long id_; + /** * optional uint64 id = 1 [default = 0]; + * * @return Whether the id field is set. */ @java.lang.Override public boolean hasId() { return ((bitField0_ & 0x00000001) != 0); } + /** * optional uint64 id = 1 [default = 0]; + * * @return The id. */ @java.lang.Override @@ -1844,6 +2085,7 @@ public final class VectorTile { public static final int TAGS_FIELD_NUMBER = 2; private com.google.protobuf.Internal.IntList tags_; + /** *

        * Tags of this feature are encoded as repeated pairs of
@@ -1853,13 +2095,15 @@ public final class VectorTile {
        * 
* * repeated uint32 tags = 2 [packed = true]; + * * @return A list containing the tags. */ @java.lang.Override public java.util.List - getTagsList() { + getTagsList() { return tags_; } + /** *
        * Tags of this feature are encoded as repeated pairs of
@@ -1869,11 +2113,13 @@ public final class VectorTile {
        * 
* * repeated uint32 tags = 2 [packed = true]; + * * @return The count of tags. */ public int getTagsCount() { return tags_.size(); } + /** *
        * Tags of this feature are encoded as repeated pairs of
@@ -1883,36 +2129,44 @@ public final class VectorTile {
        * 
* * repeated uint32 tags = 2 [packed = true]; + * * @param index The index of the element to return. * @return The tags at the given index. */ public int getTags(int index) { return tags_.getInt(index); } + private int tagsMemoizedSerializedSize = -1; public static final int TYPE_FIELD_NUMBER = 3; private int type_; + /** *
        * The type of geometry stored in this feature.
        * 
* * optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN]; + * * @return Whether the type field is set. */ - @java.lang.Override public boolean hasType() { + @java.lang.Override + public boolean hasType() { return ((bitField0_ & 0x00000002) != 0); } + /** *
        * The type of geometry stored in this feature.
        * 
* * optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN]; + * * @return The type. */ - @java.lang.Override public vector_tile.VectorTile.Tile.GeomType getType() { + @java.lang.Override + public vector_tile.VectorTile.Tile.GeomType getType() { @SuppressWarnings("deprecation") vector_tile.VectorTile.Tile.GeomType result = vector_tile.VectorTile.Tile.GeomType.valueOf(type_); return result == null ? vector_tile.VectorTile.Tile.GeomType.UNKNOWN : result; @@ -1920,6 +2174,7 @@ public final class VectorTile { public static final int GEOMETRY_FIELD_NUMBER = 4; private com.google.protobuf.Internal.IntList geometry_; + /** *
        * Contains a stream of commands and parameters (vertices).
@@ -1928,13 +2183,15 @@ public final class VectorTile {
        * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @return A list containing the geometry. */ @java.lang.Override public java.util.List - getGeometryList() { + getGeometryList() { return geometry_; } + /** *
        * Contains a stream of commands and parameters (vertices).
@@ -1943,11 +2200,13 @@ public final class VectorTile {
        * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @return The count of geometry. */ public int getGeometryCount() { return geometry_.size(); } + /** *
        * Contains a stream of commands and parameters (vertices).
@@ -1956,20 +2215,27 @@ public final class VectorTile {
        * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @param index The index of the element to return. * @return The geometry at the given index. */ public int getGeometry(int index) { return geometry_.getInt(index); } + private int geometryMemoizedSerializedSize = -1; private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized == 1) { + return true; + } + if (isInitialized == 0) { + return false; + } memoizedIsInitialized = 1; return true; @@ -1977,7 +2243,7 @@ public final class VectorTile { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt64(1, id_); @@ -2005,7 +2271,9 @@ public final class VectorTile { @java.lang.Override public int getSerializedSize() { int size = memoizedSize; - if (size != -1) return size; + if (size != -1) { + return size; + } size = 0; if (((bitField0_ & 0x00000001) != 0)) { @@ -2022,7 +2290,7 @@ public final class VectorTile { if (!getTagsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); + .computeInt32SizeNoTag(dataSize); } tagsMemoizedSerializedSize = dataSize; } @@ -2040,7 +2308,7 @@ public final class VectorTile { if (!getGeometryList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); + .computeInt32SizeNoTag(dataSize); } geometryMemoizedSerializedSize = dataSize; } @@ -2052,27 +2320,41 @@ public final class VectorTile { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof vector_tile.VectorTile.Tile.Feature)) { return super.equals(obj); } vector_tile.VectorTile.Tile.Feature other = (vector_tile.VectorTile.Tile.Feature) obj; - if (hasId() != other.hasId()) return false; + if (hasId() != other.hasId()) { + return false; + } if (hasId()) { if (getId() - != other.getId()) return false; + != other.getId()) { + return false; + } } if (!getTagsList() - .equals(other.getTagsList())) return false; - if (hasType() != other.hasType()) return false; + .equals(other.getTagsList())) { + return false; + } + if (hasType() != other.hasType()) { + return false; + } if (hasType()) { - if (type_ != other.type_) return false; + if (type_ != other.type_) { + return false; + } } if (!getGeometryList() - .equals(other.getGeometryList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + .equals(other.getGeometryList())) { + return false; + } + if (!unknownFields.equals(other.unknownFields)) { + return false; + } return true; } @@ -2086,7 +2368,7 @@ public final class VectorTile { if (hasId()) { hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getId()); + getId()); } if (getTagsCount() > 0) { hash = (37 * hash) + TAGS_FIELD_NUMBER; @@ -2106,117 +2388,135 @@ public final class VectorTile { } public static vector_tile.VectorTile.Tile.Feature parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile.Feature parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Feature parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile.Feature parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Feature parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile.Feature parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Feature parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + .parseWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile.Feature parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + .parseWithIOException(PARSER, input, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Feature parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + .parseDelimitedWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile.Feature parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Feature parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + .parseWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile.Feature parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(vector_tile.VectorTile.Tile.Feature prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** *
        * Features are described in section 4.2 of the specification
        * 
- * + *

* Protobuf type {@code vector_tile.Tile.Feature} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:vector_tile.Tile.Feature) - vector_tile.VectorTile.Tile.FeatureOrBuilder { + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:vector_tile.Tile.Feature) + vector_tile.VectorTile.Tile.FeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Feature_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Feature_fieldAccessorTable - .ensureFieldAccessorsInitialized( - vector_tile.VectorTile.Tile.Feature.class, vector_tile.VectorTile.Tile.Feature.Builder.class); + .ensureFieldAccessorsInitialized( + vector_tile.VectorTile.Tile.Feature.class, vector_tile.VectorTile.Tile.Feature.Builder.class); } // Construct using vector_tile.VectorTile.Tile.Feature.newBuilder() @@ -2225,15 +2525,17 @@ public final class VectorTile { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { + .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); @@ -2250,7 +2552,7 @@ public final class VectorTile { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Feature_descriptor; } @@ -2300,38 +2602,44 @@ public final class VectorTile { public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof vector_tile.VectorTile.Tile.Feature) { - return mergeFrom((vector_tile.VectorTile.Tile.Feature)other); + return mergeFrom((vector_tile.VectorTile.Tile.Feature) other); } else { super.mergeFrom(other); return this; @@ -2339,7 +2647,9 @@ public final class VectorTile { } public Builder mergeFrom(vector_tile.VectorTile.Tile.Feature other) { - if (other == vector_tile.VectorTile.Tile.Feature.getDefaultInstance()) return this; + if (other == vector_tile.VectorTile.Tile.Feature.getDefaultInstance()) { + return this; + } if (other.hasId()) { setId(other.getId()); } @@ -2378,9 +2688,9 @@ public final class VectorTile { @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { vector_tile.VectorTile.Tile.Feature parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -2394,27 +2704,34 @@ public final class VectorTile { } return this; } + private int bitField0_; - private long id_ ; + private long id_; + /** * optional uint64 id = 1 [default = 0]; + * * @return Whether the id field is set. */ @java.lang.Override public boolean hasId() { return ((bitField0_ & 0x00000001) != 0); } + /** * optional uint64 id = 1 [default = 0]; + * * @return The id. */ @java.lang.Override public long getId() { return id_; } + /** * optional uint64 id = 1 [default = 0]; + * * @param value The id to set. * @return This builder for chaining. */ @@ -2424,8 +2741,10 @@ public final class VectorTile { onChanged(); return this; } + /** * optional uint64 id = 1 [default = 0]; + * * @return This builder for chaining. */ public Builder clearId() { @@ -2436,12 +2755,14 @@ public final class VectorTile { } private com.google.protobuf.Internal.IntList tags_ = emptyIntList(); + private void ensureTagsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { tags_ = mutableCopy(tags_); bitField0_ |= 0x00000002; - } + } } + /** *

          * Tags of this feature are encoded as repeated pairs of
@@ -2451,13 +2772,15 @@ public final class VectorTile {
          * 
* * repeated uint32 tags = 2 [packed = true]; + * * @return A list containing the tags. */ public java.util.List - getTagsList() { + getTagsList() { return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(tags_) : tags_; + java.util.Collections.unmodifiableList(tags_) : tags_; } + /** *
          * Tags of this feature are encoded as repeated pairs of
@@ -2467,11 +2790,13 @@ public final class VectorTile {
          * 
* * repeated uint32 tags = 2 [packed = true]; + * * @return The count of tags. */ public int getTagsCount() { return tags_.size(); } + /** *
          * Tags of this feature are encoded as repeated pairs of
@@ -2481,12 +2806,14 @@ public final class VectorTile {
          * 
* * repeated uint32 tags = 2 [packed = true]; + * * @param index The index of the element to return. * @return The tags at the given index. */ public int getTags(int index) { return tags_.getInt(index); } + /** *
          * Tags of this feature are encoded as repeated pairs of
@@ -2496,17 +2823,19 @@ public final class VectorTile {
          * 
* * repeated uint32 tags = 2 [packed = true]; + * * @param index The index to set the value at. * @param value The tags to set. * @return This builder for chaining. */ public Builder setTags( - int index, int value) { + int index, int value) { ensureTagsIsMutable(); tags_.setInt(index, value); onChanged(); return this; } + /** *
          * Tags of this feature are encoded as repeated pairs of
@@ -2516,6 +2845,7 @@ public final class VectorTile {
          * 
* * repeated uint32 tags = 2 [packed = true]; + * * @param value The tags to add. * @return This builder for chaining. */ @@ -2525,6 +2855,7 @@ public final class VectorTile { onChanged(); return this; } + /** *
          * Tags of this feature are encoded as repeated pairs of
@@ -2534,17 +2865,19 @@ public final class VectorTile {
          * 
* * repeated uint32 tags = 2 [packed = true]; + * * @param values The tags to add. * @return This builder for chaining. */ public Builder addAllTags( - java.lang.Iterable values) { + java.lang.Iterable values) { ensureTagsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tags_); + values, tags_); onChanged(); return this; } + /** *
          * Tags of this feature are encoded as repeated pairs of
@@ -2554,6 +2887,7 @@ public final class VectorTile {
          * 
* * repeated uint32 tags = 2 [packed = true]; + * * @return This builder for chaining. */ public Builder clearTags() { @@ -2564,23 +2898,28 @@ public final class VectorTile { } private int type_ = 0; + /** *
          * The type of geometry stored in this feature.
          * 
* * optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN]; + * * @return Whether the type field is set. */ - @java.lang.Override public boolean hasType() { + @java.lang.Override + public boolean hasType() { return ((bitField0_ & 0x00000004) != 0); } + /** *
          * The type of geometry stored in this feature.
          * 
* * optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN]; + * * @return The type. */ @java.lang.Override @@ -2589,12 +2928,14 @@ public final class VectorTile { vector_tile.VectorTile.Tile.GeomType result = vector_tile.VectorTile.Tile.GeomType.valueOf(type_); return result == null ? vector_tile.VectorTile.Tile.GeomType.UNKNOWN : result; } + /** *
          * The type of geometry stored in this feature.
          * 
* * optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN]; + * * @param value The type to set. * @return This builder for chaining. */ @@ -2607,12 +2948,14 @@ public final class VectorTile { onChanged(); return this; } + /** *
          * The type of geometry stored in this feature.
          * 
* * optional .vector_tile.Tile.GeomType type = 3 [default = UNKNOWN]; + * * @return This builder for chaining. */ public Builder clearType() { @@ -2623,12 +2966,14 @@ public final class VectorTile { } private com.google.protobuf.Internal.IntList geometry_ = emptyIntList(); + private void ensureGeometryIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { geometry_ = mutableCopy(geometry_); bitField0_ |= 0x00000008; - } + } } + /** *
          * Contains a stream of commands and parameters (vertices).
@@ -2637,13 +2982,15 @@ public final class VectorTile {
          * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @return A list containing the geometry. */ public java.util.List - getGeometryList() { + getGeometryList() { return ((bitField0_ & 0x00000008) != 0) ? - java.util.Collections.unmodifiableList(geometry_) : geometry_; + java.util.Collections.unmodifiableList(geometry_) : geometry_; } + /** *
          * Contains a stream of commands and parameters (vertices).
@@ -2652,11 +2999,13 @@ public final class VectorTile {
          * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @return The count of geometry. */ public int getGeometryCount() { return geometry_.size(); } + /** *
          * Contains a stream of commands and parameters (vertices).
@@ -2665,12 +3014,14 @@ public final class VectorTile {
          * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @param index The index of the element to return. * @return The geometry at the given index. */ public int getGeometry(int index) { return geometry_.getInt(index); } + /** *
          * Contains a stream of commands and parameters (vertices).
@@ -2679,17 +3030,19 @@ public final class VectorTile {
          * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @param index The index to set the value at. * @param value The geometry to set. * @return This builder for chaining. */ public Builder setGeometry( - int index, int value) { + int index, int value) { ensureGeometryIsMutable(); geometry_.setInt(index, value); onChanged(); return this; } + /** *
          * Contains a stream of commands and parameters (vertices).
@@ -2698,6 +3051,7 @@ public final class VectorTile {
          * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @param value The geometry to add. * @return This builder for chaining. */ @@ -2707,6 +3061,7 @@ public final class VectorTile { onChanged(); return this; } + /** *
          * Contains a stream of commands and parameters (vertices).
@@ -2715,17 +3070,19 @@ public final class VectorTile {
          * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @param values The geometry to add. * @return This builder for chaining. */ public Builder addAllGeometry( - java.lang.Iterable values) { + java.lang.Iterable values) { ensureGeometryIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, geometry_); + values, geometry_); onChanged(); return this; } + /** *
          * Contains a stream of commands and parameters (vertices).
@@ -2734,6 +3091,7 @@ public final class VectorTile {
          * 
* * repeated uint32 geometry = 4 [packed = true]; + * * @return This builder for chaining. */ public Builder clearGeometry() { @@ -2742,24 +3100,25 @@ public final class VectorTile { onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:vector_tile.Tile.Feature) } // @@protoc_insertion_point(class_scope:vector_tile.Tile.Feature) private static final vector_tile.VectorTile.Tile.Feature DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new vector_tile.VectorTile.Tile.Feature(); } @@ -2768,13 +3127,14 @@ public final class VectorTile { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Deprecated + public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Feature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return new Feature(input, extensionRegistry); } }; @@ -2796,9 +3156,9 @@ public final class VectorTile { } public interface LayerOrBuilder extends - // @@protoc_insertion_point(interface_extends:vector_tile.Tile.Layer) - com.google.protobuf.GeneratedMessageV3. - ExtendableMessageOrBuilder { + // @@protoc_insertion_point(interface_extends:vector_tile.Tile.Layer) + com.google.protobuf.GeneratedMessageV3. + ExtendableMessageOrBuilder { /** *
@@ -2809,9 +3169,11 @@ public final class VectorTile {
        * 
* * required uint32 version = 15 [default = 1]; + * * @return Whether the version field is set. */ boolean hasVersion(); + /** *
        * Any compliant implementation must first read the version
@@ -2821,26 +3183,32 @@ public final class VectorTile {
        * 
* * required uint32 version = 15 [default = 1]; + * * @return The version. */ int getVersion(); /** * required string name = 1; + * * @return Whether the name field is set. */ boolean hasName(); + /** * required string name = 1; + * * @return The name. */ java.lang.String getName(); + /** * required string name = 1; + * * @return The bytes for name. */ com.google.protobuf.ByteString - getNameBytes(); + getNameBytes(); /** *
@@ -2849,8 +3217,9 @@ public final class VectorTile {
        *
        * repeated .vector_tile.Tile.Feature features = 2;
        */
-      java.util.List 
-          getFeaturesList();
+      java.util.List
+      getFeaturesList();
+
       /**
        * 
        * The actual features in this tile.
@@ -2859,6 +3228,7 @@ public final class VectorTile {
        * repeated .vector_tile.Tile.Feature features = 2;
        */
       vector_tile.VectorTile.Tile.Feature getFeatures(int index);
+
       /**
        * 
        * The actual features in this tile.
@@ -2867,6 +3237,7 @@ public final class VectorTile {
        * repeated .vector_tile.Tile.Feature features = 2;
        */
       int getFeaturesCount();
+
       /**
        * 
        * The actual features in this tile.
@@ -2874,8 +3245,9 @@ public final class VectorTile {
        *
        * repeated .vector_tile.Tile.Feature features = 2;
        */
-      java.util.List 
-          getFeaturesOrBuilderList();
+      java.util.List
+      getFeaturesOrBuilderList();
+
       /**
        * 
        * The actual features in this tile.
@@ -2884,7 +3256,7 @@ public final class VectorTile {
        * repeated .vector_tile.Tile.Feature features = 2;
        */
       vector_tile.VectorTile.Tile.FeatureOrBuilder getFeaturesOrBuilder(
-          int index);
+        int index);
 
       /**
        * 
@@ -2892,40 +3264,47 @@ public final class VectorTile {
        * 
* * repeated string keys = 3; + * * @return A list containing the keys. */ java.util.List - getKeysList(); + getKeysList(); + /** *
        * Dictionary encoding for keys
        * 
* * repeated string keys = 3; + * * @return The count of keys. */ int getKeysCount(); + /** *
        * Dictionary encoding for keys
        * 
* * repeated string keys = 3; + * * @param index The index of the element to return. * @return The keys at the given index. */ java.lang.String getKeys(int index); + /** *
        * Dictionary encoding for keys
        * 
* * repeated string keys = 3; + * * @param index The index of the value to return. * @return The bytes of the keys at the given index. */ com.google.protobuf.ByteString - getKeysBytes(int index); + getKeysBytes(int index); /** *
@@ -2934,8 +3313,9 @@ public final class VectorTile {
        *
        * repeated .vector_tile.Tile.Value values = 4;
        */
-      java.util.List 
-          getValuesList();
+      java.util.List
+      getValuesList();
+
       /**
        * 
        * Dictionary encoding for values
@@ -2944,6 +3324,7 @@ public final class VectorTile {
        * repeated .vector_tile.Tile.Value values = 4;
        */
       vector_tile.VectorTile.Tile.Value getValues(int index);
+
       /**
        * 
        * Dictionary encoding for values
@@ -2952,6 +3333,7 @@ public final class VectorTile {
        * repeated .vector_tile.Tile.Value values = 4;
        */
       int getValuesCount();
+
       /**
        * 
        * Dictionary encoding for values
@@ -2959,8 +3341,9 @@ public final class VectorTile {
        *
        * repeated .vector_tile.Tile.Value values = 4;
        */
-      java.util.List 
-          getValuesOrBuilderList();
+      java.util.List
+      getValuesOrBuilderList();
+
       /**
        * 
        * Dictionary encoding for values
@@ -2969,7 +3352,7 @@ public final class VectorTile {
        * repeated .vector_tile.Tile.Value values = 4;
        */
       vector_tile.VectorTile.Tile.ValueOrBuilder getValuesOrBuilder(
-          int index);
+        int index);
 
       /**
        * 
@@ -2978,9 +3361,11 @@ public final class VectorTile {
        * 
* * optional uint32 extent = 5 [default = 4096]; + * * @return Whether the extent field is set. */ boolean hasExtent(); + /** *
        * Although this is an "optional" field it is required by the specification.
@@ -2988,27 +3373,33 @@ public final class VectorTile {
        * 
* * optional uint32 extent = 5 [default = 4096]; + * * @return The extent. */ int getExtent(); } + /** *
      * Layers are described in section 4.1 of the specification
      * 
- * + *

* Protobuf type {@code vector_tile.Tile.Layer} */ public static final class Layer extends - com.google.protobuf.GeneratedMessageV3.ExtendableMessage< - Layer> implements - // @@protoc_insertion_point(message_implements:vector_tile.Tile.Layer) - LayerOrBuilder { - private static final long serialVersionUID = 0L; + com.google.protobuf.GeneratedMessageV3.ExtendableMessage< + Layer> implements + // @@protoc_insertion_point(message_implements:vector_tile.Tile.Layer) + LayerOrBuilder { + + private static final long serialVersionUID = 0L; + // Use Layer.newBuilder() to construct. - private Layer(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { + private Layer( + com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) { super(builder); } + private Layer() { version_ = 1; name_ = ""; @@ -3021,7 +3412,7 @@ public final class VectorTile { @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + UnusedPrivateParameter unused) { return new Layer(); } @@ -3030,17 +3421,18 @@ public final class VectorTile { getUnknownFields() { return this.unknownFields; } + private Layer( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -3061,7 +3453,7 @@ public final class VectorTile { mutable_bitField0_ |= 0x00000004; } features_.add( - input.readMessage(vector_tile.VectorTile.Tile.Feature.PARSER, extensionRegistry)); + input.readMessage(vector_tile.VectorTile.Tile.Feature.PARSER, extensionRegistry)); break; } case 26: { @@ -3079,7 +3471,7 @@ public final class VectorTile { mutable_bitField0_ |= 0x00000010; } values_.add( - input.readMessage(vector_tile.VectorTile.Tile.Value.PARSER, extensionRegistry)); + input.readMessage(vector_tile.VectorTile.Tile.Value.PARSER, extensionRegistry)); break; } case 40: { @@ -3094,7 +3486,7 @@ public final class VectorTile { } default: { if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -3105,7 +3497,7 @@ public final class VectorTile { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000004) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); @@ -3120,22 +3512,24 @@ public final class VectorTile { makeExtensionsImmutable(); } } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Layer_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Layer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - vector_tile.VectorTile.Tile.Layer.class, vector_tile.VectorTile.Tile.Layer.Builder.class); + .ensureFieldAccessorsInitialized( + vector_tile.VectorTile.Tile.Layer.class, vector_tile.VectorTile.Tile.Layer.Builder.class); } private int bitField0_; public static final int VERSION_FIELD_NUMBER = 15; private int version_; + /** *

        * Any compliant implementation must first read the version
@@ -3145,12 +3539,14 @@ public final class VectorTile {
        * 
* * required uint32 version = 15 [default = 1]; + * * @return Whether the version field is set. */ @java.lang.Override public boolean hasVersion() { return ((bitField0_ & 0x00000001) != 0); } + /** *
        * Any compliant implementation must first read the version
@@ -3160,6 +3556,7 @@ public final class VectorTile {
        * 
* * required uint32 version = 15 [default = 1]; + * * @return The version. */ @java.lang.Override @@ -3169,16 +3566,20 @@ public final class VectorTile { public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; + /** * required string name = 1; + * * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000002) != 0); } + /** * required string name = 1; + * * @return The name. */ @java.lang.Override @@ -3187,8 +3588,8 @@ public final class VectorTile { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { name_ = s; @@ -3196,18 +3597,20 @@ public final class VectorTile { return s; } } + /** * required string name = 1; + * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString - getNameBytes() { + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -3217,6 +3620,7 @@ public final class VectorTile { public static final int FEATURES_FIELD_NUMBER = 2; private java.util.List features_; + /** *
        * The actual features in this tile.
@@ -3228,6 +3632,7 @@ public final class VectorTile {
       public java.util.List getFeaturesList() {
         return features_;
       }
+
       /**
        * 
        * The actual features in this tile.
@@ -3236,10 +3641,11 @@ public final class VectorTile {
        * repeated .vector_tile.Tile.Feature features = 2;
        */
       @java.lang.Override
-      public java.util.List 
-          getFeaturesOrBuilderList() {
+      public java.util.List
+      getFeaturesOrBuilderList() {
         return features_;
       }
+
       /**
        * 
        * The actual features in this tile.
@@ -3251,6 +3657,7 @@ public final class VectorTile {
       public int getFeaturesCount() {
         return features_.size();
       }
+
       /**
        * 
        * The actual features in this tile.
@@ -3262,6 +3669,7 @@ public final class VectorTile {
       public vector_tile.VectorTile.Tile.Feature getFeatures(int index) {
         return features_.get(index);
       }
+
       /**
        * 
        * The actual features in this tile.
@@ -3271,63 +3679,72 @@ public final class VectorTile {
        */
       @java.lang.Override
       public vector_tile.VectorTile.Tile.FeatureOrBuilder getFeaturesOrBuilder(
-          int index) {
+        int index) {
         return features_.get(index);
       }
 
       public static final int KEYS_FIELD_NUMBER = 3;
       private com.google.protobuf.LazyStringList keys_;
+
       /**
        * 
        * Dictionary encoding for keys
        * 
* * repeated string keys = 3; + * * @return A list containing the keys. */ public com.google.protobuf.ProtocolStringList - getKeysList() { + getKeysList() { return keys_; } + /** *
        * Dictionary encoding for keys
        * 
* * repeated string keys = 3; + * * @return The count of keys. */ public int getKeysCount() { return keys_.size(); } + /** *
        * Dictionary encoding for keys
        * 
* * repeated string keys = 3; + * * @param index The index of the element to return. * @return The keys at the given index. */ public java.lang.String getKeys(int index) { return keys_.get(index); } + /** *
        * Dictionary encoding for keys
        * 
* * repeated string keys = 3; + * * @param index The index of the value to return. * @return The bytes of the keys at the given index. */ public com.google.protobuf.ByteString - getKeysBytes(int index) { + getKeysBytes(int index) { return keys_.getByteString(index); } public static final int VALUES_FIELD_NUMBER = 4; private java.util.List values_; + /** *
        * Dictionary encoding for values
@@ -3339,6 +3756,7 @@ public final class VectorTile {
       public java.util.List getValuesList() {
         return values_;
       }
+
       /**
        * 
        * Dictionary encoding for values
@@ -3347,10 +3765,11 @@ public final class VectorTile {
        * repeated .vector_tile.Tile.Value values = 4;
        */
       @java.lang.Override
-      public java.util.List 
-          getValuesOrBuilderList() {
+      public java.util.List
+      getValuesOrBuilderList() {
         return values_;
       }
+
       /**
        * 
        * Dictionary encoding for values
@@ -3362,6 +3781,7 @@ public final class VectorTile {
       public int getValuesCount() {
         return values_.size();
       }
+
       /**
        * 
        * Dictionary encoding for values
@@ -3373,6 +3793,7 @@ public final class VectorTile {
       public vector_tile.VectorTile.Tile.Value getValues(int index) {
         return values_.get(index);
       }
+
       /**
        * 
        * Dictionary encoding for values
@@ -3382,12 +3803,13 @@ public final class VectorTile {
        */
       @java.lang.Override
       public vector_tile.VectorTile.Tile.ValueOrBuilder getValuesOrBuilder(
-          int index) {
+        int index) {
         return values_.get(index);
       }
 
       public static final int EXTENT_FIELD_NUMBER = 5;
       private int extent_;
+
       /**
        * 
        * Although this is an "optional" field it is required by the specification.
@@ -3395,12 +3817,14 @@ public final class VectorTile {
        * 
* * optional uint32 extent = 5 [default = 4096]; + * * @return Whether the extent field is set. */ @java.lang.Override public boolean hasExtent() { return ((bitField0_ & 0x00000004) != 0); } + /** *
        * Although this is an "optional" field it is required by the specification.
@@ -3408,6 +3832,7 @@ public final class VectorTile {
        * 
* * optional uint32 extent = 5 [default = 4096]; + * * @return The extent. */ @java.lang.Override @@ -3416,11 +3841,16 @@ public final class VectorTile { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized == 1) { + return true; + } + if (isInitialized == 0) { + return false; + } if (!hasVersion()) { memoizedIsInitialized = 0; @@ -3446,10 +3876,10 @@ public final class VectorTile { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { com.google.protobuf.GeneratedMessageV3 .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); + extensionWriter = newExtensionWriter(); if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } @@ -3475,7 +3905,9 @@ public final class VectorTile { @java.lang.Override public int getSerializedSize() { int size = memoizedSize; - if (size != -1) return size; + if (size != -1) { + return size; + } size = 0; if (((bitField0_ & 0x00000002) != 0)) { @@ -3514,37 +3946,58 @@ public final class VectorTile { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof vector_tile.VectorTile.Tile.Layer)) { return super.equals(obj); } vector_tile.VectorTile.Tile.Layer other = (vector_tile.VectorTile.Tile.Layer) obj; - if (hasVersion() != other.hasVersion()) return false; + if (hasVersion() != other.hasVersion()) { + return false; + } if (hasVersion()) { if (getVersion() - != other.getVersion()) return false; + != other.getVersion()) { + return false; + } + } + if (hasName() != other.hasName()) { + return false; } - if (hasName() != other.hasName()) return false; if (hasName()) { if (!getName() - .equals(other.getName())) return false; + .equals(other.getName())) { + return false; + } } if (!getFeaturesList() - .equals(other.getFeaturesList())) return false; + .equals(other.getFeaturesList())) { + return false; + } if (!getKeysList() - .equals(other.getKeysList())) return false; + .equals(other.getKeysList())) { + return false; + } if (!getValuesList() - .equals(other.getValuesList())) return false; - if (hasExtent() != other.hasExtent()) return false; + .equals(other.getValuesList())) { + return false; + } + if (hasExtent() != other.hasExtent()) { + return false; + } if (hasExtent()) { if (getExtent() - != other.getExtent()) return false; + != other.getExtent()) { + return false; + } } - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) + if (!unknownFields.equals(other.unknownFields)) { return false; + } + if (!getExtensionFields().equals(other.getExtensionFields())) { + return false; + } return true; } @@ -3586,118 +4039,136 @@ public final class VectorTile { } public static vector_tile.VectorTile.Tile.Layer parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile.Layer parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Layer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile.Layer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Layer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile.Layer parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Layer parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + .parseWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile.Layer parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + .parseWithIOException(PARSER, input, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Layer parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + .parseDelimitedWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile.Layer parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } + public static vector_tile.VectorTile.Tile.Layer parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + .parseWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile.Layer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(vector_tile.VectorTile.Tile.Layer prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** *
        * Layers are described in section 4.1 of the specification
        * 
- * + *

* Protobuf type {@code vector_tile.Tile.Layer} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - vector_tile.VectorTile.Tile.Layer, Builder> implements - // @@protoc_insertion_point(builder_implements:vector_tile.Tile.Layer) - vector_tile.VectorTile.Tile.LayerOrBuilder { + com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + vector_tile.VectorTile.Tile.Layer, Builder> implements + // @@protoc_insertion_point(builder_implements:vector_tile.Tile.Layer) + vector_tile.VectorTile.Tile.LayerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Layer_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Layer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - vector_tile.VectorTile.Tile.Layer.class, vector_tile.VectorTile.Tile.Layer.Builder.class); + .ensureFieldAccessorsInitialized( + vector_tile.VectorTile.Tile.Layer.class, vector_tile.VectorTile.Tile.Layer.Builder.class); } // Construct using vector_tile.VectorTile.Tile.Layer.newBuilder() @@ -3706,17 +4177,19 @@ public final class VectorTile { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { + .alwaysUseFieldBuilders) { getFeaturesFieldBuilder(); getValuesFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); @@ -3745,7 +4218,7 @@ public final class VectorTile { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_Layer_descriptor; } @@ -3812,65 +4285,75 @@ public final class VectorTile { public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile.Layer, Type> extension, - Type value) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile.Layer, Type> extension, + Type value) { return super.setExtension(extension, value); } + @java.lang.Override public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile.Layer, java.util.List> extension, - int index, Type value) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile.Layer, java.util.List> extension, + int index, Type value) { return super.setExtension(extension, index, value); } + @java.lang.Override public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile.Layer, java.util.List> extension, - Type value) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile.Layer, java.util.List> extension, + Type value) { return super.addExtension(extension, value); } + @java.lang.Override public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile.Layer, ?> extension) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile.Layer, ?> extension) { return super.clearExtension(extension); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof vector_tile.VectorTile.Tile.Layer) { - return mergeFrom((vector_tile.VectorTile.Tile.Layer)other); + return mergeFrom((vector_tile.VectorTile.Tile.Layer) other); } else { super.mergeFrom(other); return this; @@ -3878,7 +4361,9 @@ public final class VectorTile { } public Builder mergeFrom(vector_tile.VectorTile.Tile.Layer other) { - if (other == vector_tile.VectorTile.Tile.Layer.getDefaultInstance()) return this; + if (other == vector_tile.VectorTile.Tile.Layer.getDefaultInstance()) { + return this; + } if (other.hasVersion()) { setVersion(other.getVersion()); } @@ -3905,9 +4390,9 @@ public final class VectorTile { featuresBuilder_ = null; features_ = other.features_; bitField0_ = (bitField0_ & ~0x00000004); - featuresBuilder_ = + featuresBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getFeaturesFieldBuilder() : null; + getFeaturesFieldBuilder() : null; } else { featuresBuilder_.addAllMessages(other.features_); } @@ -3941,9 +4426,9 @@ public final class VectorTile { valuesBuilder_ = null; values_ = other.values_; bitField0_ = (bitField0_ & ~0x00000010); - valuesBuilder_ = + valuesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getValuesFieldBuilder() : null; + getValuesFieldBuilder() : null; } else { valuesBuilder_.addAllMessages(other.values_); } @@ -3979,9 +4464,9 @@ public final class VectorTile { @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { vector_tile.VectorTile.Tile.Layer parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -3995,9 +4480,11 @@ public final class VectorTile { } return this; } + private int bitField0_; private int version_ = 1; + /** *

          * Any compliant implementation must first read the version
@@ -4007,12 +4494,14 @@ public final class VectorTile {
          * 
* * required uint32 version = 15 [default = 1]; + * * @return Whether the version field is set. */ @java.lang.Override public boolean hasVersion() { return ((bitField0_ & 0x00000001) != 0); } + /** *
          * Any compliant implementation must first read the version
@@ -4022,12 +4511,14 @@ public final class VectorTile {
          * 
* * required uint32 version = 15 [default = 1]; + * * @return The version. */ @java.lang.Override public int getVersion() { return version_; } + /** *
          * Any compliant implementation must first read the version
@@ -4037,6 +4528,7 @@ public final class VectorTile {
          * 
* * required uint32 version = 15 [default = 1]; + * * @param value The version to set. * @return This builder for chaining. */ @@ -4046,6 +4538,7 @@ public final class VectorTile { onChanged(); return this; } + /** *
          * Any compliant implementation must first read the version
@@ -4055,6 +4548,7 @@ public final class VectorTile {
          * 
* * required uint32 version = 15 [default = 1]; + * * @return This builder for chaining. */ public Builder clearVersion() { @@ -4065,22 +4559,26 @@ public final class VectorTile { } private java.lang.Object name_ = ""; + /** * required string name = 1; + * * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000002) != 0); } + /** * required string name = 1; + * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { name_ = s; @@ -4090,40 +4588,46 @@ public final class VectorTile { return (java.lang.String) ref; } } + /** * required string name = 1; + * * @return The bytes for name. */ public com.google.protobuf.ByteString - getNameBytes() { + getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * required string name = 1; + * * @param value The name to set. * @return This builder for chaining. */ public Builder setName( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; name_ = value; onChanged(); return this; } + /** * required string name = 1; + * * @return This builder for chaining. */ public Builder clearName() { @@ -4132,17 +4636,19 @@ public final class VectorTile { onChanged(); return this; } + /** * required string name = 1; + * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; name_ = value; onChanged(); return this; @@ -4150,15 +4656,16 @@ public final class VectorTile { private java.util.List features_ = java.util.Collections.emptyList(); + private void ensureFeaturesIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000004; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - vector_tile.VectorTile.Tile.Feature, vector_tile.VectorTile.Tile.Feature.Builder, vector_tile.VectorTile.Tile.FeatureOrBuilder> featuresBuilder_; + vector_tile.VectorTile.Tile.Feature, vector_tile.VectorTile.Tile.Feature.Builder, vector_tile.VectorTile.Tile.FeatureOrBuilder> featuresBuilder_; /** *
@@ -4174,6 +4681,7 @@ public final class VectorTile {
             return featuresBuilder_.getMessageList();
           }
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4188,6 +4696,7 @@ public final class VectorTile {
             return featuresBuilder_.getCount();
           }
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4202,6 +4711,7 @@ public final class VectorTile {
             return featuresBuilder_.getMessage(index);
           }
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4210,7 +4720,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Feature features = 2;
          */
         public Builder setFeatures(
-            int index, vector_tile.VectorTile.Tile.Feature value) {
+          int index, vector_tile.VectorTile.Tile.Feature value) {
           if (featuresBuilder_ == null) {
             if (value == null) {
               throw new NullPointerException();
@@ -4223,6 +4733,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4231,7 +4742,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Feature features = 2;
          */
         public Builder setFeatures(
-            int index, vector_tile.VectorTile.Tile.Feature.Builder builderForValue) {
+          int index, vector_tile.VectorTile.Tile.Feature.Builder builderForValue) {
           if (featuresBuilder_ == null) {
             ensureFeaturesIsMutable();
             features_.set(index, builderForValue.build());
@@ -4241,6 +4752,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4261,6 +4773,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4269,7 +4782,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Feature features = 2;
          */
         public Builder addFeatures(
-            int index, vector_tile.VectorTile.Tile.Feature value) {
+          int index, vector_tile.VectorTile.Tile.Feature value) {
           if (featuresBuilder_ == null) {
             if (value == null) {
               throw new NullPointerException();
@@ -4282,6 +4795,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4290,7 +4804,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Feature features = 2;
          */
         public Builder addFeatures(
-            vector_tile.VectorTile.Tile.Feature.Builder builderForValue) {
+          vector_tile.VectorTile.Tile.Feature.Builder builderForValue) {
           if (featuresBuilder_ == null) {
             ensureFeaturesIsMutable();
             features_.add(builderForValue.build());
@@ -4300,6 +4814,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4308,7 +4823,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Feature features = 2;
          */
         public Builder addFeatures(
-            int index, vector_tile.VectorTile.Tile.Feature.Builder builderForValue) {
+          int index, vector_tile.VectorTile.Tile.Feature.Builder builderForValue) {
           if (featuresBuilder_ == null) {
             ensureFeaturesIsMutable();
             features_.add(index, builderForValue.build());
@@ -4318,6 +4833,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4326,17 +4842,18 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Feature features = 2;
          */
         public Builder addAllFeatures(
-            java.lang.Iterable values) {
+          java.lang.Iterable values) {
           if (featuresBuilder_ == null) {
             ensureFeaturesIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
-                values, features_);
+              values, features_);
             onChanged();
           } else {
             featuresBuilder_.addAllMessages(values);
           }
           return this;
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4354,6 +4871,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4371,6 +4889,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4379,9 +4898,10 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Feature features = 2;
          */
         public vector_tile.VectorTile.Tile.Feature.Builder getFeaturesBuilder(
-            int index) {
+          int index) {
           return getFeaturesFieldBuilder().getBuilder(index);
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4390,12 +4910,14 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Feature features = 2;
          */
         public vector_tile.VectorTile.Tile.FeatureOrBuilder getFeaturesOrBuilder(
-            int index) {
+          int index) {
           if (featuresBuilder_ == null) {
-            return features_.get(index);  } else {
+            return features_.get(index);
+          } else {
             return featuresBuilder_.getMessageOrBuilder(index);
           }
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4403,14 +4925,15 @@ public final class VectorTile {
          *
          * repeated .vector_tile.Tile.Feature features = 2;
          */
-        public java.util.List 
-             getFeaturesOrBuilderList() {
+        public java.util.List
+        getFeaturesOrBuilderList() {
           if (featuresBuilder_ != null) {
             return featuresBuilder_.getMessageOrBuilderList();
           } else {
             return java.util.Collections.unmodifiableList(features_);
           }
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4420,8 +4943,9 @@ public final class VectorTile {
          */
         public vector_tile.VectorTile.Tile.Feature.Builder addFeaturesBuilder() {
           return getFeaturesFieldBuilder().addBuilder(
-              vector_tile.VectorTile.Tile.Feature.getDefaultInstance());
+            vector_tile.VectorTile.Tile.Feature.getDefaultInstance());
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4430,10 +4954,11 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Feature features = 2;
          */
         public vector_tile.VectorTile.Tile.Feature.Builder addFeaturesBuilder(
-            int index) {
+          int index) {
           return getFeaturesFieldBuilder().addBuilder(
-              index, vector_tile.VectorTile.Tile.Feature.getDefaultInstance());
+            index, vector_tile.VectorTile.Tile.Feature.getDefaultInstance());
         }
+
         /**
          * 
          * The actual features in this tile.
@@ -4441,142 +4966,160 @@ public final class VectorTile {
          *
          * repeated .vector_tile.Tile.Feature features = 2;
          */
-        public java.util.List 
-             getFeaturesBuilderList() {
+        public java.util.List
+        getFeaturesBuilderList() {
           return getFeaturesFieldBuilder().getBuilderList();
         }
+
         private com.google.protobuf.RepeatedFieldBuilderV3<
-            vector_tile.VectorTile.Tile.Feature, vector_tile.VectorTile.Tile.Feature.Builder, vector_tile.VectorTile.Tile.FeatureOrBuilder> 
-            getFeaturesFieldBuilder() {
+          vector_tile.VectorTile.Tile.Feature, vector_tile.VectorTile.Tile.Feature.Builder, vector_tile.VectorTile.Tile.FeatureOrBuilder>
+        getFeaturesFieldBuilder() {
           if (featuresBuilder_ == null) {
             featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
-                vector_tile.VectorTile.Tile.Feature, vector_tile.VectorTile.Tile.Feature.Builder, vector_tile.VectorTile.Tile.FeatureOrBuilder>(
-                    features_,
-                    ((bitField0_ & 0x00000004) != 0),
-                    getParentForChildren(),
-                    isClean());
+              vector_tile.VectorTile.Tile.Feature, vector_tile.VectorTile.Tile.Feature.Builder, vector_tile.VectorTile.Tile.FeatureOrBuilder>(
+              features_,
+              ((bitField0_ & 0x00000004) != 0),
+              getParentForChildren(),
+              isClean());
             features_ = null;
           }
           return featuresBuilder_;
         }
 
         private com.google.protobuf.LazyStringList keys_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+
         private void ensureKeysIsMutable() {
           if (!((bitField0_ & 0x00000008) != 0)) {
             keys_ = new com.google.protobuf.LazyStringArrayList(keys_);
             bitField0_ |= 0x00000008;
-           }
+          }
         }
+
         /**
          * 
          * Dictionary encoding for keys
          * 
* * repeated string keys = 3; + * * @return A list containing the keys. */ public com.google.protobuf.ProtocolStringList - getKeysList() { + getKeysList() { return keys_.getUnmodifiableView(); } + /** *
          * Dictionary encoding for keys
          * 
* * repeated string keys = 3; + * * @return The count of keys. */ public int getKeysCount() { return keys_.size(); } + /** *
          * Dictionary encoding for keys
          * 
* * repeated string keys = 3; + * * @param index The index of the element to return. * @return The keys at the given index. */ public java.lang.String getKeys(int index) { return keys_.get(index); } + /** *
          * Dictionary encoding for keys
          * 
* * repeated string keys = 3; + * * @param index The index of the value to return. * @return The bytes of the keys at the given index. */ public com.google.protobuf.ByteString - getKeysBytes(int index) { + getKeysBytes(int index) { return keys_.getByteString(index); } + /** *
          * Dictionary encoding for keys
          * 
* * repeated string keys = 3; + * * @param index The index to set the value at. * @param value The keys to set. * @return This builder for chaining. */ public Builder setKeys( - int index, java.lang.String value) { + int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureKeysIsMutable(); + throw new NullPointerException(); + } + ensureKeysIsMutable(); keys_.set(index, value); onChanged(); return this; } + /** *
          * Dictionary encoding for keys
          * 
* * repeated string keys = 3; + * * @param value The keys to add. * @return This builder for chaining. */ public Builder addKeys( - java.lang.String value) { + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - ensureKeysIsMutable(); + throw new NullPointerException(); + } + ensureKeysIsMutable(); keys_.add(value); onChanged(); return this; } + /** *
          * Dictionary encoding for keys
          * 
* * repeated string keys = 3; + * * @param values The keys to add. * @return This builder for chaining. */ public Builder addAllKeys( - java.lang.Iterable values) { + java.lang.Iterable values) { ensureKeysIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, keys_); + values, keys_); onChanged(); return this; } + /** *
          * Dictionary encoding for keys
          * 
* * repeated string keys = 3; + * * @return This builder for chaining. */ public Builder clearKeys() { @@ -4585,21 +5128,23 @@ public final class VectorTile { onChanged(); return this; } + /** *
          * Dictionary encoding for keys
          * 
* * repeated string keys = 3; + * * @param value The bytes of the keys to add. * @return This builder for chaining. */ public Builder addKeysBytes( - com.google.protobuf.ByteString value) { + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - ensureKeysIsMutable(); + throw new NullPointerException(); + } + ensureKeysIsMutable(); keys_.add(value); onChanged(); return this; @@ -4607,15 +5152,16 @@ public final class VectorTile { private java.util.List values_ = java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { values_ = new java.util.ArrayList(values_); bitField0_ |= 0x00000010; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - vector_tile.VectorTile.Tile.Value, vector_tile.VectorTile.Tile.Value.Builder, vector_tile.VectorTile.Tile.ValueOrBuilder> valuesBuilder_; + vector_tile.VectorTile.Tile.Value, vector_tile.VectorTile.Tile.Value.Builder, vector_tile.VectorTile.Tile.ValueOrBuilder> valuesBuilder_; /** *
@@ -4631,6 +5177,7 @@ public final class VectorTile {
             return valuesBuilder_.getMessageList();
           }
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4645,6 +5192,7 @@ public final class VectorTile {
             return valuesBuilder_.getCount();
           }
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4659,6 +5207,7 @@ public final class VectorTile {
             return valuesBuilder_.getMessage(index);
           }
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4667,7 +5216,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Value values = 4;
          */
         public Builder setValues(
-            int index, vector_tile.VectorTile.Tile.Value value) {
+          int index, vector_tile.VectorTile.Tile.Value value) {
           if (valuesBuilder_ == null) {
             if (value == null) {
               throw new NullPointerException();
@@ -4680,6 +5229,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4688,7 +5238,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Value values = 4;
          */
         public Builder setValues(
-            int index, vector_tile.VectorTile.Tile.Value.Builder builderForValue) {
+          int index, vector_tile.VectorTile.Tile.Value.Builder builderForValue) {
           if (valuesBuilder_ == null) {
             ensureValuesIsMutable();
             values_.set(index, builderForValue.build());
@@ -4698,6 +5248,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4718,6 +5269,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4726,7 +5278,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Value values = 4;
          */
         public Builder addValues(
-            int index, vector_tile.VectorTile.Tile.Value value) {
+          int index, vector_tile.VectorTile.Tile.Value value) {
           if (valuesBuilder_ == null) {
             if (value == null) {
               throw new NullPointerException();
@@ -4739,6 +5291,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4747,7 +5300,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Value values = 4;
          */
         public Builder addValues(
-            vector_tile.VectorTile.Tile.Value.Builder builderForValue) {
+          vector_tile.VectorTile.Tile.Value.Builder builderForValue) {
           if (valuesBuilder_ == null) {
             ensureValuesIsMutable();
             values_.add(builderForValue.build());
@@ -4757,6 +5310,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4765,7 +5319,7 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Value values = 4;
          */
         public Builder addValues(
-            int index, vector_tile.VectorTile.Tile.Value.Builder builderForValue) {
+          int index, vector_tile.VectorTile.Tile.Value.Builder builderForValue) {
           if (valuesBuilder_ == null) {
             ensureValuesIsMutable();
             values_.add(index, builderForValue.build());
@@ -4775,6 +5329,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4783,17 +5338,18 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Value values = 4;
          */
         public Builder addAllValues(
-            java.lang.Iterable values) {
+          java.lang.Iterable values) {
           if (valuesBuilder_ == null) {
             ensureValuesIsMutable();
             com.google.protobuf.AbstractMessageLite.Builder.addAll(
-                values, values_);
+              values, values_);
             onChanged();
           } else {
             valuesBuilder_.addAllMessages(values);
           }
           return this;
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4811,6 +5367,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4828,6 +5385,7 @@ public final class VectorTile {
           }
           return this;
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4836,9 +5394,10 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Value values = 4;
          */
         public vector_tile.VectorTile.Tile.Value.Builder getValuesBuilder(
-            int index) {
+          int index) {
           return getValuesFieldBuilder().getBuilder(index);
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4847,12 +5406,14 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Value values = 4;
          */
         public vector_tile.VectorTile.Tile.ValueOrBuilder getValuesOrBuilder(
-            int index) {
+          int index) {
           if (valuesBuilder_ == null) {
-            return values_.get(index);  } else {
+            return values_.get(index);
+          } else {
             return valuesBuilder_.getMessageOrBuilder(index);
           }
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4860,14 +5421,15 @@ public final class VectorTile {
          *
          * repeated .vector_tile.Tile.Value values = 4;
          */
-        public java.util.List 
-             getValuesOrBuilderList() {
+        public java.util.List
+        getValuesOrBuilderList() {
           if (valuesBuilder_ != null) {
             return valuesBuilder_.getMessageOrBuilderList();
           } else {
             return java.util.Collections.unmodifiableList(values_);
           }
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4877,8 +5439,9 @@ public final class VectorTile {
          */
         public vector_tile.VectorTile.Tile.Value.Builder addValuesBuilder() {
           return getValuesFieldBuilder().addBuilder(
-              vector_tile.VectorTile.Tile.Value.getDefaultInstance());
+            vector_tile.VectorTile.Tile.Value.getDefaultInstance());
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4887,10 +5450,11 @@ public final class VectorTile {
          * repeated .vector_tile.Tile.Value values = 4;
          */
         public vector_tile.VectorTile.Tile.Value.Builder addValuesBuilder(
-            int index) {
+          int index) {
           return getValuesFieldBuilder().addBuilder(
-              index, vector_tile.VectorTile.Tile.Value.getDefaultInstance());
+            index, vector_tile.VectorTile.Tile.Value.getDefaultInstance());
         }
+
         /**
          * 
          * Dictionary encoding for values
@@ -4898,26 +5462,28 @@ public final class VectorTile {
          *
          * repeated .vector_tile.Tile.Value values = 4;
          */
-        public java.util.List 
-             getValuesBuilderList() {
+        public java.util.List
+        getValuesBuilderList() {
           return getValuesFieldBuilder().getBuilderList();
         }
+
         private com.google.protobuf.RepeatedFieldBuilderV3<
-            vector_tile.VectorTile.Tile.Value, vector_tile.VectorTile.Tile.Value.Builder, vector_tile.VectorTile.Tile.ValueOrBuilder> 
-            getValuesFieldBuilder() {
+          vector_tile.VectorTile.Tile.Value, vector_tile.VectorTile.Tile.Value.Builder, vector_tile.VectorTile.Tile.ValueOrBuilder>
+        getValuesFieldBuilder() {
           if (valuesBuilder_ == null) {
             valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
-                vector_tile.VectorTile.Tile.Value, vector_tile.VectorTile.Tile.Value.Builder, vector_tile.VectorTile.Tile.ValueOrBuilder>(
-                    values_,
-                    ((bitField0_ & 0x00000010) != 0),
-                    getParentForChildren(),
-                    isClean());
+              vector_tile.VectorTile.Tile.Value, vector_tile.VectorTile.Tile.Value.Builder, vector_tile.VectorTile.Tile.ValueOrBuilder>(
+              values_,
+              ((bitField0_ & 0x00000010) != 0),
+              getParentForChildren(),
+              isClean());
             values_ = null;
           }
           return valuesBuilder_;
         }
 
         private int extent_ = 4096;
+
         /**
          * 
          * Although this is an "optional" field it is required by the specification.
@@ -4925,12 +5491,14 @@ public final class VectorTile {
          * 
* * optional uint32 extent = 5 [default = 4096]; + * * @return Whether the extent field is set. */ @java.lang.Override public boolean hasExtent() { return ((bitField0_ & 0x00000020) != 0); } + /** *
          * Although this is an "optional" field it is required by the specification.
@@ -4938,12 +5506,14 @@ public final class VectorTile {
          * 
* * optional uint32 extent = 5 [default = 4096]; + * * @return The extent. */ @java.lang.Override public int getExtent() { return extent_; } + /** *
          * Although this is an "optional" field it is required by the specification.
@@ -4951,6 +5521,7 @@ public final class VectorTile {
          * 
* * optional uint32 extent = 5 [default = 4096]; + * * @param value The extent to set. * @return This builder for chaining. */ @@ -4960,6 +5531,7 @@ public final class VectorTile { onChanged(); return this; } + /** *
          * Although this is an "optional" field it is required by the specification.
@@ -4967,6 +5539,7 @@ public final class VectorTile {
          * 
* * optional uint32 extent = 5 [default = 4096]; + * * @return This builder for chaining. */ public Builder clearExtent() { @@ -4975,24 +5548,25 @@ public final class VectorTile { onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:vector_tile.Tile.Layer) } // @@protoc_insertion_point(class_scope:vector_tile.Tile.Layer) private static final vector_tile.VectorTile.Tile.Layer DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new vector_tile.VectorTile.Tile.Layer(); } @@ -5001,13 +5575,14 @@ public final class VectorTile { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Deprecated + public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Layer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return new Layer(input, extensionRegistry); } }; @@ -5030,6 +5605,7 @@ public final class VectorTile { public static final int LAYERS_FIELD_NUMBER = 3; private java.util.List layers_; + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @@ -5037,14 +5613,16 @@ public final class VectorTile { public java.util.List getLayersList() { return layers_; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @java.lang.Override - public java.util.List - getLayersOrBuilderList() { + public java.util.List + getLayersOrBuilderList() { return layers_; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @@ -5052,6 +5630,7 @@ public final class VectorTile { public int getLayersCount() { return layers_.size(); } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @@ -5059,21 +5638,27 @@ public final class VectorTile { public vector_tile.VectorTile.Tile.Layer getLayers(int index) { return layers_.get(index); } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @java.lang.Override public vector_tile.VectorTile.Tile.LayerOrBuilder getLayersOrBuilder( - int index) { + int index) { return layers_.get(index); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + if (isInitialized == 1) { + return true; + } + if (isInitialized == 0) { + return false; + } for (int i = 0; i < getLayersCount(); i++) { if (!getLayers(i).isInitialized()) { @@ -5091,10 +5676,10 @@ public final class VectorTile { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { com.google.protobuf.GeneratedMessageV3 .ExtendableMessage.ExtensionWriter - extensionWriter = newExtensionWriter(); + extensionWriter = newExtensionWriter(); for (int i = 0; i < layers_.size(); i++) { output.writeMessage(3, layers_.get(i)); } @@ -5105,7 +5690,9 @@ public final class VectorTile { @java.lang.Override public int getSerializedSize() { int size = memoizedSize; - if (size != -1) return size; + if (size != -1) { + return size; + } size = 0; for (int i = 0; i < layers_.size(); i++) { @@ -5121,7 +5708,7 @@ public final class VectorTile { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof vector_tile.VectorTile.Tile)) { return super.equals(obj); @@ -5129,10 +5716,15 @@ public final class VectorTile { vector_tile.VectorTile.Tile other = (vector_tile.VectorTile.Tile) obj; if (!getLayersList() - .equals(other.getLayersList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - if (!getExtensionFields().equals(other.getExtensionFields())) + .equals(other.getLayersList())) { return false; + } + if (!unknownFields.equals(other.unknownFields)) { + return false; + } + if (!getExtensionFields().equals(other.getExtensionFields())) { + return false; + } return true; } @@ -5154,114 +5746,132 @@ public final class VectorTile { } public static vector_tile.VectorTile.Tile parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static vector_tile.VectorTile.Tile parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static vector_tile.VectorTile.Tile parseFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + .parseWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + .parseWithIOException(PARSER, input, extensionRegistry); } + public static vector_tile.VectorTile.Tile parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + .parseDelimitedWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } + public static vector_tile.VectorTile.Tile parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + .parseWithIOException(PARSER, input); } + public static vector_tile.VectorTile.Tile parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } + public static Builder newBuilder(vector_tile.VectorTile.Tile prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code vector_tile.Tile} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< - vector_tile.VectorTile.Tile, Builder> implements - // @@protoc_insertion_point(builder_implements:vector_tile.Tile) - vector_tile.VectorTile.TileOrBuilder { + com.google.protobuf.GeneratedMessageV3.ExtendableBuilder< + vector_tile.VectorTile.Tile, Builder> implements + // @@protoc_insertion_point(builder_implements:vector_tile.Tile) + vector_tile.VectorTile.TileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + getDescriptor() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { + internalGetFieldAccessorTable() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_fieldAccessorTable - .ensureFieldAccessorsInitialized( - vector_tile.VectorTile.Tile.class, vector_tile.VectorTile.Tile.Builder.class); + .ensureFieldAccessorsInitialized( + vector_tile.VectorTile.Tile.class, vector_tile.VectorTile.Tile.Builder.class); } // Construct using vector_tile.VectorTile.Tile.newBuilder() @@ -5270,16 +5880,18 @@ public final class VectorTile { } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { + .alwaysUseFieldBuilders) { getLayersFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); @@ -5294,7 +5906,7 @@ public final class VectorTile { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + getDescriptorForType() { return vector_tile.VectorTile.internal_static_vector_tile_Tile_descriptor; } @@ -5333,65 +5945,75 @@ public final class VectorTile { public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile, Type> extension, - Type value) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile, Type> extension, + Type value) { return super.setExtension(extension, value); } + @java.lang.Override public Builder setExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile, java.util.List> extension, - int index, Type value) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile, java.util.List> extension, + int index, Type value) { return super.setExtension(extension, index, value); } + @java.lang.Override public Builder addExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile, java.util.List> extension, - Type value) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile, java.util.List> extension, + Type value) { return super.addExtension(extension, value); } + @java.lang.Override public Builder clearExtension( - com.google.protobuf.GeneratedMessage.GeneratedExtension< - vector_tile.VectorTile.Tile, ?> extension) { + com.google.protobuf.GeneratedMessage.GeneratedExtension< + vector_tile.VectorTile.Tile, ?> extension) { return super.clearExtension(extension); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof vector_tile.VectorTile.Tile) { - return mergeFrom((vector_tile.VectorTile.Tile)other); + return mergeFrom((vector_tile.VectorTile.Tile) other); } else { super.mergeFrom(other); return this; @@ -5399,7 +6021,9 @@ public final class VectorTile { } public Builder mergeFrom(vector_tile.VectorTile.Tile other) { - if (other == vector_tile.VectorTile.Tile.getDefaultInstance()) return this; + if (other == vector_tile.VectorTile.Tile.getDefaultInstance()) { + return this; + } if (layersBuilder_ == null) { if (!other.layers_.isEmpty()) { if (layers_.isEmpty()) { @@ -5418,9 +6042,9 @@ public final class VectorTile { layersBuilder_ = null; layers_ = other.layers_; bitField0_ = (bitField0_ & ~0x00000001); - layersBuilder_ = + layersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLayersFieldBuilder() : null; + getLayersFieldBuilder() : null; } else { layersBuilder_.addAllMessages(other.layers_); } @@ -5447,9 +6071,9 @@ public final class VectorTile { @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { vector_tile.VectorTile.Tile parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); @@ -5463,19 +6087,21 @@ public final class VectorTile { } return this; } + private int bitField0_; private java.util.List layers_ = java.util.Collections.emptyList(); + private void ensureLayersIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { layers_ = new java.util.ArrayList(layers_); bitField0_ |= 0x00000001; - } + } } private com.google.protobuf.RepeatedFieldBuilderV3< - vector_tile.VectorTile.Tile.Layer, vector_tile.VectorTile.Tile.Layer.Builder, vector_tile.VectorTile.Tile.LayerOrBuilder> layersBuilder_; + vector_tile.VectorTile.Tile.Layer, vector_tile.VectorTile.Tile.Layer.Builder, vector_tile.VectorTile.Tile.LayerOrBuilder> layersBuilder_; /** * repeated .vector_tile.Tile.Layer layers = 3; @@ -5487,6 +6113,7 @@ public final class VectorTile { return layersBuilder_.getMessageList(); } } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @@ -5497,6 +6124,7 @@ public final class VectorTile { return layersBuilder_.getCount(); } } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @@ -5507,11 +6135,12 @@ public final class VectorTile { return layersBuilder_.getMessage(index); } } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public Builder setLayers( - int index, vector_tile.VectorTile.Tile.Layer value) { + int index, vector_tile.VectorTile.Tile.Layer value) { if (layersBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5524,11 +6153,12 @@ public final class VectorTile { } return this; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public Builder setLayers( - int index, vector_tile.VectorTile.Tile.Layer.Builder builderForValue) { + int index, vector_tile.VectorTile.Tile.Layer.Builder builderForValue) { if (layersBuilder_ == null) { ensureLayersIsMutable(); layers_.set(index, builderForValue.build()); @@ -5538,6 +6168,7 @@ public final class VectorTile { } return this; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @@ -5554,11 +6185,12 @@ public final class VectorTile { } return this; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public Builder addLayers( - int index, vector_tile.VectorTile.Tile.Layer value) { + int index, vector_tile.VectorTile.Tile.Layer value) { if (layersBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5571,11 +6203,12 @@ public final class VectorTile { } return this; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public Builder addLayers( - vector_tile.VectorTile.Tile.Layer.Builder builderForValue) { + vector_tile.VectorTile.Tile.Layer.Builder builderForValue) { if (layersBuilder_ == null) { ensureLayersIsMutable(); layers_.add(builderForValue.build()); @@ -5585,11 +6218,12 @@ public final class VectorTile { } return this; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public Builder addLayers( - int index, vector_tile.VectorTile.Tile.Layer.Builder builderForValue) { + int index, vector_tile.VectorTile.Tile.Layer.Builder builderForValue) { if (layersBuilder_ == null) { ensureLayersIsMutable(); layers_.add(index, builderForValue.build()); @@ -5599,21 +6233,23 @@ public final class VectorTile { } return this; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public Builder addAllLayers( - java.lang.Iterable values) { + java.lang.Iterable values) { if (layersBuilder_ == null) { ensureLayersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, layers_); + values, layers_); onChanged(); } else { layersBuilder_.addAllMessages(values); } return this; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @@ -5627,6 +6263,7 @@ public final class VectorTile { } return this; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ @@ -5640,88 +6277,97 @@ public final class VectorTile { } return this; } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public vector_tile.VectorTile.Tile.Layer.Builder getLayersBuilder( - int index) { + int index) { return getLayersFieldBuilder().getBuilder(index); } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public vector_tile.VectorTile.Tile.LayerOrBuilder getLayersOrBuilder( - int index) { + int index) { if (layersBuilder_ == null) { - return layers_.get(index); } else { + return layers_.get(index); + } else { return layersBuilder_.getMessageOrBuilder(index); } } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ - public java.util.List - getLayersOrBuilderList() { + public java.util.List + getLayersOrBuilderList() { if (layersBuilder_ != null) { return layersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(layers_); } } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public vector_tile.VectorTile.Tile.Layer.Builder addLayersBuilder() { return getLayersFieldBuilder().addBuilder( - vector_tile.VectorTile.Tile.Layer.getDefaultInstance()); + vector_tile.VectorTile.Tile.Layer.getDefaultInstance()); } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ public vector_tile.VectorTile.Tile.Layer.Builder addLayersBuilder( - int index) { + int index) { return getLayersFieldBuilder().addBuilder( - index, vector_tile.VectorTile.Tile.Layer.getDefaultInstance()); + index, vector_tile.VectorTile.Tile.Layer.getDefaultInstance()); } + /** * repeated .vector_tile.Tile.Layer layers = 3; */ - public java.util.List - getLayersBuilderList() { + public java.util.List + getLayersBuilderList() { return getLayersFieldBuilder().getBuilderList(); } + private com.google.protobuf.RepeatedFieldBuilderV3< - vector_tile.VectorTile.Tile.Layer, vector_tile.VectorTile.Tile.Layer.Builder, vector_tile.VectorTile.Tile.LayerOrBuilder> - getLayersFieldBuilder() { + vector_tile.VectorTile.Tile.Layer, vector_tile.VectorTile.Tile.Layer.Builder, vector_tile.VectorTile.Tile.LayerOrBuilder> + getLayersFieldBuilder() { if (layersBuilder_ == null) { layersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - vector_tile.VectorTile.Tile.Layer, vector_tile.VectorTile.Tile.Layer.Builder, vector_tile.VectorTile.Tile.LayerOrBuilder>( - layers_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); + vector_tile.VectorTile.Tile.Layer, vector_tile.VectorTile.Tile.Layer.Builder, vector_tile.VectorTile.Tile.LayerOrBuilder>( + layers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); layers_ = null; } return layersBuilder_; } + @java.lang.Override public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:vector_tile.Tile) } // @@protoc_insertion_point(class_scope:vector_tile.Tile) private static final vector_tile.VectorTile.Tile DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new vector_tile.VectorTile.Tile(); } @@ -5730,13 +6376,14 @@ public final class VectorTile { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Deprecated + public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Tile parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return new Tile(input, extensionRegistry); } }; @@ -5759,78 +6406,81 @@ public final class VectorTile { private static final com.google.protobuf.Descriptors.Descriptor internal_static_vector_tile_Tile_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_vector_tile_Tile_fieldAccessorTable; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_vector_tile_Tile_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_vector_tile_Tile_Value_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_vector_tile_Tile_Value_fieldAccessorTable; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_vector_tile_Tile_Value_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_vector_tile_Tile_Feature_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_vector_tile_Tile_Feature_fieldAccessorTable; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_vector_tile_Tile_Feature_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_vector_tile_Tile_Layer_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_vector_tile_Tile_Layer_fieldAccessorTable; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_vector_tile_Tile_Layer_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { + getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; + + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { java.lang.String[] descriptorData = { - "\n$src/main/resources/vector_tile.proto\022\013" + - "vector_tile\"\300\004\n\004Tile\022\'\n\006layers\030\003 \003(\0132\027.v" + - "ector_tile.Tile.Layer\032\241\001\n\005Value\022\024\n\014strin" + - "g_value\030\001 \001(\t\022\023\n\013float_value\030\002 \001(\002\022\024\n\014do" + - "uble_value\030\003 \001(\001\022\021\n\tint_value\030\004 \001(\003\022\022\n\nu" + - "int_value\030\005 \001(\004\022\022\n\nsint_value\030\006 \001(\022\022\022\n\nb" + - "ool_value\030\007 \001(\010*\010\010\010\020\200\200\200\200\002\032s\n\007Feature\022\r\n\002" + - "id\030\001 \001(\004:\0010\022\020\n\004tags\030\002 \003(\rB\002\020\001\0221\n\004type\030\003 " + - "\001(\0162\032.vector_tile.Tile.GeomType:\007UNKNOWN" + - "\022\024\n\010geometry\030\004 \003(\rB\002\020\001\032\255\001\n\005Layer\022\022\n\007vers" + - "ion\030\017 \002(\r:\0011\022\014\n\004name\030\001 \002(\t\022+\n\010features\030\002" + - " \003(\0132\031.vector_tile.Tile.Feature\022\014\n\004keys\030" + - "\003 \003(\t\022\'\n\006values\030\004 \003(\0132\027.vector_tile.Tile" + - ".Value\022\024\n\006extent\030\005 \001(\r:\0044096*\010\010\020\020\200\200\200\200\002\"?" + - "\n\010GeomType\022\013\n\007UNKNOWN\020\000\022\t\n\005POINT\020\001\022\016\n\nLI" + - "NESTRING\020\002\022\013\n\007POLYGON\020\003*\005\010\020\020\200@B\002H\001" + "\n)core/src/main/resources/vector_tile.pr" + + "oto\022\013vector_tile\"\300\004\n\004Tile\022\'\n\006layers\030\003 \003(" + + "\0132\027.vector_tile.Tile.Layer\032\241\001\n\005Value\022\024\n\014" + + "string_value\030\001 \001(\t\022\023\n\013float_value\030\002 \001(\002\022" + + "\024\n\014double_value\030\003 \001(\001\022\021\n\tint_value\030\004 \001(\003" + + "\022\022\n\nuint_value\030\005 \001(\004\022\022\n\nsint_value\030\006 \001(\022" + + "\022\022\n\nbool_value\030\007 \001(\010*\010\010\010\020\200\200\200\200\002\032s\n\007Featur" + + "e\022\r\n\002id\030\001 \001(\004:\0010\022\020\n\004tags\030\002 \003(\rB\002\020\001\0221\n\004ty" + + "pe\030\003 \001(\0162\032.vector_tile.Tile.GeomType:\007UN" + + "KNOWN\022\024\n\010geometry\030\004 \003(\rB\002\020\001\032\255\001\n\005Layer\022\022\n" + + "\007version\030\017 \002(\r:\0011\022\014\n\004name\030\001 \002(\t\022+\n\010featu" + + "res\030\002 \003(\0132\031.vector_tile.Tile.Feature\022\014\n\004" + + "keys\030\003 \003(\t\022\'\n\006values\030\004 \003(\0132\027.vector_tile" + + ".Tile.Value\022\024\n\006extent\030\005 \001(\r:\0044096*\010\010\020\020\200\200" + + "\200\200\002\"?\n\010GeomType\022\013\n\007UNKNOWN\020\000\022\t\n\005POINT\020\001\022" + + "\016\n\nLINESTRING\020\002\022\013\n\007POLYGON\020\003*\005\010\020\020\200@B\002H\001" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { + new com.google.protobuf.Descriptors.FileDescriptor[]{ }); internal_static_vector_tile_Tile_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_vector_tile_Tile_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_vector_tile_Tile_descriptor, - new java.lang.String[] { "Layers", }); + internal_static_vector_tile_Tile_descriptor, + new java.lang.String[]{"Layers",}); internal_static_vector_tile_Tile_Value_descriptor = internal_static_vector_tile_Tile_descriptor.getNestedTypes().get(0); internal_static_vector_tile_Tile_Value_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_vector_tile_Tile_Value_descriptor, - new java.lang.String[] { "StringValue", "FloatValue", "DoubleValue", "IntValue", "UintValue", "SintValue", "BoolValue", }); + internal_static_vector_tile_Tile_Value_descriptor, + new java.lang.String[]{"StringValue", "FloatValue", "DoubleValue", "IntValue", "UintValue", "SintValue", + "BoolValue",}); internal_static_vector_tile_Tile_Feature_descriptor = internal_static_vector_tile_Tile_descriptor.getNestedTypes().get(1); internal_static_vector_tile_Tile_Feature_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_vector_tile_Tile_Feature_descriptor, - new java.lang.String[] { "Id", "Tags", "Type", "Geometry", }); + internal_static_vector_tile_Tile_Feature_descriptor, + new java.lang.String[]{"Id", "Tags", "Type", "Geometry",}); internal_static_vector_tile_Tile_Layer_descriptor = internal_static_vector_tile_Tile_descriptor.getNestedTypes().get(2); internal_static_vector_tile_Tile_Layer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_vector_tile_Tile_Layer_descriptor, - new java.lang.String[] { "Version", "Name", "Features", "Keys", "Values", "Extent", }); + internal_static_vector_tile_Tile_Layer_descriptor, + new java.lang.String[]{"Version", "Name", "Features", "Keys", "Values", "Extent",}); } // @@protoc_insertion_point(outer_class_scope) diff --git a/src/main/resources/log4j2.properties b/core/src/main/resources/log4j2.properties similarity index 100% rename from src/main/resources/log4j2.properties rename to core/src/main/resources/log4j2.properties diff --git a/src/main/resources/vector_tile.proto b/core/src/main/resources/vector_tile.proto similarity index 100% rename from src/main/resources/vector_tile.proto rename to core/src/main/resources/vector_tile.proto diff --git a/src/test/java/com/onthegomap/flatmap/FeatureCollectorTest.java b/core/src/test/java/com/onthegomap/flatmap/FeatureCollectorTest.java similarity index 90% rename from src/test/java/com/onthegomap/flatmap/FeatureCollectorTest.java rename to core/src/test/java/com/onthegomap/flatmap/FeatureCollectorTest.java index 58c1f406..b1b5441a 100644 --- a/src/test/java/com/onthegomap/flatmap/FeatureCollectorTest.java +++ b/core/src/test/java/com/onthegomap/flatmap/FeatureCollectorTest.java @@ -16,6 +16,7 @@ import java.util.stream.StreamSupport; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +import org.locationtech.jts.geom.Geometry; public class FeatureCollectorTest { @@ -30,9 +31,15 @@ public class FeatureCollectorTest { } } + private long id = 0; + + private ReaderFeature newReaderFeature(Geometry latLonGeometry, Map properties) { + return new ReaderFeature(latLonGeometry, properties, id++); + } + @Test public void testEmpty() { - var collector = factory.get(new ReaderFeature(newPoint(0, 0), Map.of( + var collector = factory.get(newReaderFeature(newPoint(0, 0), Map.of( "key", "val" ))); assertFeatures(14, List.of(), collector); @@ -40,7 +47,7 @@ public class FeatureCollectorTest { @Test public void testPoint() { - var collector = factory.get(new ReaderFeature(newPoint(0, 0), Map.of( + var collector = factory.get(newReaderFeature(newPoint(0, 0), Map.of( "key", "val" ))); collector.point("layername") @@ -74,7 +81,7 @@ public class FeatureCollectorTest { @Test public void testAttrWithMinzoom() { - var collector = factory.get(new ReaderFeature(newPoint(0, 0), Map.of( + var collector = factory.get(newReaderFeature(newPoint(0, 0), Map.of( "key", "val" ))); collector.point("layername") @@ -96,7 +103,7 @@ public class FeatureCollectorTest { @Test public void testLine() { - var collector = factory.get(new ReaderFeature(newLineString( + var collector = factory.get(newReaderFeature(newLineString( 0, 0, 1, 1 ), Map.of( @@ -123,7 +130,7 @@ public class FeatureCollectorTest { @Test public void testPolygon() { - var collector = factory.get(new ReaderFeature(newPolygon( + var collector = factory.get(newReaderFeature(newPolygon( 0, 0, 1, 0, 1, 1, @@ -159,7 +166,7 @@ public class FeatureCollectorTest { @Test public void testMinSizeAtMaxZoomDefaultsToTileResolution() { - var collector = factory.get(new ReaderFeature(rectangle(10, 20), Map.of())); + var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of())); var poly = collector.polygon("layername") .setMinPixelSize(1) .setMinPixelSizeBelowZoom(12, 10); @@ -170,7 +177,7 @@ public class FeatureCollectorTest { @Test public void testSetMinSizeAtMaxZoom() { - var collector = factory.get(new ReaderFeature(rectangle(10, 20), Map.of())); + var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of())); var poly = collector.polygon("layername") .setMinPixelSize(1) .setMinPixelSizeAtMaxZoom(0.5) @@ -182,7 +189,7 @@ public class FeatureCollectorTest { @Test public void testSetMinSizeAtAllZooms() { - var collector = factory.get(new ReaderFeature(rectangle(10, 20), Map.of())); + var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of())); var poly = collector.polygon("layername") .setMinPixelSizeAtAllZooms(2) .setMinPixelSizeBelowZoom(12, 10); @@ -193,7 +200,7 @@ public class FeatureCollectorTest { @Test public void testDefaultMinPixelSize() { - var collector = factory.get(new ReaderFeature(rectangle(10, 20), Map.of())); + var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of())); var poly = collector.polygon("layername"); assertEquals(1, poly.getMinPixelSize(12)); assertEquals(1, poly.getMinPixelSize(13)); @@ -202,7 +209,7 @@ public class FeatureCollectorTest { @Test public void testToleranceDefault() { - var collector = factory.get(new ReaderFeature(rectangle(10, 20), Map.of())); + var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of())); var poly = collector.polygon("layername"); assertEquals(0.1, poly.getPixelTolerance(12)); assertEquals(0.1, poly.getPixelTolerance(13)); @@ -211,7 +218,7 @@ public class FeatureCollectorTest { @Test public void testSetTolerance() { - var collector = factory.get(new ReaderFeature(rectangle(10, 20), Map.of())); + var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of())); var poly = collector.polygon("layername") .setPixelTolerance(1); assertEquals(1d, poly.getPixelTolerance(12)); @@ -221,7 +228,7 @@ public class FeatureCollectorTest { @Test public void testSetToleranceAtAllZooms() { - var collector = factory.get(new ReaderFeature(rectangle(10, 20), Map.of())); + var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of())); var poly = collector.polygon("layername") .setPixelToleranceAtAllZooms(1); assertEquals(1d, poly.getPixelTolerance(12)); @@ -231,7 +238,7 @@ public class FeatureCollectorTest { @Test public void testSetMaxZoom() { - var collector = factory.get(new ReaderFeature(rectangle(10, 20), Map.of())); + var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of())); var poly = collector.polygon("layername") .setPixelToleranceAtMaxZoom(2); assertEquals(0.1d, poly.getPixelTolerance(12)); @@ -241,7 +248,7 @@ public class FeatureCollectorTest { @Test public void testSetAllZoomMethods() { - var collector = factory.get(new ReaderFeature(rectangle(10, 20), Map.of())); + var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of())); var poly = collector.polygon("layername") .setPixelTolerance(1) .setPixelToleranceAtMaxZoom(2) @@ -256,7 +263,7 @@ public class FeatureCollectorTest { */ @Test public void testPointReaderFeatureCoercion() throws GeometryException { - var pointSourceFeature = new ReaderFeature(newPoint(0, 0), Map.of()); + var pointSourceFeature = newReaderFeature(newPoint(0, 0), Map.of()); assertEquals(0, pointSourceFeature.area()); assertEquals(0, pointSourceFeature.length()); @@ -285,7 +292,7 @@ public class FeatureCollectorTest { Arrays.fill(coords, 0d); double[] worldCoords = new double[nPoints * 2]; Arrays.fill(worldCoords, 0.5d); - var sourceLine = new ReaderFeature(newLineString(coords), Map.of()); + var sourceLine = newReaderFeature(newLineString(coords), Map.of()); assertEquals(0, sourceLine.length()); assertEquals(0, sourceLine.area()); @@ -324,7 +331,7 @@ public class FeatureCollectorTest { @Test public void testNonZeroLineStringReaderFeatureCoercion() throws GeometryException { - var sourceLine = new ReaderFeature(newLineString(worldToLatLon( + var sourceLine = newReaderFeature(newLineString(worldToLatLon( 0.2, 0.2, 0.75, 0.75, 0.25, 0.75, @@ -365,7 +372,7 @@ public class FeatureCollectorTest { @Test public void testPolygonReaderFeatureCoercion() throws GeometryException { - var sourceLine = new ReaderFeature(newPolygon(worldToLatLon( + var sourceLine = newReaderFeature(newPolygon(worldToLatLon( 0.25, 0.25, 0.75, 0.75, 0.25, 0.75, @@ -415,7 +422,7 @@ public class FeatureCollectorTest { @Test public void testPolygonWithHoleCoercion() throws GeometryException { - var sourceLine = new ReaderFeature(newPolygon(newCoordinateList(worldToLatLon( + var sourceLine = newReaderFeature(newPolygon(newCoordinateList(worldToLatLon( 0, 0, 1, 0, 1, 1, @@ -468,7 +475,7 @@ public class FeatureCollectorTest { @Test public void testPointOnSurface() { - var sourceLine = new ReaderFeature(newPolygon(worldToLatLon( + var sourceLine = newReaderFeature(newPolygon(worldToLatLon( 0, 0, 1, 0, 1, 0.25, @@ -498,7 +505,7 @@ public class FeatureCollectorTest { @Test public void testMultiPolygonCoercion() throws GeometryException { - var sourceLine = new ReaderFeature(newMultiPolygon( + var sourceLine = newReaderFeature(newMultiPolygon( newPolygon(worldToLatLon( 0, 0, 1, 0, @@ -552,7 +559,7 @@ public class FeatureCollectorTest { @Test public void testMultiLineStringCoercion() throws GeometryException { - var sourceLine = new ReaderFeature(newMultiLineString( + var sourceLine = newReaderFeature(newMultiLineString( newLineString(worldToLatLon( 0, 0, 1, 0, diff --git a/src/test/java/com/onthegomap/flatmap/FeatureMergeTest.java b/core/src/test/java/com/onthegomap/flatmap/FeatureMergeTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/FeatureMergeTest.java rename to core/src/test/java/com/onthegomap/flatmap/FeatureMergeTest.java diff --git a/src/test/java/com/onthegomap/flatmap/FlatMapTest.java b/core/src/test/java/com/onthegomap/flatmap/FlatMapTest.java similarity index 96% rename from src/test/java/com/onthegomap/flatmap/FlatMapTest.java rename to core/src/test/java/com/onthegomap/flatmap/FlatMapTest.java index c99ec4c3..e6ae3ece 100644 --- a/src/test/java/com/onthegomap/flatmap/FlatMapTest.java +++ b/core/src/test/java/com/onthegomap/flatmap/FlatMapTest.java @@ -176,6 +176,12 @@ public class FlatMapTest { ); } + private long id = 0; + + private ReaderFeature newReaderFeature(Geometry geometry, Map attrs) { + return new ReaderFeature(geometry, attrs, id++); + } + @Test public void testMetadataButNoPoints() throws Exception { var results = runWithReaderFeatures( @@ -218,7 +224,7 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(newPoint(lng, lat), Map.of( + newReaderFeature(newPoint(lng, lat), Map.of( "attr", "value" )) ), @@ -270,7 +276,7 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(newMultiPoint( + newReaderFeature(newMultiPoint( newPoint(lng1, lat1), newPoint(lng2, lat2) ), Map.of( @@ -320,9 +326,9 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(newPoint(lng1, lat), Map.of("rank", "1")), - new ReaderFeature(newPoint(lng2, lat), Map.of("rank", "2")), - new ReaderFeature(newPoint(lng3, lat), Map.of("rank", "3")) + newReaderFeature(newPoint(lng1, lat), Map.of("rank", "1")), + newReaderFeature(newPoint(lng2, lat), Map.of("rank", "2")), + newReaderFeature(newPoint(lng3, lat), Map.of("rank", "3")) ), (in, features) -> { features.point("layer") @@ -361,7 +367,7 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(newLineString(lng1, lat1, lng2, lat2), Map.of( + newReaderFeature(newLineString(lng1, lat1, lng2, lat2), Map.of( "attr", "value" )) ), @@ -399,7 +405,7 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(newMultiLineString( + newReaderFeature(newMultiLineString( newLineString(lng1, lat1, lng2, lat2), newLineString(lng2, lat2, lng1, lat1) ), Map.of( @@ -468,7 +474,7 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(newPolygon( + newReaderFeature(newPolygon( outerPoints, List.of(innerPoints) ), Map.of()) @@ -572,7 +578,7 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(newPolygon( + newReaderFeature(newPolygon( outerPoints, List.of() ), Map.of()) @@ -607,7 +613,7 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(geometry, Map.of()) + newReaderFeature(geometry, Map.of()) ), (in, features) -> { features.polygon("layer") @@ -629,7 +635,7 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(newMultiPolygon( + newReaderFeature(newMultiPolygon( newPolygon(outerPoints2, List.of(innerPoints2)), newPolygon(outerPoints1, List.of(innerPoints1)) ), Map.of()) @@ -895,9 +901,9 @@ public class FlatMapTest { var results = runWithReaderFeatures( Map.of("threads", "1"), List.of( - new ReaderFeature(newPoint(lng1, lat), Map.of("rank", "1")), - new ReaderFeature(newPoint(lng2, lat), Map.of("rank", "2")), - new ReaderFeature(newPoint(lng3, lat), Map.of("rank", "3")) + newReaderFeature(newPoint(lng1, lat), Map.of("rank", "1")), + newReaderFeature(newPoint(lng2, lat), Map.of("rank", "2")), + newReaderFeature(newPoint(lng3, lat), Map.of("rank", "3")) ), (in, features) -> { features.point("layer") @@ -953,16 +959,16 @@ public class FlatMapTest { Map.of("threads", "1"), List.of( // merge at z13 (same "group"): - new ReaderFeature(newLineString( + newReaderFeature(newLineString( lng1, lat, lng2, lat ), Map.of("group", "1", "other", "1")), - new ReaderFeature(newLineString( + newReaderFeature(newLineString( lng2, lat, lng3, lat ), Map.of("group", "1", "other", "2")), // don't merge at z13: - new ReaderFeature(newLineString( + newReaderFeature(newLineString( lng3, lat, lng4, lat ), Map.of("group", "2", "other", "3")) @@ -996,14 +1002,14 @@ public class FlatMapTest { Map.of("threads", "1"), List.of( // merge same group: - new ReaderFeature(newPolygon(z14CoordinatePixelList( + newReaderFeature(newPolygon(z14CoordinatePixelList( 10, 10, 20, 10, 20, 20, 10, 20, 10, 10 )), Map.of("group", "1")), - new ReaderFeature(newPolygon(z14CoordinatePixelList( + newReaderFeature(newPolygon(z14CoordinatePixelList( 20.5, 10, 30, 10, 30, 20, @@ -1011,7 +1017,7 @@ public class FlatMapTest { 20.5, 10 )), Map.of("group", "1")), // don't merge - different group: - new ReaderFeature(newPolygon(z14CoordinatePixelList( + newReaderFeature(newPolygon(z14CoordinatePixelList( 10, 20.5, 20, 20.5, 20, 30, diff --git a/src/test/java/com/onthegomap/flatmap/FormatTest.java b/core/src/test/java/com/onthegomap/flatmap/FormatTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/FormatTest.java rename to core/src/test/java/com/onthegomap/flatmap/FormatTest.java diff --git a/src/test/java/com/onthegomap/flatmap/LayerStatsTest.java b/core/src/test/java/com/onthegomap/flatmap/LayerStatsTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/LayerStatsTest.java rename to core/src/test/java/com/onthegomap/flatmap/LayerStatsTest.java diff --git a/src/test/java/com/onthegomap/flatmap/TestUtils.java b/core/src/test/java/com/onthegomap/flatmap/TestUtils.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/TestUtils.java rename to core/src/test/java/com/onthegomap/flatmap/TestUtils.java diff --git a/src/test/java/com/onthegomap/flatmap/TileExtentsTest.java b/core/src/test/java/com/onthegomap/flatmap/TileExtentsTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/TileExtentsTest.java rename to core/src/test/java/com/onthegomap/flatmap/TileExtentsTest.java diff --git a/src/test/java/com/onthegomap/flatmap/VectorTileEncoderTest.java b/core/src/test/java/com/onthegomap/flatmap/VectorTileEncoderTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/VectorTileEncoderTest.java rename to core/src/test/java/com/onthegomap/flatmap/VectorTileEncoderTest.java diff --git a/src/test/java/com/onthegomap/flatmap/WikidataTest.java b/core/src/test/java/com/onthegomap/flatmap/WikidataTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/WikidataTest.java rename to core/src/test/java/com/onthegomap/flatmap/WikidataTest.java diff --git a/src/test/java/com/onthegomap/flatmap/ZoomFunctionTest.java b/core/src/test/java/com/onthegomap/flatmap/ZoomFunctionTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/ZoomFunctionTest.java rename to core/src/test/java/com/onthegomap/flatmap/ZoomFunctionTest.java diff --git a/src/test/java/com/onthegomap/flatmap/collections/CacheByZoomTest.java b/core/src/test/java/com/onthegomap/flatmap/collections/CacheByZoomTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/collections/CacheByZoomTest.java rename to core/src/test/java/com/onthegomap/flatmap/collections/CacheByZoomTest.java diff --git a/src/test/java/com/onthegomap/flatmap/collections/CommonStringEncoderTest.java b/core/src/test/java/com/onthegomap/flatmap/collections/CommonStringEncoderTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/collections/CommonStringEncoderTest.java rename to core/src/test/java/com/onthegomap/flatmap/collections/CommonStringEncoderTest.java diff --git a/src/test/java/com/onthegomap/flatmap/collections/FeatureGroupTest.java b/core/src/test/java/com/onthegomap/flatmap/collections/FeatureGroupTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/collections/FeatureGroupTest.java rename to core/src/test/java/com/onthegomap/flatmap/collections/FeatureGroupTest.java diff --git a/src/test/java/com/onthegomap/flatmap/collections/FeatureSortTest.java b/core/src/test/java/com/onthegomap/flatmap/collections/FeatureSortTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/collections/FeatureSortTest.java rename to core/src/test/java/com/onthegomap/flatmap/collections/FeatureSortTest.java diff --git a/src/test/java/com/onthegomap/flatmap/collections/IntRangeTest.java b/core/src/test/java/com/onthegomap/flatmap/collections/IntRangeTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/collections/IntRangeTest.java rename to core/src/test/java/com/onthegomap/flatmap/collections/IntRangeTest.java diff --git a/src/test/java/com/onthegomap/flatmap/collections/LongLongMapTest.java b/core/src/test/java/com/onthegomap/flatmap/collections/LongLongMapTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/collections/LongLongMapTest.java rename to core/src/test/java/com/onthegomap/flatmap/collections/LongLongMapTest.java diff --git a/src/test/java/com/onthegomap/flatmap/collections/LongLongMultimapTest.java b/core/src/test/java/com/onthegomap/flatmap/collections/LongLongMultimapTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/collections/LongLongMultimapTest.java rename to core/src/test/java/com/onthegomap/flatmap/collections/LongLongMultimapTest.java diff --git a/src/test/java/com/onthegomap/flatmap/collections/MutableCoordinateSequenceTest.java b/core/src/test/java/com/onthegomap/flatmap/collections/MutableCoordinateSequenceTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/collections/MutableCoordinateSequenceTest.java rename to core/src/test/java/com/onthegomap/flatmap/collections/MutableCoordinateSequenceTest.java diff --git a/src/test/java/com/onthegomap/flatmap/geo/GeoUtilsTest.java b/core/src/test/java/com/onthegomap/flatmap/geo/GeoUtilsTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/geo/GeoUtilsTest.java rename to core/src/test/java/com/onthegomap/flatmap/geo/GeoUtilsTest.java diff --git a/src/test/java/com/onthegomap/flatmap/geo/TileCoordTest.java b/core/src/test/java/com/onthegomap/flatmap/geo/TileCoordTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/geo/TileCoordTest.java rename to core/src/test/java/com/onthegomap/flatmap/geo/TileCoordTest.java diff --git a/src/test/java/com/onthegomap/flatmap/monitoring/CounterTest.java b/core/src/test/java/com/onthegomap/flatmap/monitoring/CounterTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/monitoring/CounterTest.java rename to core/src/test/java/com/onthegomap/flatmap/monitoring/CounterTest.java diff --git a/src/test/java/com/onthegomap/flatmap/monitoring/ProcessInfoTest.java b/core/src/test/java/com/onthegomap/flatmap/monitoring/ProcessInfoTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/monitoring/ProcessInfoTest.java rename to core/src/test/java/com/onthegomap/flatmap/monitoring/ProcessInfoTest.java diff --git a/src/test/java/com/onthegomap/flatmap/monitoring/ProgressLoggersTest.java b/core/src/test/java/com/onthegomap/flatmap/monitoring/ProgressLoggersTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/monitoring/ProgressLoggersTest.java rename to core/src/test/java/com/onthegomap/flatmap/monitoring/ProgressLoggersTest.java diff --git a/src/test/java/com/onthegomap/flatmap/monitoring/PrometheusStatsTest.java b/core/src/test/java/com/onthegomap/flatmap/monitoring/PrometheusStatsTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/monitoring/PrometheusStatsTest.java rename to core/src/test/java/com/onthegomap/flatmap/monitoring/PrometheusStatsTest.java diff --git a/src/test/java/com/onthegomap/flatmap/monitoring/TimerTest.java b/core/src/test/java/com/onthegomap/flatmap/monitoring/TimerTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/monitoring/TimerTest.java rename to core/src/test/java/com/onthegomap/flatmap/monitoring/TimerTest.java diff --git a/src/test/java/com/onthegomap/flatmap/monitoring/TimersTest.java b/core/src/test/java/com/onthegomap/flatmap/monitoring/TimersTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/monitoring/TimersTest.java rename to core/src/test/java/com/onthegomap/flatmap/monitoring/TimersTest.java diff --git a/src/test/java/com/onthegomap/flatmap/read/NaturalEarthReaderTest.java b/core/src/test/java/com/onthegomap/flatmap/read/NaturalEarthReaderTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/read/NaturalEarthReaderTest.java rename to core/src/test/java/com/onthegomap/flatmap/read/NaturalEarthReaderTest.java diff --git a/src/test/java/com/onthegomap/flatmap/read/OpenStreetMapReaderTest.java b/core/src/test/java/com/onthegomap/flatmap/read/OpenStreetMapReaderTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/read/OpenStreetMapReaderTest.java rename to core/src/test/java/com/onthegomap/flatmap/read/OpenStreetMapReaderTest.java diff --git a/src/test/java/com/onthegomap/flatmap/read/OsmInputFileTest.java b/core/src/test/java/com/onthegomap/flatmap/read/OsmInputFileTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/read/OsmInputFileTest.java rename to core/src/test/java/com/onthegomap/flatmap/read/OsmInputFileTest.java diff --git a/src/test/java/com/onthegomap/flatmap/read/OsmMultipolygonTest.java b/core/src/test/java/com/onthegomap/flatmap/read/OsmMultipolygonTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/read/OsmMultipolygonTest.java rename to core/src/test/java/com/onthegomap/flatmap/read/OsmMultipolygonTest.java diff --git a/src/test/java/com/onthegomap/flatmap/read/ReaderFeatureTest.java b/core/src/test/java/com/onthegomap/flatmap/read/ReaderFeatureTest.java similarity index 97% rename from src/test/java/com/onthegomap/flatmap/read/ReaderFeatureTest.java rename to core/src/test/java/com/onthegomap/flatmap/read/ReaderFeatureTest.java index acc6d8c0..ae6f08cf 100644 --- a/src/test/java/com/onthegomap/flatmap/read/ReaderFeatureTest.java +++ b/core/src/test/java/com/onthegomap/flatmap/read/ReaderFeatureTest.java @@ -21,7 +21,7 @@ public class ReaderFeatureTest { MultiPolygon multiPolygon = (MultiPolygon) new ReaderFeature(newMultiPolygon( newPolygon(outerPoints2, List.of(innerPoints2)), newPolygon(outerPoints1, List.of(innerPoints1)) - ), Map.of()).worldGeometry(); + ), Map.of(), 1).worldGeometry(); assertEquals(2, multiPolygon.getNumGeometries()); assertSameNormalizedFeature(round(newPolygon( diff --git a/src/test/java/com/onthegomap/flatmap/read/ShapefileReaderTest.java b/core/src/test/java/com/onthegomap/flatmap/read/ShapefileReaderTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/read/ShapefileReaderTest.java rename to core/src/test/java/com/onthegomap/flatmap/read/ShapefileReaderTest.java diff --git a/src/test/java/com/onthegomap/flatmap/render/FeatureRendererTest.java b/core/src/test/java/com/onthegomap/flatmap/render/FeatureRendererTest.java similarity index 99% rename from src/test/java/com/onthegomap/flatmap/render/FeatureRendererTest.java rename to core/src/test/java/com/onthegomap/flatmap/render/FeatureRendererTest.java index dc2fbaf6..f7232376 100644 --- a/src/test/java/com/onthegomap/flatmap/render/FeatureRendererTest.java +++ b/core/src/test/java/com/onthegomap/flatmap/render/FeatureRendererTest.java @@ -44,7 +44,7 @@ public class FeatureRendererTest { private FeatureCollector collector(Geometry worldGeom) { var latLonGeom = GeoUtils.worldToLatLonCoords(worldGeom); - return new FeatureCollector.Factory(config, stats).get(new ReaderFeature(latLonGeom, 0, null, null)); + return new FeatureCollector.Factory(config, stats).get(new ReaderFeature(latLonGeom, 0, null, null, 1)); } private Map> renderGeometry(FeatureCollector.Feature feature) { diff --git a/src/test/java/com/onthegomap/flatmap/worker/TopologyTest.java b/core/src/test/java/com/onthegomap/flatmap/worker/TopologyTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/worker/TopologyTest.java rename to core/src/test/java/com/onthegomap/flatmap/worker/TopologyTest.java diff --git a/src/test/java/com/onthegomap/flatmap/worker/WorkQueueTest.java b/core/src/test/java/com/onthegomap/flatmap/worker/WorkQueueTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/worker/WorkQueueTest.java rename to core/src/test/java/com/onthegomap/flatmap/worker/WorkQueueTest.java diff --git a/src/test/java/com/onthegomap/flatmap/write/MbtilesTest.java b/core/src/test/java/com/onthegomap/flatmap/write/MbtilesTest.java similarity index 100% rename from src/test/java/com/onthegomap/flatmap/write/MbtilesTest.java rename to core/src/test/java/com/onthegomap/flatmap/write/MbtilesTest.java diff --git a/src/test/resources/bostonbuildings.mbtiles b/core/src/test/resources/bostonbuildings.mbtiles similarity index 100% rename from src/test/resources/bostonbuildings.mbtiles rename to core/src/test/resources/bostonbuildings.mbtiles diff --git a/src/test/resources/chesapeake.wkb b/core/src/test/resources/chesapeake.wkb similarity index 100% rename from src/test/resources/chesapeake.wkb rename to core/src/test/resources/chesapeake.wkb diff --git a/src/test/resources/log4j2.properties b/core/src/test/resources/log4j2.properties similarity index 100% rename from src/test/resources/log4j2.properties rename to core/src/test/resources/log4j2.properties diff --git a/src/test/resources/mdshore.wkb b/core/src/test/resources/mdshore.wkb similarity index 100% rename from src/test/resources/mdshore.wkb rename to core/src/test/resources/mdshore.wkb diff --git a/src/test/resources/monaco-latest.osm.pbf b/core/src/test/resources/monaco-latest.osm.pbf similarity index 100% rename from src/test/resources/monaco-latest.osm.pbf rename to core/src/test/resources/monaco-latest.osm.pbf diff --git a/src/test/resources/natural_earth_vector.sqlite b/core/src/test/resources/natural_earth_vector.sqlite similarity index 100% rename from src/test/resources/natural_earth_vector.sqlite rename to core/src/test/resources/natural_earth_vector.sqlite diff --git a/src/test/resources/natural_earth_vector.sqlite.zip b/core/src/test/resources/natural_earth_vector.sqlite.zip similarity index 100% rename from src/test/resources/natural_earth_vector.sqlite.zip rename to core/src/test/resources/natural_earth_vector.sqlite.zip diff --git a/src/test/resources/njshore.wkb b/core/src/test/resources/njshore.wkb similarity index 100% rename from src/test/resources/njshore.wkb rename to core/src/test/resources/njshore.wkb diff --git a/src/test/resources/shapefile.zip b/core/src/test/resources/shapefile.zip similarity index 100% rename from src/test/resources/shapefile.zip rename to core/src/test/resources/shapefile.zip diff --git a/examples/pom.xml b/examples/pom.xml new file mode 100644 index 00000000..3cf80887 --- /dev/null +++ b/examples/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + + flatmap-examples + + + com.onthegomap + flatmap-parent + 0.1-SNAPSHOT + + + + + com.onthegomap + flatmap-core + ${project.parent.version} + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + + jar-with-dependencies + + + + + + make-assembly + package + + single + + + + + + + + + src/test/resources + true + + + + diff --git a/examples/src/main/java/com/onthegomap/flatmap/examples/BikeRouteOverlay.java b/examples/src/main/java/com/onthegomap/flatmap/examples/BikeRouteOverlay.java new file mode 100644 index 00000000..28893a44 --- /dev/null +++ b/examples/src/main/java/com/onthegomap/flatmap/examples/BikeRouteOverlay.java @@ -0,0 +1,135 @@ +package com.onthegomap.flatmap.examples; + +import com.graphhopper.reader.ReaderRelation; +import com.onthegomap.flatmap.Arguments; +import com.onthegomap.flatmap.CommonParams; +import com.onthegomap.flatmap.FeatureCollector; +import com.onthegomap.flatmap.FeatureMerge; +import com.onthegomap.flatmap.FileUtils; +import com.onthegomap.flatmap.Profile; +import com.onthegomap.flatmap.SourceFeature; +import com.onthegomap.flatmap.VectorTileEncoder; +import com.onthegomap.flatmap.collections.FeatureGroup; +import com.onthegomap.flatmap.collections.FeatureSort; +import com.onthegomap.flatmap.collections.LongLongMap; +import com.onthegomap.flatmap.geo.GeometryException; +import com.onthegomap.flatmap.profiles.OpenMapTilesProfile; +import com.onthegomap.flatmap.read.OpenStreetMapReader; +import com.onthegomap.flatmap.read.OsmInputFile; +import com.onthegomap.flatmap.write.MbtilesWriter; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class BikeRouteOverlay implements Profile { + + private static final Logger LOGGER = LoggerFactory.getLogger(BikeRouteOverlay.class); + + private static record RouteRelationInfo(String name, String ref, String route, String network) implements + OpenStreetMapReader.RelationInfo {} + + @Override + public List preprocessOsmRelation(ReaderRelation relation) { + if (relation.hasTag("type", "route")) { + String type = relation.getTag("route"); + if ("mtb".equals(type) || "bicycle".equals(type)) { + return List.of(new RouteRelationInfo( + relation.getTag("name"), + relation.getTag("ref"), + type, + relation.getTag("network", "") + )); + } + } + return null; + } + + @Override + public void processFeature(SourceFeature sourceFeature, FeatureCollector features) { + if (sourceFeature.canBeLine()) { + for (RouteRelationInfo routeInfo : sourceFeature.relationInfo(RouteRelationInfo.class)) { + int minzoom = switch (routeInfo.network) { + case "icn", "ncn" -> 0; + case "rcn" -> 10; + default -> 12; + }; + features.line("bikeroutes-" + routeInfo.route + "-" + routeInfo.network) + .setAttr("name", routeInfo.name) + .setAttr("ref", routeInfo.ref) + .setZoomRange(minzoom, 14) + .setMinPixelSize(0); + } + } + } + + @Override + public List postProcessLayerFeatures(String layer, int zoom, + List items) throws GeometryException { + return FeatureMerge.mergeLineStrings(items, 0.1, 0.1, 4); + } + + @Override + public String name() { + return "Bike Paths Overlay"; + } + + @Override + public String description() { + return "An example overlay showing bicycle routes"; + } + + @Override + public boolean isOverlay() { + return true; + } + + @Override + public String attribution() { + return """ + © OpenStreetMap contributors + """.trim(); + } + + public static void main(String[] args) throws Exception { + Arguments arguments = Arguments.fromJvmProperties(); + var stats = arguments.getStats(); + var overallTimer = stats.startTimer("overall"); + Path sourcesDir = Path.of("data", "sources"); + OsmInputFile osmInputFile = new OsmInputFile( + arguments.inputFile("input", "OSM input file", sourcesDir.resolve("north-america_us_massachusetts.pbf"))); + Path tmpDir = arguments.file("tmpdir", "temp directory", Path.of("data", "tmp")); + Path mbtilesOutputPath = arguments.file("output", "mbtiles output file", Path.of("data", "bikeroutes.mbtiles")); + CommonParams config = CommonParams.from(arguments, osmInputFile); + + FileUtils.deleteFile(mbtilesOutputPath); + + LOGGER.info("Building Bike path overlay example into " + mbtilesOutputPath); + + var profile = new BikeRouteOverlay(); + + Files.createDirectories(tmpDir); + Path nodeDbPath = tmpDir.resolve("node.db"); + LongLongMap nodeLocations = LongLongMap.newFileBackedSortedTable(nodeDbPath); + Path featureDbPath = tmpDir.resolve("feature.db"); + FeatureSort featureDb = FeatureSort.newExternalMergeSort(featureDbPath, config.threads(), stats); + FeatureGroup featureMap = new FeatureGroup(featureDb, profile, stats); + + try (var osmReader = new OpenStreetMapReader(OpenMapTilesProfile.OSM_SOURCE, osmInputFile, nodeLocations, profile, + stats)) { + stats.time("osm_pass1", () -> osmReader.pass1(config)); + stats.time("osm_pass2", () -> osmReader.pass2(featureMap, config)); + } + + stats.time("sort", featureDb::sort); + stats.time("mbtiles", () -> MbtilesWriter.writeOutput(featureMap, mbtilesOutputPath, profile, config, stats)); + + overallTimer.stop(); + + LOGGER.info("FINISHED!"); + + stats.printSummary(); + stats.close(); + } +} diff --git a/examples/src/main/java/com/onthegomap/flatmap/examples/ToiletsOverlay.java b/examples/src/main/java/com/onthegomap/flatmap/examples/ToiletsOverlay.java new file mode 100644 index 00000000..a62529ee --- /dev/null +++ b/examples/src/main/java/com/onthegomap/flatmap/examples/ToiletsOverlay.java @@ -0,0 +1,96 @@ +package com.onthegomap.flatmap.examples; + +import com.onthegomap.flatmap.Arguments; +import com.onthegomap.flatmap.CommonParams; +import com.onthegomap.flatmap.FeatureCollector; +import com.onthegomap.flatmap.FileUtils; +import com.onthegomap.flatmap.Profile; +import com.onthegomap.flatmap.SourceFeature; +import com.onthegomap.flatmap.collections.FeatureGroup; +import com.onthegomap.flatmap.collections.FeatureSort; +import com.onthegomap.flatmap.collections.LongLongMap; +import com.onthegomap.flatmap.profiles.OpenMapTilesProfile; +import com.onthegomap.flatmap.read.OpenStreetMapReader; +import com.onthegomap.flatmap.read.OsmInputFile; +import com.onthegomap.flatmap.write.MbtilesWriter; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.concurrent.atomic.AtomicInteger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ToiletsOverlay implements Profile { + + private static final Logger LOGGER = LoggerFactory.getLogger(ToiletsOverlay.class); + + AtomicInteger toiletNumber = new AtomicInteger(0); + + @Override + public void processFeature(SourceFeature sourceFeature, FeatureCollector features) { + if (sourceFeature.hasTag("amenity", "toilets")) { + features.centroid("toilets") + .setZoomRange(0, 14) + .setZorder(toiletNumber.incrementAndGet()) + .setLabelGridSizeAndLimit(12, 32, 4); + } + } + + @Override + public String name() { + return "Toilets Overlay"; + } + + @Override + public String description() { + return "An example overlay showing toilets"; + } + + @Override + public boolean isOverlay() { + return true; + } + + @Override + public String attribution() { + return """ + © OpenStreetMap contributors + """.trim(); + } + + public static void main(String[] args) throws Exception { + Arguments arguments = Arguments.fromJvmProperties(); + var stats = arguments.getStats(); + var overallTimer = stats.startTimer("overall"); + Path sourcesDir = Path.of("data", "sources"); + OsmInputFile osmInputFile = new OsmInputFile( + arguments.inputFile("input", "OSM input file", sourcesDir.resolve("north-america_us_massachusetts.pbf"))); + Path tmpDir = arguments.file("tmpdir", "temp directory", Path.of("data", "tmp")); + Path mbtilesOutputPath = arguments.file("output", "mbtiles output file", Path.of("data", "toilets.mbtiles")); + CommonParams config = CommonParams.from(arguments, osmInputFile); + + FileUtils.deleteFile(mbtilesOutputPath); + + var profile = new ToiletsOverlay(); + + Files.createDirectories(tmpDir); + LongLongMap nodeLocations = LongLongMap.newFileBackedSortedTable(tmpDir.resolve("node.db")); + FeatureSort featureDb = FeatureSort.newExternalMergeSort(tmpDir.resolve("feature.db"), config.threads(), stats); + FeatureGroup featureMap = new FeatureGroup(featureDb, profile, stats); + + try (var osmReader = new OpenStreetMapReader(OpenMapTilesProfile.OSM_SOURCE, osmInputFile, nodeLocations, profile, + stats)) { + stats.time("osm_pass1", () -> osmReader.pass1(config)); + stats.time("osm_pass2", () -> osmReader.pass2(featureMap, config)); + } + + stats.time("sort", featureDb::sort); + stats.time("mbtiles", () -> MbtilesWriter.writeOutput(featureMap, mbtilesOutputPath, profile, config, stats)); + + overallTimer.stop(); + + LOGGER.info("FINISHED!"); + + stats.printSummary(); + stats.close(); + } +} diff --git a/openmaptiles/pom.xml b/openmaptiles/pom.xml new file mode 100644 index 00000000..9986c865 --- /dev/null +++ b/openmaptiles/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + + flatmap-openmaptiles + + + com.onthegomap + flatmap-parent + 0.1-SNAPSHOT + + + + + com.onthegomap + flatmap-core + ${project.parent.version} + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + + jar-with-dependencies + + + + + + make-assembly + package + + single + + + + + + + + + src/test/resources + true + + + + diff --git a/pom.xml b/pom.xml index d2b08ef1..e5f3e956 100644 --- a/pom.xml +++ b/pom.xml @@ -5,20 +5,15 @@ 4.0.0 com.onthegomap - flatmap + flatmap-parent 0.1-SNAPSHOT https://github.com/onthegomap/flatmap + pom UTF-8 16 16 - 2.3 - 25.0 - 5.7.1 - 2.12.3 - 2.14.1 - 0.11.0 @@ -41,123 +36,11 @@ - - - com.graphhopper - graphhopper-reader-osm - ${graphhopper.version} - - - org.locationtech.jts - jts-core - 1.18.0 - - - org.geotools - gt-shapefile - ${geotools.version} - - - org.geotools - gt-epsg-hsql - ${geotools.version} - - - org.xerial - sqlite-jdbc - 3.34.0 - - - org.mapdb - mapdb - 3.0.8 - - - org.msgpack - msgpack-core - 0.8.22 - - - org.slf4j - slf4j-api - 1.7.30 - - - org.apache.logging.log4j - log4j-slf4j-impl - ${log4j.version} - - - org.apache.logging.log4j - log4j-api - ${log4j.version} - - - org.apache.logging.log4j - log4j-core - ${log4j.version} - - - com.fasterxml.jackson.core - jackson-core - ${jackson.version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - - - com.fasterxml.jackson.datatype - jackson-datatype-jdk8 - ${jackson.version} - - - io.prometheus - simpleclient - ${prometheus.version} - - - io.prometheus - simpleclient_common - ${prometheus.version} - - - io.prometheus - simpleclient_pushgateway - ${prometheus.version} - - - io.prometheus - simpleclient_hotspot - ${prometheus.version} - - - - org.junit.jupiter - junit-jupiter-api - ${junit.version} - test - - - org.junit.jupiter - junit-jupiter-params - ${junit.version} - test - - - org.junit.jupiter - junit-jupiter-engine - ${junit.version} - test - - - org.mockito - mockito-core - 3.9.0 - test - - + + core + examples + openmaptiles + @@ -193,28 +76,6 @@ maven-failsafe-plugin 2.22.2 - - org.apache.maven.plugins - maven-assembly-plugin - 3.3.0 - - - - jar-with-dependencies - - - - - - make-assembly - package - - single - - - - - diff --git a/scripts/generate-protobuf.sh b/scripts/generate-protobuf.sh index 6c6aa6d5..97f3e6fd 100755 --- a/scripts/generate-protobuf.sh +++ b/scripts/generate-protobuf.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -ex -protoc --java_out=src/main/java/ src/main/resources/vector_tile.proto +protoc --java_out=core/src/main/java/ core/src/main/resources/vector_tile.proto