Commit Graph
67 Commits
Author SHA1 Message Date
Erica Fischer 622084a507 Limit guessed maxzoom to avoid spending too many tiles on polygon fill (#23)
* Change sqlite3 schema to deduplicate identical tiles

* Limit guessed maxzoom to avoid spending too many tiles on polygon fill

* Fix test.

These dust polygons now have their area calculated because their
maxzoom is being guessed, so the attributes from the largest one
rather than the last one are preserved.

* Increase polygon limit to a million tiles

* Two million tiles ought to be enough for anyone, right?

* Add explanatory comments for mysterious numbers
2022-11-07 10:14:17 -08: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 a447dfc089 Extra coordinate precision; feature ordering; compression improvements
* Add an option to retain extra coordinate precision at maxzoom

* Make sure not to shift away the extra detail from coordinates

* Add an option to convert double-precision attributes to single

* Sort attribute values in tiles to make them compress a little better

* Slightly improve polygon simplification

By choosing a point that would be retained after simplification
to be the start/end point that always gets retained

* I regret making all of these tests involve polygons

* Add an option to specify the size of tiny polygons

* Fix accidental requiring of argument for --single-precision

* Guard against duplicate points when generating "sizes" for them

* Restore the intended behavior that tiny polygons don't get simplified

* Make the extra detail settable rather than always maximizing it

* Revert "Improve maxzoom guessing for tightly-clustered point data sources (#4)"

This reverts commit fec5e8354c.

* Add an option to prevent choosing a base zoom higher than the maxzoom

* Keep the drop rate high enough when the basezoom gets constrained

* Revert "Revert "Improve maxzoom guessing for tightly-clustered point data sources (#4)""

This reverts commit db6bc27d9e.

* Add --order-by and --order-descending options

* Accept multiple --order-by and --order-descending-by sort keys
2022-09-06 13:08:11 -07: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 86f3e98c02 Track the desired tile size for each zoom level in tileset metadata (#7) 2022-08-11 09:58:00 -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
Monty Taylor efa40d20ab Clean a few warnings emited by GCC v8
An instance of catching an exception by value:

  https://blog.knatten.org/2010/04/02/always-catch-exceptions-by-reference/

In jsontool, there's a warning about writing 8 bytes into a 7
byte buffer, potentially truncating or losing the nul-terminator.

There are a couple of instances of an unused bool variable, not
really a big deal.
2020-05-17 09:43:24 -05:00
Eric Fischer 4f7459c797 Record the command line options in the tileset metadata 2019-04-04 17:03:36 -07:00
Eric Fischer 28f773a933 Better error message if the output tileset already exists 2018-12-13 11:20:06 -08:00
Eric Fischer 2530efd525 Used the tilestats sample values limit instead of the attributes limit 2018-08-31 16:52:38 -07:00
Eric Fischer bc84b41246 Add options to change the tilestats limits 2018-08-31 15:12:00 -07:00
Eric Fischer 7f90ba5e1b Include version number in tile-join output too 2018-06-07 21:37:25 -07:00
Eric Fischer 4da6b932b3 Use "generator" instead of "creator". Silence another status message. 2018-06-07 15:17:58 -07:00
Eric Fischer 11c6c869aa Include a creator field in tileset metadata with the Tippecanoe version
Also finally eradicates binary diffs from the tests
2018-06-07 11:20:12 -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 7128ac44d5 Track layer description as part of the tilestats 2018-05-24 10:27:43 -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 3c827b1d68 Use the standard JSON writer when writing metadata.json 2018-03-16 15:35:26 -07:00
Eric Fischer ebb0334ef0 Use the standard JSON writer for tilestats
With a lot of weird special cases to keep the formatting
exactly like it accidentally was before
2018-03-16 15:19:23 -07:00
Eric Fischer b03dabe098 Add an option for clustering features 2017-12-14 14:30:08 -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 d13e08c9b5 Guard against null keys and values in tileset metadata 2017-10-27 17:38:07 -07:00
Eric Fischer f9a007e8c3 Use milo dtoa for consistent string representation of numbers 2017-08-29 14:44:34 -07:00
Eric Fischer e6fc22187a Tilestats metadata no longer needs to be limited to 60K 2017-08-16 12:53:10 -07:00
Eric Fischer 205c28bb64 Fix tilestats with truncated strings. Trim tilestats if TileJSON is huge 2017-08-15 11:23:03 -07:00
Eric Fischer 372194cee9 Add an option not to produce tilestats 2017-08-15 10:35:41 -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 cc28bbab3a Move the tilestats into the "json" row of the metadata 2017-07-26 09:54:49 -07:00
Eric Fischer a373c2516a Remove debugging code 2017-07-21 13:17:21 -07:00
Eric Fischer 9ec52f2c90 Merge branch 'master' into tilestats 2017-07-21 13:08:33 -07:00
Eric Fischer 7e6d10c2fa In tilestats, truncate and merge layers and attributes with long names 2017-07-21 12:56:30 -07:00
Eric Fischer 62f135a97d Exclude long attribute values from tilestats output, as specified 2017-07-21 12:28:14 -07:00
Eric Fischer 54cbc570f1 Don't write to a directory that contains an existing tileset.
The -f option will clear the directory now, as with mbtiles.
2017-07-20 14:17:09 -07:00
Eric Fischer 855e344552 Don't keep tilestats for features that are filtered out in tile-join 2017-07-19 16:53:53 -07:00
Eric Fischer 97d0b2a1b5 Retain attributes in alphabetical order, for consistency 2017-07-19 16:40:06 -07:00
Eric Fischer 3cafef89f1 Factor out duplicated tilestats code 2017-07-19 14:45:15 -07:00
Eric Fischer 7b03e1ee87 Include tilestats in the metadata table. (Not all tests are passing) 2017-07-19 13:09:47 -07:00
Eric Fischer 9304bc5ca1 Generate the rest of the tilestats 2017-07-18 14:20:33 -07:00
Eric Fischer 3eb1237b0a Progress on generating tilestats as JSON 2017-07-18 13:27:37 -07:00
Eric Fischer 18f9a8dbb7 Close mbtiles properly when exiting because there are no features 2017-07-18 09:54:59 -07:00
Eric Fischer 71f57793fd Derive tilejson attribute types from sample attribute values 2017-07-17 17:31:46 -07:00
Eric Fischer 77bf14bfb0 Track sample values for each attribute in each layer 2017-07-17 13:28:46 -07:00
Eric Fischer b1771a3365 Make layer attributes a map to sample values 2017-07-17 11:58:37 -07:00
Eric Fischer 62ee53992b Track how many features of each type are in each layer 2017-07-14 17:23:41 -07:00
Eric Fischer 94a15eaf85 Merge branch 'master' into plugins 2017-04-07 14:28:58 -07:00
Eric Fischer f558b78380 Include tileset metadata when writing either to directory or mbtiles 2017-04-07 13:25:05 -07:00
Eric Fischer 7d47226444 Merge branch 'master' into plugins 2017-03-28 16:42:22 -07:00
Eric Fischer 1362ac448f Add --description option to set mbtiles description 2017-03-21 11:07:15 -07:00
Eric Fischer fa56adc530 Clean up utility functions that are also used in other projects 2017-03-16 15:06:58 -07:00