Removing the area that a polygon shares with an earlier polygon ran wagyu on
geometry that had already been snapped to tile coordinates, and snapping it
again could change it. In Dane County tile 8/64/93, consistent snapping bent
one block's edge into a 45-degree diagonal that left it a half-pixel
triangle, and when that block's overlap with another block was removed, the
diagonal passed through the corner of the hot pixel of the vertex beside it,
so it was snapped again and the triangle collapsed, leaving a hole between
it and its neighbor. Elsewhere in the same tile, two half-pixel overlaps
were left behind the same way.
The polygons' edges no longer cross after consistent snapping, so the
difference needs no new vertices. So compute it at 16 times the tile
resolution, where the vertices are far from each other's hot pixels, and use
the result if all of its vertices are the original ones. Only if they aren't,
fall back to snapping at tile resolution to the layer's hot pixels.
For Dane County at -D8 -d8 -pt -pn -zg, this reduces the overlapping
pixels at z8, z9, and z10 from 7, 8, and 16 to 5, 3, and 3, and removes the
hole and both overlaps in 8/64/93 at -z8.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
Consistent snapping keeps the borders of polygons in a layer from crossing,
but where rounding turned a narrow polygon between two others inside out
(for example, a Census block thinner than a pixel whose two sides cross
when rounded to tile coordinates), the area it covered is covered by both of
its neighbors, and snapping can't decide which of them it belongs to.
So after cleaning the polygons of each layer, find the ones that overlap:
two polygons that share an edge in the same direction both cover the area
beside it (neighbors that tile exactly traverse their shared border in
opposite directions), and where their borders don't share any edges, a
vertex of one is strictly inside the other. Then remove each overlapping
area from all but the polygon with the lowest sequence number, using the
layer's hot pixels so the result stays consistent with the rest.
For Dane County Census blocks at -D8 -d8 -pt -pn, this reduces the
overlapping pixels at z8, z9, and z10 from 41, 61, and 61 to 7, 8, and 16,
without changing the gaps much or taking noticeably longer, and with no
self-intersecting polygons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
With consistent snapping, edges are snapped to every hot pixel they touch,
including those whose corners they only touch. But with closed pixels, an
edge passing diagonally through a lattice point touches the corners of the
two pixels beside it as well, and is snapped into a zigzag through all four.
Two edges from different polygons that cross at a pixel corner zigzag
through the same pixels in different orders, and the zigzags cross each
other. (In Dane County tile 10/258/376, this left a quarter-pixel gap and a
quarter-pixel overlap between two blocks on either side of a sliver.)
Hobby's snap rounding, whose guarantee that snapped edges don't cross is
what makes snapping to a common set of hot pixels work, uses half-open
pixels, [x - 0.5, x + 0.5) by [y - 0.5, y + 0.5), consistent with rounding
halves up, which is how wagyu rounds intersection points. So when snapping
to a common set of hot pixels, find the range of pixels an edge passes
through in each row that way, so that a point on a pixel boundary belongs
to only one pixel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
Wagyu snaps each edge to every "hot pixel" (vertex or rounded intersection)
that it passes through. Each polygon was cleaned on its own, with only its
own hot pixels, so a border shared by two polygons could be bent through a
hot pixel in one of them and not in the other, leaving a shard gap or overlap
between them even though --no-simplification-of-shared-nodes had simplified
and rounded the border identically in both. (In Dane County tile 11/515/751,
rounding moved one of a block's own vertices across its border with a sliver,
and cleaning bent the block's copy of the border through a hot pixel that the
sliver's copy didn't have.)
Wagyu now has hot_pixels(), which returns the hot pixels of the rings added
to it, and add_hot_pixels(), which gives execute() more hot pixels to snap
to. When extra hot pixels are given, edges are snapped to every hot pixel
they touch, including corner touches, so that whether a shared edge is
snapped to a hot pixel can't depend on which polygon it is in.
With -pn, the simplification worker now runs in two passes. The first
simplifies and rounds every feature in the tile. Then the hot pixels of all
the polygons in each layer are found together, which also finds crossings
between features that no single feature would see. The second pass cleans
each polygon with the layer's hot pixels near it as well as its own, so
the borders it shares are snapped identically in each polygon. This is
snap rounding of the whole layer's arrangement at once, so the result is
still free of crossings.
For Dane County Census blocks at -D8 -d8 -pt -pn, tiles 12/1031/1503 and
11/515/751 now have no gaps between blocks (from 10 and 23 pixels), and the
gaps and overlaps at z9 and z10 go from 55/113 and 155/175 to 13/56 and 23/59
pixels, with no self-intersecting polygons. Natural Earth 10m countries at
-z8 -pn take about 7% longer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
When a polygon collapsed away to nothing during cleaning, revive_polygon()
replaced it with a rectangle with the polygon's area, centered on the
average of its vertices. That looked bad for two reasons. Most polygons that
collapse are much smaller than a pixel, and the rectangle is at least a
pixel, so it was usually far too big: for Dane County Census blocks at
-D8 -d8 -pt -pn, 88% of the 27,206 revived polygons had less than half a
pixel of area, and the median rectangle had 11 times the area of the polygon
it replaced. And the larger polygons that collapse are almost all long and
narrow, like blocks between roads, so a square at their midpoint looked
nothing like them.
Now a polygon that collapses entirely is first replaced by the union of
one-pixel strips along every edge of its simplified outline, which traces
its shape in the right place. Only if that is empty too, because the whole
polygon is within a pixel or so, is it replaced by the rectangle, which is
then a single pixel. This is part of spindle preservation, so with
--no-spindle-preservation the rectangle is still used.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
The previous change, which stopped wagyu from snapping an edge to a hot
pixel whose corner it only touches, made two of upstream wagyu's 3320
geometry fixtures produce spikes. When an intersection lies exactly on a
pixel corner, it is rounded to that pixel, and the edges that intersect
there must be snapped to it; and once an edge has been snapped to one hot
pixel, its new segments may pass through the interior of another hot pixel
whose corner the original edge only touched.
So now the inward rounding of the hot pixel range only applies to an edge
that intersects no other edge (which is recorded while the hot pixels are
built), and never to a hot pixel that is the rounded location of an
intersection (which are now kept in a separate sorted list). Edges that are
part of intersections are snapped exactly as before. With this, upstream
wagyu's unit tests and all 3320 of its geometry fixtures pass, and the
narrow diagonal Census block in Dane County is still preserved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
Wagyu's snap rounding finds the hot pixels (pixels containing a vertex or
intersection) that each edge passes through, row by row, by rounding the
x range that the edge covers within the row outward. A value exactly
halfway between two integers was rounded outward too, so a pixel whose
corner the edge merely touched counted as one it passed through.
For a 45-degree edge, the x range always ends exactly on pixel corners,
so two parallel diagonal edges one unit apart were each snapped to the
other's endpoints, and a perfectly valid diagonal polygon one unit wide
(for example, a narrow Census block between two others, after rounding to
tile coordinates) was collapsed to nothing by cleaning, leaving a diagonal
gap between the blocks on either side of it.
Round halfway values inward instead, for this purpose only (the rounding
of intersection points is unchanged). On Dane County census blocks at
-D8 -d8 -pn -pt, this removes about 10-20% of the gaps between blocks at
z9 and z10, without introducing any self-intersecting polygons (checked
independently with exact orientation tests at z6-z12). Upstream wagyu's
rounding is unchanged since 2020.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
Long, narrow rings were exempted from tiny polygon reduction so that
spindle preservation could keep them as lines. But with -pn, no strips are
added along borders shared with other features, so a narrow block whose
length is mostly shared border was exempted, then collapsed completely in
cleaning, and was then replaced by revive_polygon()'s placeholder rectangle,
which overlaps its neighbors. (In Dane County census blocks at -D8 -d8 -pn,
this raised the number of revived polygons at z12 from 57 to 92.)
Now only the part of the ring's length that is not made of shared edges
counts toward the exemption, so such blocks are combined into tiny polygons
as before. The shared edges can be matched exactly here, because tiny
polygon reduction happens before simplification. reduce_tiny_poly() takes
the length function as a callback because clip.cpp is also linked into
tools that don't include polygon.cpp.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
A spindle strip extends one pixel past the far side of the narrow part it
preserves, so a panhandle between two neighboring features (or any narrow
part whose far side borders another feature) would overlap its neighbors
by up to a pixel, which is unfortunate for datasets that are meant to tile
exactly.
With --no-simplification-of-shared-nodes, the vertex pass already sorts every
polygon vertex with its neighbors to find the shared nodes. Each vertex record
now also carries the feature it came from, and the same pass writes out each
edge that is part of two or more different polygon features, as a sorted
table of half-edges. When a narrow edge's strip would extend past an edge
that is in that table, the strip is left out, so the panhandle collapses as
it used to and the features still tile exactly. A narrow part with open space
on its far side, like a coastal strip whose other side is a shared border,
still gets the strip along its shared side, which extends away from the
neighbor.
The table is only searched for edges that have already been found to be
narrow, not for every vertex, and since simplification may have removed
vertices along a shared border, an edge counts as shared if a shared edge
leaves either of its endpoints in its direction, within the simplification
tolerance. On a synthetic tiling (tests/spindle-shared), spindle
preservation with -pn adds no overlapping pixels at all compared to
--no-spindle-preservation, while without -pn the same data overlaps by
several hundred pixels per zoom level. On ne_10m_admin_0_countries -z8 -pn,
the time difference is within noise.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
A polygon (or part of a polygon) narrower than a tile pixel, like a
1-meter buffer around a long linestring, used to collapse away to nothing
at most zoom levels when it was rounded to tile coordinates, except for
scattered fragments wherever the rounding happened to keep its two sides
apart.
Now, before the geometry is rounded, thin_polygon_strips() looks for edges
that have an oppositely-directed edge less than sqrt(2) tile units away
(the most that rounding can move two boundaries toward each other) and
that is not just the other side of a corner (the two points must also be
far apart along the ring). Candidate pairs are found with a sweep over the
edges' bounding boxes, so polygons without narrow parts cost little more
than sorting their edges. Each narrow edge gets a one-unit-wide strip, one
side of which is the edge as it will be rounded and the other side of which
is offset one unit toward the polygon's interior, so the strips lie within
the polygon wherever it is already thick enough, and they are unioned with
the cleaned polygon. The union is done at 16x resolution, because the
strips from the two sides of a spindle are nearly coincident and wagyu's
own snap rounding would otherwise collapse them in places.
Long, narrow polygons whose perimeter is more than 8 times the tiny polygon
size are also no longer combined into tiny-polygon squares, so a spindle
stays visible down to the zoom level where it is shorter than that.
--no-spindle-preservation restores the old behavior.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
* Only skip polygon cleaning if we are still at very high resolution
* Remove collinear points and clean polygons even at high resolution
* If we truncated but still have the data and need to drop, revive
* Deduplicate by ID even when the duplicate is clipped away
* Test that deduplication works across tile boundaries
* Write out children of a tile revived after its parent truncated
A tile writes the geometry for its children on pass 0 of its zoom level,
and the later passes, which are only retries with new thresholds, must
not write it again. But a tile whose parent truncated its pyramid is
skipped on pass 0, and is only revived on a later pass, once the zoom
has had to start dropping features. Gating on pass 0 meant its children
were never written at all, so a revived tile was always a dead end: it
appeared in the output at ordinary detail with nothing below it, even
though its truncated ancestor still held the full-detail geometry.
Write the children on whichever pass first tiles the tile instead. The
dropping thresholds only ever increase within a zoom, so for a revived
tile that is exactly the pass on which the zoom started dropping.
Also collect the three thresholds into dropping_features(), since
write_tile() and run_thread() have to agree about when truncation is
disabled and when a skipped tile comes back.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp
* Treat dropping by attribute like the other ways of dropping features
--drop-by-attribute-as-needed was added after variable-depth pyramids,
and minattribute never made it into the test for whether a zoom level is
discarding features. A zoom that was dropping by attribute could still
truncate pyramids, so some of its tiles became full-detail leaves while
the rest of the zoom had features dropped out of them, and tiles skipped
because an ancestor had truncated stayed missing.
Unlike the other thresholds, minattribute starts at the infinity on
whichever side is being kept rather than at zero, so dropping_features()
now takes the direction too.
On tests/tl_2022_11_tract at -Z10 -M15000, zoom 11 was dropping by
attribute and truncating two pyramids at the same time; now it truncates
none of them and the tile that had been skipped under zoom 10's
truncation is written out.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp
* Delete the merged tile that the deduplication test leaves behind
overzoom-test removes merged-dedup.pbf.json.check but not the
merged-dedup.pbf it was decoded from, so the file was left in the working
tree after every test run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp
* Document what variable-depth pyramids now do to geometry and to dropping
Truncated tiles are no longer left uncleaned: they keep every vertex that
isn't collinear with its neighbors, but their polygons are cleaned so
that overlapping areas are merged instead of stacked. Say so, and say
that dropping features at a zoom level now suppresses truncation for the
whole zoom rather than for individual tiles.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp
* Start minattribute out at the infinity that excludes nothing
dropping_features() reads write_tile_args::minattribute, and the in-class
default of 0 decodes as a threshold that has already been chosen. Every
path assigns it from zoom_minattribute before anything reads it, so this
changes no behavior, but a future one that didn't would silently suppress
pyramid truncation rather than fail visibly.
-HUGE_VAL is the value that excludes nothing for the ascending order that
drop_by_attribute_descending also defaults to, so the two members agree.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp
* Regenerate the drop-by-attribute fixture through the test harness
The Makefile can't be asked for a target whose name contains an =, since
make reads that as a variable assignment, so this fixture was generated by
hand into a scratch directory. The output path ends up in the tileset's
name, description, and generator_options, and tippecanoe-decode is only
passed -x generator, so all three were compared against the harness's
.check.mbtiles path and could never match. make test failed on it.
Regenerated with the same output path the rule uses.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp
* Restore the -z14 -M25000 variable-depth fixture
This configuration was dropped rather than regenerated when the -z17
-M10000 fixture was added. It still runs, so it was losing a passing
regression test for no stated reason. Regenerated against current
behavior.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp
* Encode the = in the drop-by-attribute fixture name as %3d
A test output name containing an = can't be asked for on the make command
line, because make reads that argument as a variable assignment, so the
fixture couldn't be regenerated through its own rule. Add %3d to the
punctuation escapes that testargs decodes and use it here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp
* Regenerate the man page for the README change
The variable-depth pyramid option's description changed, and man/tippecanoe.1
is generated from README.md, so the committed page no longer matched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KewFM6XCt5W9QBZkTZDjCp
---------
Co-authored-by: Claude <noreply@anthropic.com>
Don't prune variable-depth children while a minzoom-gated feature is pending
The minzoom_feature_pending flag from #397 keeps a variable-depth pyramid
subdividing until explicit per-feature minzooms are satisfied, but two gaps
let features still be dropped:
The flag was only set when tippecanoe_minzoom > z + 1, so a feature whose
minzoom is exactly z + 1 never marked the tile pending, even though a leaf
at z carries only z-visible content.
The early-stop commit never consulted the flag: a tile that succeeded in
stopping early inserted itself into skip_children_out unconditionally,
pruning the children the pending feature needed. The flag only inflated
estimated_complexity_out, which the pruning ignores.
Set the flag for any feature excluded below its minzoom, include it in the
early-stop veto, and skip child pruning while it is set. Adds a fixture
covering the minzoom == z + 1 boundary; make test passes with no diffs to
existing fixtures.
* Divide-and-conquer polygon cleaning
* Catch the case where the gap can't be increased further
* Catch the case where we try to keep impossibly many features
* Make label points earlier in the tiling process
* Another case where it could try to drop even after already limiting.
* And do not coalesce on impossibly small geometries
* Add missing return
* Update version and changelog
* Add a flag to use an H3 index for the feature index
* Give mvt_value and serial_val a double-with-count concept
* Switch mean over to internal accumulation state
* Get rid of the attribute accumulation map
* Change vectors of features to vectors of pointers to features
* Fix --coalesce
* Revert "Add a flag to use an H3 index for the feature index"
This reverts commit b9b48f42c9.
* Update version and changelog
* Sketching out sqlite options for tile-join
* Enable sqlite3 serialized multithreading
* Fix some unnecessary round trips from std::string to char * and back
* Gathering join keys for sql query
* Make a query
* Actually open the gpkg. Fix the query quoting.
* Actually do the query and get results back
* Join the attributes onto the feature
* Set matched if the sql join matches
* Add a flag to get the feature ID from the query
* Observe attribute exclusion when joining from sql queries
* Add a flag to exclude all attributes from the tile side of the join
* Make tile-join bounding boxes reflect feature bounds, not tile bounds
* More tests
* An empty tileset has empty bounds at null island
* Gather the results from each thread *after* the thread finishes
* Missed a test
* Fix accidental inclusion of the top left of the tile in the bbox
* Case smashing and prefix trimming in the select
* Add test of sql join
* Make the join column option a join expression option
* Fix antimeridian adjustment. Z0 can't wait until the end of the tile
* Checkpoint on accepting multiple joined rows per tiled feature
* Adding the joined attribute should be per-feature, not per-attribute
* Forgot to update the test. Order of joined attributes has changed.
* Get the attributes back in the right order
* Add test of sql join with limit
* Allow multiple tile features to have the same join key
* Update tests for a country name with two distinct geometries
* Update version and changelog
* Forgot to mention the bounding box improvements
* Make tippecanoe-overzoom accept filters from a file
* Accept clip polygons from a file too
* Add test of clipping by polygon from file
* Add a test of reading an overzoom filter from a file
* Update version and changelog
* Plumb a clip bounding box around through overzoom
* Actually do some clipping
* Add a test
* Fix post-binning clipping
* Factoring out geometry parsing from feature parsing
* Accept a clip polygon argument to tippecanoe-overzoom
* Progress in the direction of polygon clipping
* Fix the wagyu flags. We need intersection, not union
* Remove debug spew
* Clip points to polygon bounds too
* Copy the geometric binning code to serve as intersection-finding code
* Add clipper2 for linestring clipping
* Compiles, but does not actually seem to clip. Hmm.
* Oh, it helps if I actually call the function
* Add clipping tests
* Add missing fixture, and don't crash if it is missing
* Remember to do polygon clipping after binning too
* Fix scaling before post-binning clipping. Add test.
* Remove unused parts of clipper
* Rename for consistency
* Revert accidentally added line
* Clip the clip regions to the tile bounds to reduce their complexity
* Add a test of clipping the clip region down to the tile boundary
* Update version and changelog
* Strip out unwanted attributes earlier in the process
* Skip aggregations whose attributes have been excluded
* Forgot one
* Add some more tests
* Update version and changelog
* Add a tippecanoe-decode option to restrict which attributes to decode
* Plumb buffer and feature limit around
* Check the feature limit
* Clarifying cases where output detail can be unspecified
* Clip bins to the tile buffer instead of just passing them through
* Add missing include
* Missed some tests
* Add --no-tile-compression option to tippecanoe-overzoom
* Update version and changelog
* Progress on plumbing a string pool for full_keys through
* More plumbing for key_pool
* Don't keep features with identical locations as multiplier features
* Revert "Don't keep features with identical locations as multiplier features"
This reverts commit 413f0c8024.
* Adjust calculated maxzoom to account for duplicate feature locations
* Update changelog and version
* Add a test affected by the maxzoom change with duplicate locations
* Round the drop rate a little for cross-platform test consistency
* Add an all-mvt_value attribute accumulation path
* Only bin by ID, not geometrically
* A little cleanup; changelog and version; test
* Remove accidental double-conversion
* Replace duplicated code with template
* Update changelog
* Choose the megatile features from those that will be in the next N zooms
* Take fractional zooms into account in multiplier feature choices
* Fix more tests
* Add a flag to retain multiplier features by minimum distance
* Limit feature expansion from multiplier density to 2x
* The multiplier cap was a bad idea
* Revert "The multiplier cap was a bad idea"
This reverts commit 6f8273a4c8.
* Revert "Limit feature expansion from multiplier density to 2x"
This reverts commit a26e41309d.
* Revert "Add a flag to retain multiplier features by minimum distance"
This reverts commit 01f14a4255.
* Remove the multiplier sequence, which should no longer matter
* Revert "Revert "Add a flag to retain multiplier features by minimum distance""
This reverts commit 776da4a1b8.
* Revert "Revert "Limit feature expansion from multiplier density to 2x""
This reverts commit 44a683d808.
* Revert "Revert "The multiplier cap was a bad idea""
This reverts commit 80f7cb1c0e.
* Track two kinds of previous index for next_feature
* Fix multiplier density threshold, I think
* Oh, I didn't git add the code changes
* Update version and changelog
* Try to install sqlite3 to fix the automated build
* Deleted too much
* Only let --preserve-point-density-threshold shift density around
* Remove the density debt concept, since it doesn't help
* Make the drop states a vector instead of an array
* Revert "Make the drop states a vector instead of an array"
This reverts commit 66c7abb6fa.
* Revert "Remove the density debt concept, since it doesn't help"
This reverts commit 707bb0c562.
* Revert "Only let --preserve-point-density-threshold shift density around"
This reverts commit ecf01f2231.
* Bin more aggressively if a point doesn't meet the pnpoly test
* Don't clip the points if we are binning
* Fix output of features added to the bin after its closure
* Update tests
* Update version and changelog
* Plumb bounding boxes through potential intersections
* Quick bbox reject for bins that can't possibly intersect
* Inching toward attribute accumulation in megatile handling
* Some sort of test for how all these things interact with each other.
Automatic numeric attribute accumulation does *not* apply to attributes
that have an explicit attribute accumulator set, because the order of
operations is too messy and weird
* More sketching
* More sketching
* Actually do some accumulation
* Put all that behind an --accumulate-numeric flag
* Use the same attribute accumulation logic in binning as in megatiles
* Fix backwards conditional
* Add means, but somehow I have some counts of 0
* Handle aggregated attributes with no base attribute in the feature
* Checkpoint before I break everything
* Found a flaw, now to debug
* Fix a typo that broke accumulation
* Add binning tests
* Make sure IDs make it through on the bins
* Fix count/mean accumulation
* Make the numeric accumulation prefix configurable
* Make sure the accumulate test still works with a different prefix
* Forgot to update this test
* More testing to make sure cluster sizes make it all the way through
* Fix neglected --accumulate-attribute when binning
* Mark unexercised attribute accumulation cases as "can't happen"
* Factor out numeric preservation
* Attrs with the accumulation prefix are just preserved, not accumulated
* Test behavior of prefixed attributes
* Plumbing for exclude and exclude-prefix
* Implement and test attribute prefix stripping in overzoom
* Update version and changelog
* For debugging, make an attribute list of source feature IDs
* Revert "For debugging, make an attribute list of source feature IDs"
This reverts commit 65fc99c9d1.
* Another try at fixing longitude wraparound for bins
* Gonna get it right this time
* Forgot to update the comment
* The filter case was not supposed to reinterpret geometry
* Copy antimeridian-crossing geometries to the other side too
* Getting closer to getting antimeridian-crossing polygons right
* Update changelog and version
* Factoring out tilestats management from GeoJSON file reading
* Move code around so overzoom can link against parse_layers
* Read the file of bins
* Plumb the bins through to overzoom()
* Some zip code bins to test with
* (Currently non-functional) test of binning
* Starting to spell out the bin matching loop
* Can't flatten points, so don't flatten bins either
* More fleshing out bin traversal
* Bounding box of tile-relative mvt geometry
* Smallest enclosing tile from bbox
* Most of the bin scan
* Add point in polygon check. It crashes.
* Find the matching bins
* GDAL-style bounding boxes have eaten my brain
* Make some features to bin into
* Increment a count as features are found to be within the bins
* Fix longitude wraparound in overzoom bins
* Fix the tests
* Push off attribute copying until after bin assignment
* Carry sum of numeric attributes into the bins
* Also add mean, min, and max
* Add --calculate-feature-index since I keep needing it for testing
* Add an option to accumulate sum/mean/max/min/count of all numeric attrs
* Don't bake in tippecanoe:mean, since we redo it from sum and count
* Forgot to update this test fixture after removing tiled mean
* Update version and changelog
* Clip before dealing with multiplier or filters in overzoom
* Be more careful to retry when the feature count is exceeded
* Adjust the estimated total feature count for the multiplier too
* Fix the feature count estimates, I think
* Pass build info into the version string
* Report the actual max zoom of any tiles as the metadata maxzoom
* Revert unneeded renaming to make the diff more readable
* Clean up the adjustments to tile sizes and feature counts
* Update version and changelog
* Dropping a feature into a multiplier cluster still effectively drops it
* Update changelog
* Rethink the changelog description
* Don't try to truncate zooms if we are still tiling at z18
* Track output position at the file level instead of within each tile
* Track file position where the child tile data begins
* Add option and document its intended behavior
* Changing the detail loop to account for stopping early
* I forgot I already added an option for this
* Stop early if we can make a complete tile
* Add a test of zoom truncation with limited feature count
* Forgot to commit the actual code change
* Make room for a vertex count in the header of each serialized tile
* Estimate tile complexity; don't try truncating when unlikely to work
* Be more conservative, because ever retrying a tile is a big speed hit
* If stopping early, don't simplify or clean; leave that to overzoom
* Add tiny polygon reduction / dust to overzoom
* Don't try to stop early in the children if we dropped anything by rate
* Fflush here too before pwriting
* Don't stop early if we ended up dropping any features.
Rework the can-the-next-zoom-stop-early logic to avoid going
one zoom further than needed.
* Fix warning
* Fix warnings
* Oops, checking for the wrong expected return value
* Cleanup from adding line simplification in overzoom
* Current (wrong) behavior when combining coalescing and truncating
* Keep a list of parent tiles to skip rather than truncating
* Now the coalesced tiles in z12 get children in z13
* Don't double-count feature dropping when the zoom level is retried
* Correct README description
* Remove todo about special case below basezoom, which is accounted for
* Be a little more aggressive in drop-densest determination
* Scale tile feature limit for megatiles in the same way as byte limit
* Fully deprecate -detect-shared-borders into an alias
* Track the distances found in the douglas-peucker recursion
* Serialize and deserialize the distance with the vertices
* Revert "Serialize and deserialize the distance with the vertices"
This reverts commit 753f1b7909.
* Revert "Track the distances found in the douglas-peucker recursion"
This reverts commit e5361f8c22.
* Revert "Fully deprecate -detect-shared-borders into an alias"
This reverts commit 0698aeb766.
* Better tracking of whether we failed to make a full-detail tile
* Put a bloom filter in front of the binary search for shared nodes
* Forgot to take out this printf
* Improve dispatch of tiling tasks
* Still dispatch the biggest tasks first
* Track zoom truncation in the strategies list in the tileset metadata
* Prescan for small deltas before doing proper simplification
* Revert "Prescan for small deltas before doing proper simplification"
This reverts commit d1d8238b83.
* Update version and changelog
* Rename to --generate-variable-depth-tile-pyramid
* Reviving multi-source-tile overzoom: the clip.cpp side
* Reviving multi-source-tile overzoom: the overzoom.cpp side
* Update readme
* Update version and changelog
* Start to distinguish fixed cluster density setting from as-needed density
* Make consistent {drop,coalesce}-densest decisions between zooms
* Actually track the previous index instead of just intending to
* Clean up collinearities in coalesced features
* To determine densest, look at actual physical distance, not just index
* Don't actually need the previous index in serial_feature now
* Center of mass of one feature to most distant point of the next
* Add apologetic comment
* Wait, how did the tests pass before?
* Revert "Wait, how did the tests pass before?"
This reverts commit f73c8ee543.
* Add --maximum-string-attribute-length option
* Update version and changelog
* A little more testing to make sure
* Trying to reduce memory in tiling
* Let the simplification workers go out of scope earlier
* Bail out quickly once the maximum feature count is reached
* Update changelog and version
* Fix some undefined behavior
* Avoid overflow in line simplification calculations
* Oops, missed a test
* Didn't mean to add that to the Makefile
* Revert "Revert "[ci] test in debug mode (#202)""
This reverts commit c95c328e47.
* Fix reference to out-of-scope pointer
* Fix invalid shift and out-of-bounds vector element reference
* Update changelog and version
* Don't swap attributes when reducing tiny polygon dust
Because the dust placeholder may be misleadingly far from the feature
that contributed the most area to it
* Remove unused arguments; update changelog
* Postpone tagging features as being the first of a multiplier cluster
* Upgrade some dynamically dropped features to multiplier features
* Still don't let it put more features in a cluster than is allowed
* Update tests
* Make the current multiplier cluster size per-layer
* Make sure the first non-empty-geometry in the layer is marked as primary
* Improve comments
* Update changelog and version
* Remove commented out debugging printf
* Factor out duplicated code