Test and documentation

This commit is contained in:
Eric Fischer
2018-05-11 16:34:18 -07:00
parent 14b618adc9
commit dbd69142b0
7 changed files with 14 additions and 189 deletions
+4
View File
@@ -1,3 +1,7 @@
## 1.28.0
* Directly support gzipped GeoJSON as input files
## 1.27.16 ## 1.27.16
* Fix thread safety issues related to the out-of-disk-space checker * Fix thread safety issues related to the out-of-disk-space checker
+4 -3
View File
@@ -87,7 +87,7 @@ test: tippecanoe tippecanoe-decode $(addsuffix .check,$(TESTS)) raw-tiles-test p
# Work around Makefile and filename punctuation limits: _ for space, @ for :, % for / # Work around Makefile and filename punctuation limits: _ for space, @ for :, % for /
%.json.check: %.json.check:
./tippecanoe -a@ -f -o $@.mbtiles $(subst @,:,$(subst %,/,$(subst _, ,$(patsubst %.json.check,%,$(word 4,$(subst /, ,$@)))))) $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json) < /dev/null ./tippecanoe -a@ -f -o $@.mbtiles $(subst @,:,$(subst %,/,$(subst _, ,$(patsubst %.json.check,%,$(word 4,$(subst /, ,$@)))))) $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json) $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json.gz) < /dev/null
./tippecanoe-decode $@.mbtiles > $@.out ./tippecanoe-decode $@.mbtiles > $@.out
cmp $@.out $(patsubst %.check,%,$@) cmp $@.out $(patsubst %.check,%,$@)
rm $@.out $@.mbtiles rm $@.out $@.mbtiles
@@ -101,7 +101,8 @@ fewer-tests: tippecanoe tippecanoe-decode geobuf-test raw-tiles-test parallel-te
# XXX Use proper makefile rules instead of a for loop # XXX Use proper makefile rules instead of a for loop
%.json.checkbuf: %.json.checkbuf:
for i in $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json); do ./tippecanoe-json-tool -w $$i | ./node_modules/geobuf/bin/json2geobuf > $$i.geobuf; done for i in $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json); do ./tippecanoe-json-tool -w $$i | ./node_modules/geobuf/bin/json2geobuf > $$i.geobuf; done
./tippecanoe -a@ -f -o $@.mbtiles $(subst @,:,$(subst %,/,$(subst _, ,$(patsubst %.json.checkbuf,%,$(word 4,$(subst /, ,$@)))))) $(addsuffix .geobuf,$(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json)) < /dev/null for i in $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json.gz); do gzip -dc $$i | ./tippecanoe-json-tool -w | ./node_modules/geobuf/bin/json2geobuf > $$i.geobuf; done
./tippecanoe -a@ -f -o $@.mbtiles $(subst @,:,$(subst %,/,$(subst _, ,$(patsubst %.json.checkbuf,%,$(word 4,$(subst /, ,$@)))))) $(addsuffix .geobuf,$(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json)) $(addsuffix .geobuf,$(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json.gz)) < /dev/null
./tippecanoe-decode $@.mbtiles | sed 's/checkbuf/check/g' > $@.out ./tippecanoe-decode $@.mbtiles | sed 's/checkbuf/check/g' > $@.out
cmp $@.out $(patsubst %.checkbuf,%,$@) cmp $@.out $(patsubst %.checkbuf,%,$@)
rm $@.out $@.mbtiles rm $@.out $@.mbtiles
@@ -280,7 +281,7 @@ csv-test:
prep-test: $(TESTS) prep-test: $(TESTS)
tests/%.json: Makefile tippecanoe tippecanoe-decode tests/%.json: Makefile tippecanoe tippecanoe-decode
./tippecanoe -f -o $@.check.mbtiles $(subst @,:,$(subst %,/,$(subst _, ,$(patsubst %.json,%,$(word 4,$(subst /, ,$@)))))) $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json) ./tippecanoe -f -o $@.check.mbtiles $(subst @,:,$(subst %,/,$(subst _, ,$(patsubst %.json,%,$(word 4,$(subst /, ,$@)))))) $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json) $(wildcard $(subst $(SPACE),/,$(wordlist 1,2,$(subst /, ,$@)))/*.json.gz)
./tippecanoe-decode $@.check.mbtiles > $@ ./tippecanoe-decode $@.check.mbtiles > $@
cmp $(patsubst %.check,%,$@) $@ cmp $(patsubst %.check,%,$@) $@
rm $@.check.mbtiles rm $@.check.mbtiles
+2 -1
View File
@@ -56,7 +56,7 @@ Usage
----- -----
```sh ```sh
$ tippecanoe -o file.mbtiles [options] [file.json file.geobuf ...] $ tippecanoe -o file.mbtiles [options] [file.json file.json.gz file.geobuf ...]
``` ```
If no files are specified, it reads GeoJSON from the standard input. If no files are specified, it reads GeoJSON from the standard input.
@@ -142,6 +142,7 @@ If your input is formatted as newline-delimited GeoJSON, use `-P` to make input
### Input files and layer names ### Input files and layer names
* _name_`.json` or _name_`.geojson`: Read the named GeoJSON input file into a layer called _name_. * _name_`.json` or _name_`.geojson`: Read the named GeoJSON input file into a layer called _name_.
* _name_`.json.gz` or _name_`.geojson.gz`: Read the named gzipped GeoJSON input file into a layer called _name_.
* _name_`.geobuf`: Read the named Geobuf input file into a layer called _name_. * _name_`.geobuf`: Read the named Geobuf input file into a layer called _name_.
* _name_`.csv`: Read the named CSV input file into a layer called _name_. * _name_`.csv`: Read the named CSV input file into a layer called _name_.
* `-l` _name_ or `--layer=`_name_: Use the specified layer name instead of deriving a name from the input filename or output tileset. If there are multiple input files * `-l` _name_ or `--layer=`_name_: Use the specified layer name instead of deriving a name from the input filename or output tileset. If there are multiple input files
+3 -1
View File
@@ -54,7 +54,7 @@ compiler errors.
.PP .PP
.RS .RS
.nf .nf
$ tippecanoe \-o file.mbtiles [options] [file.json file.geobuf ...] $ tippecanoe \-o file.mbtiles [options] [file.json file.json.gz file.geobuf ...]
.fi .fi
.RE .RE
.PP .PP
@@ -149,6 +149,8 @@ or if metadata fields can't be set. You probably don't want to use this.
.IP \(bu 2 .IP \(bu 2
\fIname\fP\fB\fC\&.json\fR or \fIname\fP\fB\fC\&.geojson\fR: Read the named GeoJSON input file into a layer called \fIname\fP\&. \fIname\fP\fB\fC\&.json\fR or \fIname\fP\fB\fC\&.geojson\fR: Read the named GeoJSON input file into a layer called \fIname\fP\&.
.IP \(bu 2 .IP \(bu 2
\fIname\fP\fB\fC\&.json.gz\fR or \fIname\fP\fB\fC\&.geojson.gz\fR: Read the named gzipped GeoJSON input file into a layer called \fIname\fP\&.
.IP \(bu 2
\fIname\fP\fB\fC\&.geobuf\fR: Read the named Geobuf input file into a layer called \fIname\fP\&. \fIname\fP\fB\fC\&.geobuf\fR: Read the named Geobuf input file into a layer called \fIname\fP\&.
.IP \(bu 2 .IP \(bu 2
\fIname\fP\fB\fC\&.csv\fR: Read the named CSV input file into a layer called \fIname\fP\&. \fIname\fP\fB\fC\&.csv\fR: Read the named CSV input file into a layer called \fIname\fP\&.
File diff suppressed because one or more lines are too long
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP #ifndef VERSION_HPP
#define VERSION_HPP #define VERSION_HPP
#define VERSION "tippecanoe v1.27.16\n" #define VERSION "tippecanoe v1.28.0\n"
#endif #endif