mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-03 00:45:41 +02:00
* Add an option to generate label points in place of polygons * Change all these places where I said "extent" but really meant "area" * Revert "Change all these places where I said "extent" but really meant "area"" This reverts commit403828d2f7. * Add --order-smallest-first and --order-largest-first options * Use Turf's center-of-mass algorithm for polygon label points * If the label point isn't within the polygon, find one that is * Don't choose a label point that is too close to a border * Try a little harder to find an optimal label point * Checkerboard which tiles labels are generated in, to reduce adjacency * Use a label point for the general representative point for polygons (Skipping the iteration to find one that is as far as possible from the borders) This makes the labels look better in many cases (like France at z1) but unfortunately ripples into changing the sequence of polygons in many tests, so the diff is big. * Revert "Use a label point for the general representative point for polygons" This reverts commit2261adf05e. * Checkpoint work on spiral labels * Clip label spirals to the feature bounds * Fix label test * Be careful not to place spiral labels too close to borders either * For spiral anchors, only check tile scale, not feature size * Update test * Only try to find a central label point for the largest ring * In tiny polygon dust, keep the attributes of the largest feature
54 lines
1.8 KiB
C++
54 lines
1.8 KiB
C++
#ifndef OPTIONS_HPP
|
|
#define OPTIONS_HPP
|
|
|
|
#define A_COALESCE ((int) 'c')
|
|
#define A_REVERSE ((int) 'r')
|
|
#define A_REORDER ((int) 'o')
|
|
#define A_LINE_DROP ((int) 'l')
|
|
#define A_DEBUG_POLYGON ((int) '@')
|
|
#define A_POLYGON_DROP ((int) 'p')
|
|
#define A_DETECT_SHARED_BORDERS ((int) 'b')
|
|
#define A_PREFER_RADIX_SORT ((int) 'R')
|
|
#define A_CALCULATE_FEATURE_DENSITY ((int) 'g')
|
|
#define A_INCREASE_GAMMA_AS_NEEDED ((int) 'G')
|
|
#define A_MERGE_POLYGONS_AS_NEEDED ((int) 'm')
|
|
#define A_DROP_DENSEST_AS_NEEDED ((int) 's')
|
|
#define A_DROP_FRACTION_AS_NEEDED ((int) 'd')
|
|
#define A_DROP_SMALLEST_AS_NEEDED ((int) 'n')
|
|
#define A_COALESCE_DENSEST_AS_NEEDED ((int) 'S')
|
|
#define A_COALESCE_SMALLEST_AS_NEEDED ((int) 'N')
|
|
#define A_COALESCE_FRACTION_AS_NEEDED ((int) 'D')
|
|
#define A_GRID_LOW_ZOOMS ((int) 'L')
|
|
#define A_DETECT_WRAPAROUND ((int) 'w')
|
|
#define A_EXTEND_ZOOMS ((int) 'e')
|
|
#define A_CLUSTER_DENSEST_AS_NEEDED ((int) 'C')
|
|
#define A_GENERATE_IDS ((int) 'i')
|
|
#define A_CONVERT_NUMERIC_IDS ((int) 'I')
|
|
#define A_HILBERT ((int) 'h')
|
|
#define A_VISVALINGAM ((int) 'v')
|
|
#define A_GENERATE_POLYGON_LABEL_POINTS ((int) 'P')
|
|
|
|
#define P_SIMPLIFY ((int) 's')
|
|
#define P_SIMPLIFY_LOW ((int) 'S')
|
|
#define P_SIMPLIFY_SHARED_NODES ((int) 'n')
|
|
#define P_SINGLE_PRECISION ((int) 'N')
|
|
#define P_FEATURE_LIMIT ((int) 'f')
|
|
#define P_KILOBYTE_LIMIT ((int) 'k')
|
|
#define P_DYNAMIC_DROP ((int) 'd')
|
|
#define P_INPUT_ORDER ((int) 'i')
|
|
#define P_POLYGON_SPLIT ((int) 'p')
|
|
#define P_CLIPPING ((int) 'c')
|
|
#define P_DUPLICATION ((int) 'D')
|
|
#define P_TINY_POLYGON_REDUCTION ((int) 't')
|
|
#define P_TILE_COMPRESSION ((int) 'C')
|
|
#define P_TILE_STATS ((int) 'g')
|
|
#define P_USE_SOURCE_POLYGON_WINDING ((int) 'w')
|
|
#define P_REVERSE_SOURCE_POLYGON_WINDING ((int) 'W')
|
|
#define P_EMPTY_CSV_COLUMNS ((int) 'e')
|
|
#define P_BASEZOOM_ABOVE_MAXZOOM ((int) 'b')
|
|
|
|
extern int prevent[256];
|
|
extern int additional[256];
|
|
|
|
#endif
|