tippecanoe/geometry.hh
Eric Fischer 241d96e57c Save a few more bytes per geometry in the temporary file
by using bytes instead of ints for the drawing operations
2014-11-05 14:37:54 -08:00

26 lines
731 B
C++

struct draw {
signed char op;
long long x;
long long y;
int necessary;
draw(int op, long long x, long long y) {
this->op = op;
this->x = x;
this->y = y;
}
draw() { }
};
typedef std::vector<draw> drawvec;
drawvec decode_geometry(char **meta, int z, unsigned tx, unsigned ty, int detail);
void to_tile_scale(drawvec &geom, int z, int detail);
drawvec remove_noop(drawvec geom, int type);
drawvec clip_poly(drawvec &geom, int z, int detail, int buffer);
drawvec reduce_tiny_poly(drawvec &geom, int z, int detail, bool *reduced, double *accum_area);
drawvec clip_lines(drawvec &geom, int z, int detail, long long buffer);
drawvec simplify_lines(drawvec &geom, int z, int detail);
drawvec reorder_lines(drawvec &geom);