[postgis-tickets] [PostGIS] #4161: St_AsMVTGeom: Shortcut geometries smaller than the tolerance
PostGIS
trac at osgeo.org
Mon Aug 27 09:10:49 PDT 2018
#4161: St_AsMVTGeom: Shortcut geometries smaller than the tolerance
-------------------------+---------------------------
Reporter: Algunenano | Owner: Algunenano
Type: enhancement | Status: assigned
Priority: medium | Milestone: PostGIS 3.0.0
Component: postgis | Version: trunk
Keywords: |
-------------------------+---------------------------
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
lwgeom_remove_repeated_points_in_place + lwgeom_simplify_in_place +
lwgeom_clip_by_rect + lwgeom_affine + lwgeom_grid_in_place unnecessarily.
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.
*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.
PR (WIP): https://github.com/postgis/postgis/pull/288
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4161>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list