mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-03-24 21:05:16 +00:00
Test and documentation
This commit is contained in:
parent
14b618adc9
commit
dbd69142b0
@ -1,3 +1,7 @@
|
||||
## 1.28.0
|
||||
|
||||
* Directly support gzipped GeoJSON as input files
|
||||
|
||||
## 1.27.16
|
||||
|
||||
* Fix thread safety issues related to the out-of-disk-space checker
|
||||
|
7
Makefile
7
Makefile
@ -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 /
|
||||
%.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
|
||||
cmp $@.out $(patsubst %.check,%,$@)
|
||||
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
|
||||
%.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
|
||||
./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
|
||||
cmp $@.out $(patsubst %.checkbuf,%,$@)
|
||||
rm $@.out $@.mbtiles
|
||||
@ -280,7 +281,7 @@ csv-test:
|
||||
prep-test: $(TESTS)
|
||||
|
||||
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 > $@
|
||||
cmp $(patsubst %.check,%,$@) $@
|
||||
rm $@.check.mbtiles
|
||||
|
@ -56,7 +56,7 @@ Usage
|
||||
-----
|
||||
|
||||
```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.
|
||||
@ -142,6 +142,7 @@ If your input is formatted as newline-delimited GeoJSON, use `-P` to make input
|
||||
### Input files and layer names
|
||||
|
||||
* _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_`.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
|
||||
|
@ -54,7 +54,7 @@ compiler errors.
|
||||
.PP
|
||||
.RS
|
||||
.nf
|
||||
$ tippecanoe \-o file.mbtiles [options] [file.json file.geobuf ...]
|
||||
$ tippecanoe \-o file.mbtiles [options] [file.json file.json.gz file.geobuf ...]
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
@ -149,6 +149,8 @@ or if metadata fields can't be set. You probably don't want to use this.
|
||||
.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\&.
|
||||
.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\&.
|
||||
.IP \(bu 2
|
||||
\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
BIN
tests/ne_110m_admin_0_countries/in.json.gz
Normal file
BIN
tests/ne_110m_admin_0_countries/in.json.gz
Normal file
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
#ifndef VERSION_HPP
|
||||
#define VERSION_HPP
|
||||
|
||||
#define VERSION "tippecanoe v1.27.16\n"
|
||||
#define VERSION "tippecanoe v1.28.0\n"
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user