Document and install tippecanoe-enumerate and tippecanoe-decode

This commit is contained in:
Eric Fischer 2015-11-03 14:04:28 -08:00
parent 321c12da5e
commit 2e155b3bb4
3 changed files with 58 additions and 3 deletions

View File

@ -1,7 +1,7 @@
PREFIX ?= /usr/local
MANDIR ?= $(PREFIX)/share/man/man1/
all: tippecanoe enumerate decode tile-join
all: tippecanoe tippecanoe-enumerate tippecanoe-decode tile-join
docs: man/tippecanoe.1
@ -9,6 +9,9 @@ install: tippecanoe
mkdir -p $(PREFIX)/bin
mkdir -p $(MANDIR)
cp tippecanoe $(PREFIX)/bin/tippecanoe
cp tippecanoe-enumerate $(PREFIX)/bin/tippecanoe-enumerate
cp tippecanoe-decode $(PREFIX)/bin/tippecanoe-decode
cp tile-join $(PREFIX)/bin/tile-join
cp man/tippecanoe.1 $(MANDIR)/tippecanoe.1
man/tippecanoe.1: README.md
@ -28,10 +31,10 @@ LIBS = -L/usr/local/lib
tippecanoe: geojson.o jsonpull.o vector_tile.pb.o tile.o clip.o pool.o mbtiles.o geometry.o projection.o memfile.o clipper/clipper.o
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3 -lpthread
enumerate: enumerate.o
tippecanoe-enumerate: enumerate.o
gcc $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lsqlite3
decode: decode.o vector_tile.pb.o projection.o
tippecanoe-decode: decode.o vector_tile.pb.o projection.o
g++ $(PG) $(LIBS) -O3 -g -Wall -o $@ $^ -lm -lz -lprotobuf-lite -lsqlite3
tile-join: tile-join.o vector_tile.pb.o projection.o pool.o mbtiles.o

View File

@ -289,3 +289,27 @@ Then you can join those populations to the geometries and discard the no-longer-
```sh
./tile-join -o population.mbtiles -x GEOID10 -c population.csv tl_2010_06001_tabblock10.mbtiles
```
tippecanoe-enumerate
====================
The `tippecanoe-enumerate` utility lists the tiles that an `mbtiles` file defines.
Each line of the output lists the name of the `mbtiles` file and the zoom, x, and y
coordinates of one of the tiles.
tippecanoe-decode
=================
The `tippecanoe-decode` utility turns vector mbtiles back to GeoJSON. You can use it either
on an entire file:
tippecanoe-decode file.mbtiles
or on an individual tile:
tippecanoe-decode file.mbtiles zoom x y
If you decode an entire file, you get a nested `FeatureCollection` identifying each
tile and layer separately. Note that the same features generally appear at all zooms,
so the output for the file will have many copies of the same features at different
resolutions.

View File

@ -337,3 +337,31 @@ Then you can join those populations to the geometries and discard the no\-longer
\&./tile\-join \-o population.mbtiles \-x GEOID10 \-c population.csv tl_2010_06001_tabblock10.mbtiles
.fi
.RE
.SH tippecanoe\-enumerate
.PP
The \fB\fCtippecanoe\-enumerate\fR utility lists the tiles that an \fB\fCmbtiles\fR file defines.
Each line of the output lists the name of the \fB\fCmbtiles\fR file and the zoom, x, and y
coordinates of one of the tiles.
.SH tippecanoe\-decode
.PP
The \fB\fCtippecanoe\-decode\fR utility turns vector mbtiles back to GeoJSON. You can use it either
on an entire file:
.PP
.RS
.nf
tippecanoe\-decode file.mbtiles
.fi
.RE
.PP
or on an individual tile:
.PP
.RS
.nf
tippecanoe\-decode file.mbtiles zoom x y
.fi
.RE
.PP
If you decode an entire file, you get a nested \fB\fCFeatureCollection\fR identifying each
tile and layer separately. Note that the same features generally appear at all zooms,
so the output for the file will have many copies of the same features at different
resolutions.