From 2e155b3bb4c35c3632415970751b409c8fbc28a1 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Tue, 3 Nov 2015 14:04:28 -0800 Subject: [PATCH] Document and install tippecanoe-enumerate and tippecanoe-decode --- Makefile | 9 ++++++--- README.md | 24 ++++++++++++++++++++++++ man/tippecanoe.1 | 28 ++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 412eabc..4258a8b 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index d35cc6d..359a4a0 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/man/tippecanoe.1 b/man/tippecanoe.1 index e01a973..f843212 100644 --- a/man/tippecanoe.1 +++ b/man/tippecanoe.1 @@ -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.