Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed Oct 27, 2023
1 parent 507ea4e commit 6f0ac9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ public VectorTileProto.Tile toProto() {
case Float floatValue -> tileValue.setFloatValue(floatValue);
case Double doubleValue -> tileValue.setDoubleValue(doubleValue);
case Boolean booleanValue -> tileValue.setBoolValue(booleanValue);
case Object ignored -> tileValue.setStringValue(value.toString());
case Object other -> tileValue.setStringValue(other.toString());
}
tileLayer.addValues(tileValue.build());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,17 @@ private byte[] encodeValue(VectorTile.Feature vectorTileFeature, RenderedFeature
var attrs = vectorTileFeature.attrs();
packer.packMapHeader((int) attrs.values().stream().filter(Objects::nonNull).count());
for (Map.Entry<String, Object> entry : attrs.entrySet()) {
if (entry.getValue() != null) {
Object value = entry.getValue();
if (value != null) {
packer.packInt(commonValueStrings.encode(entry.getKey()));
Object value = entry.getValue();
packer.packValue(switch (value) {
case String string -> ValueFactory.newString(string);
case Integer integer -> ValueFactory.newInteger(integer.longValue());
case Long longValue -> ValueFactory.newInteger(longValue);
case Float floatValue -> ValueFactory.newFloat(floatValue);
case Double doubleValue -> ValueFactory.newFloat(doubleValue);
case Boolean booleanValue -> ValueFactory.newBoolean(booleanValue);
default -> ValueFactory.newString(value.toString());
case Object other -> ValueFactory.newString(other.toString());
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* archive, or run the following an existing archive:
*
* <pre>
* {@snippet lang="bash" :
* {@code
* java -jar planetiler.jar stats --input=<path to pmtiles or mbtiles> --output=layerstats.tsv.gz
* }
* </pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* A mini-framework for chaining sequential steps that run in dedicated threads with a queue between each.
* <p>
* For example:
*
* {@snippet :
* WorkerPipeline.start("name", stats)
* .readFrom("reader", List.of(1, 2, 3))
Expand Down

0 comments on commit 6f0ac9f

Please sign in to comment.