Skip to content

Commit

Permalink
Merge pull request #426 from mapbox/extend-zooms
Browse files Browse the repository at this point in the history
Add an option to increase maxzoom if features are still being dropped
  • Loading branch information
e-n-f authored May 31, 2017
2 parents b80a1d7 + dba2495 commit 240ccbd
Show file tree
Hide file tree
Showing 12 changed files with 18,207 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.19.1

* Add an option to increase maxzoom if features are still being dropped

## 1.19.0

* Tile-join can merge and create directories, not only mbtiles
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ than at all newlines.
* `-z` _zoom_ or `--maximum-zoom=`_zoom_: Maxzoom: the highest zoom level for which tiles are generated (default 14)
* `-zg` or `--maximum-zoom=g`: Guess what is probably a reasonable maxzoom based on the spacing of features.
* `-Z` _zoom_ or `--minimum-zoom=`_zoom_: Minzoom: the lowest zoom level for which tiles are generated (default 0)
* `-ae` or `--extend-zooms-if-still-dropping`: Increase the maxzoom if features are still being dropped at that zoom level.
The detail and simplification options that ordinarily apply only to the maximum zoom level will apply both to the originally
specified maximum zoom and to any levels added beyond that.

### Tile resolution

Expand Down Expand Up @@ -393,12 +396,12 @@ tile-join
=========

Tile-join is a tool for joining new attributes from a CSV file to features
that have already been tiled with tippecanoe. It reads the tiles from an
that have already been tiled with tippecanoe. It reads the tiles from an
existing .mbtiles file or a directory of tiles, matches them against the
records of the CSV, and writes out a new tileset.

If you specify multiple source mbtiles files or source directories of tiles,
all the sources are read and their combined contents are written to the new
all the sources are read and their combined contents are written to the new
mbtiles output. If they define the same layers or the same tiles, the layers
or tiles are merged.

Expand Down
3 changes: 1 addition & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ size_t TEMP_FILES;
long long MAX_FILES;
static long long diskfree;

#define MAX_ZOOM 24

