Commit Graph
108 Commits
Author SHA1 Message Date
Erica FischerandBrandon Liu 3b2599f587 Add support for pmtiles output format (#55)
* add pmtiles.hpp from github.com/protomaps/PMTiles [#10]

* tippecanoe main writes pmtiles output. [#10]

* detect output format using suffix
* after mbtiles is done writing, replace with pmtiles based on map/image tables.
* add method to write_json for writing json sub-object.

* tippecanoe-decode reads pmtiles input. [#10]

* tile-join reads and writes pmtiles. [#10]

* pmtiles test suite for decode and tile-join [#10]

* add base GitHub CI action for compiling and test suite.

* update pmtiles.hpp with z>15 fix

* Fix some ordering problems with pmtiles decode

* Pmtiles should also pass the raw tiles tests

* Eradicate spaces from tileset metadata JSON fields

* Eradicate spaces from more test fixtures

* Update more tests

* Pmtiles tests pass now too

* Remove unnecessary sort (and make indent)

* Update changelog

* The allow-existing test for pmtiles needs -o, not -e

* Declare --allow-existing to be unsupported for pmtiles.

It was always a bad idea even for mbtiles.

Co-authored-by: Brandon Liu <bdon@bdon.org>
2022-12-29 12:00:13 -08:00
Erica Fischer 9c77029b63 Add a data structure for tileset metadata (#44)
* Progress toward making a tileset metadata structure

* Write metadata from structure to mbtiles

* Write dirtiles metadata.json from metadata structure

* Update changelog
2022-12-12 13:32:02 -08:00
Erica Fischer 8eec2be462 Improve quality of coalescing-as-needed; add options to limit feature count (#25)
* Add an option to limit geometry vertex count

* Update docs and changelog

* Track desired feature count and geometry size in strategies

* Remove dead code for a long-forgotten inaccessible option

* Fix the option name in changelog

* Refine coalesce-smallest to only coalesce onto other small features

* Clean polygons before coalescing-as-needed

* Don't accumulate tiny polygon holes as negative dust

* Add the option not to limit the feature count at maxzoom

* Add options to limit feature count more abruptly in each tile

* Revert "Add the option not to limit the feature count at maxzoom"

This reverts commit ace173ab7a.

* Revert "Fix the option name in changelog"

This reverts commit 38dbce8405.

* Revert "Add an option to limit geometry vertex count"

This reverts commit d379fdf06b.

* Remove test for reverted option

* Remove more leftovers from geometry size limiting

* Update changelog
2022-11-17 13:09:10 -08:00
Erica Fischer 3086838a10 Fix wrong-way comparison that was causing buffer overflow crash in tile-join (#14)
* Fix wrong-way comparison that was causing buffer overflow in tile-join

* Update changelog
2022-09-27 09:15:54 -07:00
Erica Fischer af1a7ed7ae Once features can't possibly fit in a tile, stop trying (#9)
* Stop adding features to a tile if it can't possibly work

* Add --integer and --fraction options to tippecanoe-decode

* Carry the strategies field from tileset metadata through tile-join

* Update changelog

* Assign different codes to different kinds of error exits
2022-09-23 20:01:13 -04:00
Erica Fischer 4ea8a37611 Accept tilestats limiting options in tile-join, not just tippecanoe (#8) 2022-08-12 13:57:04 -07:00
Erica Fischer c65d6938a4 Drop or coalesce points too when dropping or coalescing smallest (#6)
* Handle points too when dropping or coalescing the "smallest" features.

* Add statistics of tile size reduction strategies to tileset metadata

* Update changelog and version

* Update documentation
2022-08-09 15:29:03 -07:00
Erica Fischer 67cd9d8d85 Reduce tippecanoe memory usage (#5)
* Change JSON objects to a union type to use less memory

* Stop storing the string representation of JSON numbers

* Restore the ability to create features with large integer attributes

* Make sure large-integer feature IDs still behave as before

* Add missing #include

* Don't preallocate as much space for arrays and objects

* Treat inability to check free disk space as a warning, not an error

* Update changelog and version
2022-08-09 15:18:51 -07:00
Eric Fischer e89bdecb6d Merge branch 'master' into raw-tiles-zoom-enumerate 2019-04-08 16:28:12 -07:00
Eric Fischer 4f7459c797 Record the command line options in the tileset metadata 2019-04-04 17:03:36 -07:00
Eric Fischer 25b9c51ac8 Fix -Z and -z for tile directories in tile-join and tippecanoe-decode 2019-03-18 18:01:32 -07:00
Eric Fischer 8df0455230 Make tile-join and tippecanoe-decode more flexible about directories:
* Accept .mvt as well as .pbf in directories of tiles
* Allow tippecanoe-decode and tile-join of directories with no metadata
2019-02-20 12:04:10 -08:00
Eric Fischer 28f773a933 Better error message if the output tileset already exists 2018-12-13 11:20:06 -08:00
Eric Fischer 9c79cf7162 Warn in tile-join if tilesets being joined have different maxzooms 2018-10-31 14:25:25 -07:00
Eric Fischer 7aebce7e0e Issue an error message in tile-join if minzoom is greater than maxzoom 2018-09-07 10:08:02 -07:00
Eric Fischer addbd0a854 Keep tile-join from generating a tileset name longer than 255 chars 2018-08-20 17:45:18 -07:00
Eric Fischer 8d67e460d4 Add --exclude-all to tile-join 2018-08-07 10:27:38 -07:00
Eric Fischer 87a1bb7851 Add an option to treat empty CSV columns as nulls, not empty strings 2018-07-19 14:33:33 -07:00
Eric Fischer 8d6bd4e10f Add a filter extension to allow filtering individual attributes 2018-06-18 11:26:22 -07:00
Eric Fischer 7f90ba5e1b Include version number in tile-join output too 2018-06-07 21:37:25 -07:00
Eric Fischer 48f7f1dd38 Preserve layer and attribute descriptions across tile-join 2018-05-24 16:01:57 -07:00
Eric Fischer bb8b01a702 Add option to specify description for attributes in tileset metadata 2018-05-24 14:18:22 -07:00
Eric Fischer 445c33fb88 Add #define needed for Cygwin 2018-05-14 17:43:42 -07:00
Eric Fischer d01d8177a0 Allow filtering features by zoom level in conditional expressions
This moves filtering from the serialization stage to the
tiling stage so that the zoom level can be known to the filter.

The side effect is to carry null attributes much further through
the pipeline than previously.
2018-04-05 14:15:19 -07:00
Eric Fischer 7f843c4d36 Check integrity of sqlite3 file before decoding or tile-joining 2018-03-29 12:02:59 -07:00
Eric Fischer 3c827b1d68 Use the standard JSON writer when writing metadata.json 2018-03-16 15:35:26 -07:00
Eric Fischer 2b936af96a Fix indentation 2018-03-02 10:35:58 -08:00
Eric Fischer d7f44ab082 Factor out code for reading metadata.json 2017-11-30 15:49:38 -08:00
Eric Fischer 1acd771743 Factor out code for enumerating the tiles in a directory 2017-11-30 15:37:46 -08:00
Eric Fischer ba1c343204 Make --allow-existing work on dirs; trim .geojson from layer names 2017-11-29 16:24:48 -08:00
Eric Fischer 0152db4a20 More initializers 2017-11-07 15:57:56 -08:00
Eric Fischer 50910b211b Remove more unused parameters 2017-11-07 11:09:22 -08:00
Eric Fischer 1960eb8dae Follow JSON rules for what looks like a number in a CSV 2017-11-03 15:17:09 -07:00
Eric Fischer 21042a7308 Move CSV code into its own file 2017-11-03 15:15:28 -07:00
Eric Fischer d13e08c9b5 Guard against null keys and values in tileset metadata 2017-10-27 17:38:07 -07:00
Eric Fischer 197d36bdc3 Make sure to encode tile-joined integers as ints, not doubles 2017-10-27 12:43:23 -07:00
Eric Fischer 18a5300e87 Add tile-join option to rename layers 2017-10-27 11:04:06 -07:00
Eric Fischer bdd95af8b2 Be careful not to generate empty layers in tile-join.
Add a test of filtering during tile-join.
Bump version number.
2017-09-05 13:33:10 -07:00
Eric Fischer 0fd4454129 Allow filter expressions during tippecanoe as well as during tile-join 2017-09-01 11:51:12 -07:00
Eric Fischer dbb789dadc Merge branch 'master' into gl-filters 2017-09-01 10:29:08 -07:00
Eric Fischer f9a007e8c3 Use milo dtoa for consistent string representation of numbers 2017-08-29 14:44:34 -07:00
Eric Fischer b7df68c164 Remember how to keep a parse tree around after the parser is closed 2017-08-28 13:56:52 -07:00
Eric Fischer 5878213516 Simplify the filter format, and actually run the filter. 2017-08-28 13:42:14 -07:00
Eric Fischer 7be21f6046 First (untested) pass at handling GL Style Spec filters 2017-08-28 13:26:11 -07:00
Eric Fischer 4d1ddc5a03 Add tile-join options to select zoom levels to copy 2017-08-16 13:49:16 -07:00
Eric Fischer 372194cee9 Add an option not to produce tilestats 2017-08-15 10:35:41 -07:00
Eric Fischer e453e32321 Fix test flakiness for filtered tile-join, and some other warnings. 2017-08-09 11:30:16 -07:00
Eric Fischer 200f6777ba Fix layer list in tilestats when filtering and tile-joining.
(The feature count when filtering will be the sum of features
across tiles instead of filters from the original input, since
the filter reader doesn't know what the original input feature
set was.)
2017-08-08 16:41:20 -07:00
Eric Fischer c79f19e3ca Merge branch 'master' into plugins 2017-08-08 11:08:10 -07:00
Eric Fischer 9ec52f2c90 Merge branch 'master' into tilestats 2017-07-21 13:08:33 -07:00