Tool for overzooming individual tiles (#121)

* Starting work on overzooming

* Factor clipping out of geometry.cpp to simplify linkage

* Pull out more geometry functions into now-badly-named clip.cpp

* Not surprisingly, there is a bug

* Found the bug

* Make indent

* Pass attributes through

* Make formatting more consistent

* Fix typos in comments

* Fix the typos better

* Add tippecanoe-overzoom to the install list

* Give overzoom a predictable exit status

* Forgot to translate to and from polygon ring closepaths

* Fix geometry collapse at z21

* Add attribute stripping; don't generate layers if they have no features

* Add docs for tippecanoe-overzoom (as it will be, not as it is)

* Change overzoom to accept input and output files as arguments

* Working on overzooming tests

* Oops

* Hook up and test the detail and buffer options, and the empty-tile case

* Also test attribute stripping

* Fix error message

* Update changelog and version
This commit is contained in:
Erica Fischer
2023-08-09 11:48:16 -07:00
committed by GitHub
parent 5cba91981a
commit 430d8edd17
13 changed files with 901 additions and 563 deletions
+26
View File
@@ -1219,3 +1219,29 @@ Join block geometries to employment attributes:
$ tippecanoe\-json\-tool \-c in_wac_S000_JT00_2015.csv tl_2010_18157_tabblock10.sort.json > blocks\-wac.json
.fi
.RE
.SH tippecanoe\-overzoom
.PP
The \fB\fCtippecanoe\-overzoom\fR utility creates a vector tile from one of its parent tiles,
clipping and scaling the geometry from the parent tile and excluding features that
are clipped away. The idea is that if you create very high resolution tiles
(using \fB\fC\-\-extra\-detail\fR) at a moderate zoom level, you can use \fB\fCtippecanoe\-overzoom\fR
to turn those into moderate detail tiles at high zoom levels, for the benefit of
renderers that cannot internally overzoom high\-resolution tiles without losing
some of the precision. Running:
.PP
.RS
.nf
tippecanoe\-overzoom \-o out.mvt.gz inz/inx/iny outz/outx/outy in.mvt.gz
.fi
.RE
.PP
reads tile \fB\fCinz/inx/iny\fR of \fB\fCin.mvt.gz\fR and produces tile \fB\fCoutz/outx/outy\fR of \fB\fCout.mvt.gz\fR\&.
.SS Options
.RS
.IP \(bu 2
\fB\fC\-b\fR \fIbuffer\fP: Set the tile buffer in the output tile (default 5)
.IP \(bu 2
\fB\fC\-d\fR \fIdetail\fP: Set the detail of the output tile (default 12)
.IP \(bu 2
\fB\fC\-y\fR \fIattribute\fP: Retain the specified \fIattribute\fP in the output features. All attributes that are not named in a \fB\fC\-y\fR option will be removed.
.RE