struct reader {
int metafd;
int poolfd;
Expand Down Expand Up @@ -2090,6 +2088,7 @@ int main(int argc, char **argv) {
{"Zoom levels", 0, 0, 0},
{"maximum-zoom", required_argument, 0, 'z'},
{"minimum-zoom", required_argument, 0, 'Z'},
{"extend-zooms-if-still-dropping", no_argument, &additional[A_EXTEND_ZOOMS], 1},

{"Tile resolution", 0, 0, 0},
{"full-detail", required_argument, 0, 'd'},
Expand Down
2 changes: 2 additions & 0 deletions main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ extern size_t CPUS;
extern size_t TEMP_FILES;

extern size_t max_tile_size;

#define MAX_ZOOM 24
47 changes: 39 additions & 8 deletions man/tippecanoe.1
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ The GeoJSON features need not be wrapped in a FeatureCollection.
You can concatenate multiple GeoJSON features or files together,
and it will parse out the features and ignore whatever other objects
it encounters.
.SH Docker Image
.PP
A tippecanoe Docker image can be built from source and executed as a task to
automatically install dependencies and allow tippecanoe to run on any system
supported by Docker.
.PP
.RS
.nf
$ docker build \-t tippecanoe:latest .
$ docker run \-it \-\-rm \\
\-v /tiledata:/data \\
tippecanoe:latest \\
tippecanoe \-\-output=/data/output.mbtiles /data/example.geojson
.fi
.RE
.PP
The commands above will build a Docker image from the source and compile the
latest version. The image supports all tippecanoe flags and options.
.SH Options
.PP
There are a lot of options. A lot of the time you won't want to use any of them
Expand Down Expand Up @@ -126,6 +144,10 @@ than at all newlines.
\fB\fC\-zg\fR or \fB\fC\-\-maximum\-zoom=g\fR: Guess what is probably a reasonable maxzoom based on the spacing of features.
.IP \(bu 2
\fB\fC\-Z\fR \fIzoom\fP or \fB\fC\-\-minimum\-zoom=\fR\fIzoom\fP: Minzoom: the lowest zoom level for which tiles are generated (default 0)
.IP \(bu 2
\fB\fC\-ae\fR or \fB\fC\-\-extend\-zooms\-if\-still\-dropping\fR: Increase the maxzoom if features are still being dropped at that zoom level.
The detail and simplification options that ordinarily apply only to the maximum zoom level will apply both to the originally
specified maximum zoom and to any levels added beyond that.
.RE
.SS Tile resolution
.RS
Expand Down Expand Up @@ -431,20 +453,27 @@ Check out some examples of maps made with tippecanoe \[la]MADE_WITH.md\[ra]
The name is a joking reference \[la]http://en.wikipedia.org/wiki/Tippecanoe_and_Tyler_Too\[ra] to a "tiler" for making map tiles.
.SH tile\-join
.PP
Tile\-join is a tool for joining new attributes from a CSV file to features that
have already been tiled with tippecanoe. It reads the tiles from an existing .mbtiles
file, matches them against the records of the CSV, and writes out a new tileset.
Tile\-join is a tool for joining new attributes from a CSV file to features
that have already been tiled with tippecanoe. It reads the tiles from an
existing .mbtiles file or a directory of tiles, matches them against the
records of the CSV, and writes out a new tileset.
.PP
If you specify multiple source mbtiles files or source directories of tiles,
all the sources are read and their combined contents are written to the new
mbtiles output. If they define the same layers or the same tiles, the layers
or tiles are merged.
.PP
If you specify multiple source mbtiles files, they are all read and their combined
contents are written to the new mbtiles output. If they define the same layers or
the same tiles, the layers or tiles are merged.
You can use the \fB\fC\-e\fR flag to output a directory of tiles rather than a
\&.mbtiles file.
.PP
The options are:
.RS
.IP \(bu 2
\fB\fC\-o\fR \fIout.mbtiles\fP: Write the new tiles to the specified .mbtiles file
\fB\fC\-o\fR \fIout.mbtiles\fP: Write the new tiles to the specified .mbtiles file.
.IP \(bu 2
\fB\fC\-f\fR: Remove \fIout.mbtiles\fP if it already exists
\fB\fC\-e\fR \fIdirectory\fP: Write the new tiles to the specified directory instead of to an mbtiles file.
.IP \(bu 2
\fB\fC\-f\fR: Remove \fIout.mbtiles\fP if it already exists.
.IP \(bu 2
\fB\fC\-c\fR \fImatch\fP\fB\fC\&.csv\fR: Use \fImatch\fP\fB\fC\&.csv\fR as the source for new attributes to join to the features. The first line of the file should be the key names; the other lines are values. The first column is the one to match against the existing features; the other columns are the new data to add.
.IP \(bu 2
Expand All @@ -454,6 +483,8 @@ The options are:
.IP \(bu 2
\fB\fC\-pk\fR: Don't skip tiles larger than 500K.
.IP \(bu 2
\fB\fC\-pC\fR: Don't compress the PBF vector tile data.
.IP \(bu 2
\fB\fC\-l\fR \fIlayer\fP: Include the named layer in the output. You can specify multiple \fB\fC\-l\fR options to keep multiple layers. If you don't specify, they will all be retained.
.IP \(bu 2
\fB\fC\-L\fR \fIlayer\fP: Remove the named layer from the output. You can specify multiple \fB\fC\-L\fR options to remove multiple layers.
Expand Down
1 change: 1 addition & 0 deletions options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define A_DROP_SMALLEST_AS_NEEDED ((int) 'n')
#define A_GRID_LOW_ZOOMS ((int) 'L')
#define A_DETECT_WRAPAROUND ((int) 'w')
#define A_EXTEND_ZOOMS ((int) 'e')

#define P_SIMPLIFY ((int) 's')
#define P_SIMPLIFY_LOW ((int) 'S')
Expand Down
Loading

0 comments on commit 240ccbd

Please sign in to comment.