St_AsMVTGeom: Shortcut geometries smaller than the tolerance #288
St_AsMVTGeom drops geometries when they get too small after snapping them to the final grid. With this PR we now try to drop those geometries right away so they don't have to go through
This doesn't have any noticeable performance impact in point datasets or when the geometries are bigger* than the tolerance ( < ±5% performance difference testing whole tile generation), but it's a nice improvement for low zoom tiles (bigger tolerance, more geometries dropped), almost halving some of the timings: mvt_0827_trunk_vs_mvt_0827_shortcut.pdf
*Bigger as in, it's bounding box max size is bigger than the tolerance, which is set to 1/2 * tile_size / tile_extent.
This PR also means a small additional change that can be considered both a drawback or an improvement: Due to how the simplification functions work, some super small geometries could go through the simplification process if they were between grid borders; so for a set of geometries with the same shape and size, some might appear and some don't depending on their position in the grid. With this PR this should be more consistent.
Trac issue: https://trac.osgeo.org/postgis/ticket/4161