Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ generate vector tile features according to the [profile](#profiles) in a worker
- Uses an [IntRangeSet](planetiler-core/src/main/java/com/onthegomap/planetiler/collection/IntRangeSet.java) to
optimize processing for large filled areas (like oceans)
- If any features wrapped past -180 or 180 degrees longitude, repeat with a 360 or -360 degree offset
- Reassemble each vector tile geometry and round to tile precision (4096x4096)
- Reassemble each vector tile geometry and round to tile precision (default 4096x4096)
- For
polygons, [GeoUtils#snapAndFixPolygon](planetiler-core/src/main/java/com/onthegomap/planetiler/geo/GeoUtils.java)
uses [JTS](https://github.com/locationtech/jts) utilities to fix any topology errors (i.e. self-intersections)
Expand Down
4 changes: 4 additions & 0 deletions config-example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

# minzoom=0
# maxzoom=14
# tile_extent=4096
# Prevent MapLibre fill rendering failures by simplifying final encoded polygon components that are too detailed:
# max_renderer_polygon_vertices=60000
# max_renderer_polygon_simplification_tolerance=256

# Planetiler uses all available cores by default, but to override use:
# threads=4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class FeatureMerge {
private static final BufferParameters bufferOps = new BufferParameters();
// this is slightly faster than Comparator.comparingInt
private static final Comparator<WithIndex<?>> BY_HILBERT_INDEX =
(o1, o2) -> Integer.compare(o1.hilbert, o2.hilbert);
(o1, o2) -> Integer.compareUnsigned(o1.hilbert, o2.hilbert);

static {
bufferOps.setJoinStyle(BufferParameters.JOIN_MITRE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.onthegomap.planetiler.collection.LongLongMultimap;
import com.onthegomap.planetiler.config.Arguments;
import com.onthegomap.planetiler.config.PlanetilerConfig;
import com.onthegomap.planetiler.geo.GeoUtils;
import com.onthegomap.planetiler.reader.GeoPackageReader;
import com.onthegomap.planetiler.reader.NaturalEarthReader;
import com.onthegomap.planetiler.reader.ShapefileReader;
Expand Down Expand Up @@ -132,6 +133,8 @@ private Planetiler(Arguments arguments) {
stats = arguments.getStats();
overallTimer = stats.startStageQuietly("overall");
config = PlanetilerConfig.from(arguments);
VectorTile.setExtent(config.tileExtent());
GeoUtils.setTileExtent(config.tileExtent());
if (config.color() != null) {
AnsiColors.setUseColors(config.color());
}
Expand Down
431 changes: 410 additions & 21 deletions planetiler-core/src/main/java/com/onthegomap/planetiler/VectorTile.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ private void tileEncoderSink(Iterable<TileBatch> prev) throws IOException {
yield mlt;
}
case UNKNOWN, MVT -> {
tile.enforceRendererPolygonLimit(tileFeatures.tileCoord(), config.maxRendererPolygonVertices(),
config.maxRendererPolygonSimplificationTolerance());
var proto = tile.toProto(includeIds);
layerStats = TileSizeStats.computeTileStats(proto);
yield proto.toByteArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.onthegomap.planetiler.Profile;
import com.onthegomap.planetiler.VectorTile;
import com.onthegomap.planetiler.config.PlanetilerConfig;
import com.onthegomap.planetiler.geo.GeoUtils;
import com.onthegomap.planetiler.geo.GeometryException;
import com.onthegomap.planetiler.geo.GeometryType;
import com.onthegomap.planetiler.geo.TileCoord;
Expand Down Expand Up @@ -76,6 +77,8 @@ public final class FeatureGroup implements Iterable<FeatureGroup.TileFeatures>,
this.profile = profile;
this.config = config;
this.stats = stats;
VectorTile.setExtent(config.tileExtent());
GeoUtils.setTileExtent(config.tileExtent());
if (config.logJtsExceptions() && CURRENT_TILE == null) {
CURRENT_TILE = ThreadLocal.withInitial(() -> null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
int minzoom,
int maxzoom,
int maxzoomForRendering,
int tileExtent,
boolean force,
boolean append,
boolean compressTempStorage,
Expand All @@ -54,6 +55,8 @@
boolean osmLazyReads,
boolean skipFilledTiles,
int tileWarningSizeBytes,
int maxRendererPolygonVertices,
double maxRendererPolygonSimplificationTolerance,
Boolean color,
boolean keepUnzippedSources,
TileCompression tileCompression,
Expand Down Expand Up @@ -90,9 +93,22 @@
if (maxzoom > MAX_MAXZOOM) {
throw new IllegalArgumentException("Max zoom must be <= " + MAX_MAXZOOM + ", was " + maxzoom);
}
if (tileExtent <= 0 || (tileExtent & (tileExtent - 1)) != 0) {
throw new IllegalArgumentException("tile_extent must be a power of 2, was " + tileExtent);
}
if (httpRetries < 0) {
throw new IllegalArgumentException("HTTP Retries must be >= 0, was " + httpRetries);
}
if (maxRendererPolygonVertices < 4 || maxRendererPolygonVertices > 65_535) {
throw new IllegalArgumentException(
"max_renderer_polygon_vertices must be between 4 and 65535, was " + maxRendererPolygonVertices);
}
if (!(maxRendererPolygonSimplificationTolerance > 0) ||
!Double.isFinite(maxRendererPolygonSimplificationTolerance)) {

Check warning on line 107 in planetiler-core/src/main/java/com/onthegomap/planetiler/config/PlanetilerConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use the opposite operator ("<=") instead.

See more on https://sonarcloud.io/project/issues?id=onthegomap_planetiler&issues=AZ_DMmB0kEUtho0DPceI&open=AZ_DMmB0kEUtho0DPceI&pullRequest=1565

Check warning on line 107 in planetiler-core/src/main/java/com/onthegomap/planetiler/config/PlanetilerConfig.java

View workflow job for this annotation

GitHub Actions / Analyze with Sonar

MINOR CODE_SMELL

Use the opposite operator ("<=") instead. rule: java:S1940 (https://sonarcloud.io/organizations/onthegomap/rules?open=java%3AS1940&rule_key=java%3AS1940) issue url: https://sonarcloud.io/project/issues?pullRequest=1565&open=AZ_DMmB0kEUtho0DPceI&id=onthegomap_planetiler
throw new IllegalArgumentException(
"max_renderer_polygon_simplification_tolerance must be finite and > 0, was " +
maxRendererPolygonSimplificationTolerance);
}
}

public static PlanetilerConfig defaults() {
Expand Down Expand Up @@ -139,6 +155,8 @@
int renderMaxzoom =
arguments.getInteger("render_maxzoom", "maximum rendering zoom level up to " + MAX_MAXZOOM,
Math.max(maxzoom, DEFAULT_MAXZOOM));
int tileExtent = arguments.getInteger("tile_extent",
"vector tile extent (default 4096)", 4096);
Path tmpDir = arguments.file("tmpdir|tmp", "temp directory", Path.of("data", "tmp"));
List<String> extraNameTags = arguments.getList("extra_name_tags", "Extra name tags to copy from OSM to output",
List.of());
Expand All @@ -162,6 +180,7 @@
minzoom,
maxzoom,
renderMaxzoom,
tileExtent,
arguments.getBoolean("force", "overwriting output file and ignore disk/RAM warnings", false),
arguments.getBoolean("append",
"append to the output file - only supported by " + Stream.of(TileArchiveConfig.Format.values())
Expand Down Expand Up @@ -196,13 +215,13 @@
"Maximum bandwidth to consume when downloading files in units mb/s, mbps, kbps, etc.", "")),
arguments.getDouble("min_feature_size_at_max_zoom",
"Default value for the minimum size in tile pixels of features to emit at the maximum zoom level to allow for overzooming",
256d / 4096),
256d / tileExtent),
arguments.getDouble("min_feature_size",
"Default value for the minimum size in tile pixels of features to emit below the maximum zoom level",
1),
arguments.getDouble("simplify_tolerance_at_max_zoom",
"Default value for the tile pixel tolerance to use when simplifying features at the maximum zoom level to allow for overzooming",
256d / 4096),
256d / tileExtent),
arguments.getDouble("simplify_tolerance",
"Default value for the tile pixel tolerance to use when simplifying features below the maximum zoom level",
0.1d),
Expand All @@ -215,6 +234,12 @@
(int) (arguments.getDouble("tile_warning_size_mb",
"Maximum size in megabytes of a tile to emit a warning about",
1d) * 1024 * 1024),
arguments.getInteger("max_renderer_polygon_vertices",
"Maximum vertices in a polygon component (outer ring plus the 500 largest holes) before final MVT encoding",
60_000),
arguments.getDouble("max_renderer_polygon_simplification_tolerance",
"Maximum tile-pixel tolerance used to repair polygons that exceed the renderer vertex limit",
256d),
arguments.getBooleanObject("color", "Color the terminal output"),
arguments.getBoolean("keep_unzipped",
"keep unzipped sources by default after reading", false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.onthegomap.planetiler.stats.Stats;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import org.geotools.api.referencing.FactoryException;
Expand Down Expand Up @@ -48,10 +49,24 @@
*/
public class GeoUtils {

/** Rounding precision for 256x256px tiles encoded using 4096 values. */
public static final PrecisionModel TILE_PRECISION = new PrecisionModel(4096d / 256d);
/**
* Rounding precision for 256x256px tiles encoded using {@code tile_extent} values (default 4096).
*/
private static final AtomicReference<PrecisionModel> tilePrecision =
new AtomicReference<>(new PrecisionModel(4096d / 256d));
Comment on lines +52 to +56

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we move all references to 4096 out of static variables and either pass them as args to functions that need them or extract them from geoutils to a class that you instantiate with a tile extent. That might make this PR very big though, let me know what you think - if it's too much I could do in a followup PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue also asks for the extent to be configurable per-zoom #1286 so we might even want to make it a global setting 🤔

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would you implement per zoom tile extent configuration? per zoom args?
--tileExtentZ12, --tileExtentZ13, etc... ?

public static final GeometryFactory JTS_FACTORY = new GeometryFactory(PackedCoordinateSequenceFactory.DOUBLE_FACTORY);

public static PrecisionModel tilePrecision() {
return tilePrecision.get();
}

public static void setTileExtent(int tileExtent) {
if (tileExtent <= 0) {
throw new IllegalArgumentException("tile_extent must be > 0, got " + tileExtent);
}
tilePrecision.set(new PrecisionModel(tileExtent / 256d));
}

public static final Geometry EMPTY_GEOMETRY = JTS_FACTORY.createGeometryCollection();
public static final CoordinateSequence EMPTY_COORDINATE_SEQUENCE = new PackedCoordinateSequence.Double(0, 2, 0);
public static final Point EMPTY_POINT = JTS_FACTORY.createPoint();
Expand Down Expand Up @@ -309,11 +324,11 @@ public static Geometry combinePoints(List<Point> points) {
}

/**
* Returns a copy of {@code geom} with coordinates rounded to {@link #TILE_PRECISION} and fixes any polygon
* Returns a copy of {@code geom} with coordinates rounded to {@link #tilePrecision()} and fixes any polygon
* self-intersections or overlaps that may have caused.
*/
public static Geometry snapAndFixPolygon(Geometry geom, Stats stats, String stage) throws GeometryException {
return snapAndFixPolygon(geom, TILE_PRECISION, stats, stage);
return snapAndFixPolygon(geom, tilePrecision(), stats, stage);
}

private static class OrientationFixer extends GeometryTransformer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public class FeatureRenderer implements Consumer<FeatureCollector.Feature>, Clos
/** Constructs a new feature render that will send rendered features to {@code consumer}. */
public FeatureRenderer(PlanetilerConfig config, Consumer<RenderedFeature> consumer, Stats stats,
Closeable closeable) {
VectorTile.setExtent(config.tileExtent());
GeoUtils.setTileExtent(config.tileExtent());
this.config = config;
this.consumer = consumer;
this.stats = stats;
Expand Down Expand Up @@ -141,7 +143,7 @@ private void renderPoint(int zoom, Map<String, Object> attrs, FeatureCollector.F
RenderedFeature.Group groupInfo = null;
if (hasLabelGrid && coords.length == 1) {
double labelGridTileSize = feature.getPointLabelGridPixelSizeAtZoom(zoom) / 256d;
groupInfo = labelGridTileSize < 1d / 4096d ? null : new RenderedFeature.Group(
groupInfo = labelGridTileSize < 1d / config.tileExtent() ? null : new RenderedFeature.Group(
GeoUtils.labelGridId(tilesAtZoom, labelGridTileSize, coords[0]),
feature.getPointLabelGridLimitAtZoom(zoom)
);
Expand Down Expand Up @@ -264,9 +266,11 @@ private void writeTileFeatures(int zoom, long id, FeatureCollector.Feature featu
// post-processing. Features need to be "unscaled" in FeatureGroup after line merging,
// and before emitting to the output archive.
scale = Math.max(config.maxzoom(), 14) - zoom;
// need 14 bits to represent tile coordinates (4096 * 2 for buffer * 2 for zigzag encoding)
// need enough bits to represent tile coordinates (extent * 2 for buffer * 2 for zigzag encoding)
// so cap the scale factor to avoid overflowing 32-bit integer space
scale = Math.min(31 - 14, scale);
long maxCoordinate = config.tileExtent() * 4L;
int bits = 64 - Long.numberOfLeadingZeros(maxCoordinate - 1);
scale = Math.clamp(scale, 0, Math.max(0, 31 - bits));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few more subtle places that the 4096 assumption has snuck in that might not explicitly reference 4096 - this is one of them, thanks for fixing! I'm trying to think if there might be any others...

}

if (!geom.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.carrotsearch.hppc.IntObjectMap;
import com.carrotsearch.hppc.cursors.IntCursor;
import com.carrotsearch.hppc.cursors.IntObjectCursor;
import com.onthegomap.planetiler.VectorTile;
import com.onthegomap.planetiler.collection.Hppc;
import com.onthegomap.planetiler.collection.IntRangeSet;
import com.onthegomap.planetiler.geo.GeoUtils;
Expand Down Expand Up @@ -71,7 +72,6 @@
public class TiledGeometry {

private static final Format FORMAT = Format.defaultInstance();
private static final double NEIGHBOR_BUFFER_EPS = 0.1d / 4096;

private final Map<TileCoord, List<List<CoordinateSequence>>> tileContents = new HashMap<>();
private final TileExtents.ForZoom extents;
Expand All @@ -87,7 +87,7 @@ private TiledGeometry(TileExtents.ForZoom extents, double buffer, int z, boolean
this.extents = extents;
this.buffer = buffer;
// make sure we inspect neighboring tiles when a line runs along an edge
this.neighborBuffer = buffer + NEIGHBOR_BUFFER_EPS;
this.neighborBuffer = buffer + 0.1d / VectorTile.extent();
this.z = z;
this.area = area;
this.maxTilesAtThisZoom = 1 << z;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class LoopLineMerger {
private final List<Node> output = new ArrayList<>();
private int numNodes = 0;
private int numEdges = 0;
private PrecisionModel precisionModel = new PrecisionModel(GeoUtils.TILE_PRECISION);
private PrecisionModel precisionModel = new PrecisionModel(GeoUtils.tilePrecision());
private GeometryFactory factory = new GeometryFactory(precisionModel);
private double minLength = 0.0;
private double loopMinLength = 0.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

import com.onthegomap.planetiler.config.Arguments;
import com.onthegomap.planetiler.config.PlanetilerConfig;
import com.onthegomap.planetiler.geo.GeoUtils;
import com.onthegomap.planetiler.geo.GeometryException;
Expand Down Expand Up @@ -244,6 +245,16 @@ void testSetTolerance() {
assertEquals(256d / 4096, poly.getPixelToleranceAtZoom(14));
}

@Test
void testTileExtentArgAffectsDefaultMaxZoomThresholds() {
var customConfig = PlanetilerConfig.from(Arguments.of(Map.of("tile_extent", "8192")));
var customFactory = new FeatureCollector.Factory(customConfig, Stats.inMemory());
var collector = customFactory.get(newReaderFeature(rectangle(10, 20), Map.of()));
var poly = collector.polygon("layername");
assertEquals(256d / 8192, poly.getMinPixelSizeAtZoom(14));
assertEquals(256d / 8192, poly.getPixelToleranceAtZoom(14));
}

@Test
void testSetToleranceAtAllZooms() {
var collector = factory.get(newReaderFeature(rectangle(10, 20), Map.of()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2088,11 +2088,91 @@
feature(newMultiLineString(
newLineString(32, 64.3125, 37, 64.0625, 42, 64.3125),
newLineString(32, 64, 37, 64.0625, 42, 64)
), Map.of())
), "layer", Map.of(), 0)
)
)), sortListValues(results.tiles));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test for end to end point/line/polygon for a few different values of tile extent? At least 8192 and 16384, possibly a lower value like 512 or 1024 as well? I think we should probably test a worst case for each of those with coordinates at (-255, -255) (513, -255) (513, 513) (-255, 513) and a few points in the middle

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added


@Test
void testTileExtentWorstCasePointLinePolygon() throws Exception {
var baseline = runTileExtentWorstCasePointLinePolygon(4096);

// Include both high and low extents to stress clipping/rounding behavior.
for (int tileExtent : List.of(512, 1024, 8192, 16384)) {
var result = runTileExtentWorstCasePointLinePolygon(tileExtent);
assertEquals(sortListValues(baseline.tiles), sortListValues(result.tiles), "tile_extent=" + tileExtent);
}
}

private PlanetilerResults runTileExtentWorstCasePointLinePolygon(int tileExtent) throws Exception {
var points = newMultiPoint(
z14Point(-255, -255),
z14Point(513, -255),
z14Point(513, 513),
z14Point(-255, 513),
z14Point(0, 0),
z14Point(128, 128),
z14Point(256, 256)
);

var lines = newMultiLineString(
newLineString(z14CoordinatePixelList(
-255, -255,
513, -255,
513, 513,
-255, 513,
-255, -255
)),
newLineString(z14CoordinatePixelList(
0, 0,
128, 128,
256, 256
))
);

var polygon = newPolygon(z14CoordinatePixelList(
-255, -255,
513, -255,
513, 513,
-255, 513,
-255, -255
));

return runWithReaderFeatures(
Map.of(
"threads", "1",
"maxzoom", "14",
"tile_extent", Integer.toString(tileExtent)
),
List.of(
newReaderFeature(points, Map.of()),
newReaderFeature(lines, Map.of()),
newReaderFeature(polygon, Map.of())
),
(in, features) -> {
if (in.isPoint()) {
features.point("points")
.setZoomRange(14, 14)
.setBufferPixels(257);
}
if (in.canBeLine()) {
features.line("lines")
.setZoomRange(14, 14)
.setBufferPixels(257)
.setMinPixelSize(0)
.setPixelTolerance(0);
}
if (in.canBePolygon()) {
features.polygon("polygons")
.setZoomRange(14, 14)
.setBufferPixels(257)
.setMinPixelSize(0)
.setPixelTolerance(0);
}
}
);
}

@ParameterizedTest
@ValueSource(booleans = {false, true})
void testMergePolygons(boolean unionOverlapping) throws Exception {
Expand Down Expand Up @@ -2687,7 +2767,7 @@
return TileCompression.GZIP;
} else if (args.contains("tile-compression=")) {
throw new IllegalArgumentException("unhandled tile compression");
} else {

Check warning on line 2770 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Performance Test

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal
return TileCompression.GZIP;
}
}
Expand Down Expand Up @@ -2767,7 +2847,7 @@
}
})
.addOsmSource("osm", tempOsm)
.addNaturalEarthSource("ne", TestUtils.pathToResource("natural_earth_vector.sqlite"))

Check warning on line 2850 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Build / Run

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 2850 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Performance Test

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 2850 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Java 21 / ubuntu-latest

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 2850 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Java 25 / ubuntu-latest

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 2850 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Java 21 / macos-latest

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 2850 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Java 25 / macos-latest

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 2850 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Analyze with Sonar

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal
.addShapefileSource("shapefile", TestUtils.pathToResource("shapefile.zip"))
.addGeoPackageSource("geopackage", TestUtils.pathToResource("geopackage.gpkg.zip"), null)
.addGeoJsonSource("geojson", TestUtils.pathToResource("featurecollection.geojson"), null)
Expand Down Expand Up @@ -2976,7 +3056,7 @@
void testPlanetilerRunnerParquet(String args) throws Exception {
Path mbtiles = tempDir.resolve("output.mbtiles");

Planetiler.create(Arguments.fromArgs((args + " --tmpdir=" + tempDir.resolve("data")).split("\\s+")))

Check warning on line 3059 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Performance Test

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal
.setProfile(new Profile.NullProfile() {
@Override
public void processFeature(SourceFeature source, FeatureCollector features) {
Expand Down Expand Up @@ -3056,7 +3136,7 @@
Planetiler.create(Arguments.of("tmpdir", tempDir, "force", Boolean.toString(force)))
.setProfile(profile)
.addOsmSource("osm", TestUtils.pathToResource("monaco-latest.osm.pbf"))
.addNaturalEarthSource("ne", TestUtils.pathToResource("natural_earth_vector.sqlite"))

Check warning on line 3139 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Build / Run

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 3139 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Performance Test

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 3139 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Java 21 / ubuntu-latest

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 3139 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Java 25 / ubuntu-latest

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 3139 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Java 21 / macos-latest

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 3139 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Java 25 / macos-latest

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal

Check warning on line 3139 in planetiler-core/src/test/java/com/onthegomap/planetiler/PlanetilerTests.java

View workflow job for this annotation

GitHub Actions / Analyze with Sonar

addNaturalEarthSource(java.lang.String,java.nio.file.Path) in com.onthegomap.planetiler.Planetiler has been deprecated and marked for removal
.addShapefileSource("shapefile", TestUtils.pathToResource("shapefile.zip"))
.addGeoPackageSource("geopackage", TestUtils.pathToResource("geopackage.gpkg.zip"), null)
.setOutput(tempDir.resolve("output.mbtiles"))
Expand Down
Loading
Loading