Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#4294 closed enhancement (fixed)

ST_AsMVTGeom: Do resolution check before deserializing

Reported by: Algunenano Owned by: Algunenano
Priority: medium Milestone: PostGIS 3.0.0
Component: postgis Version: master
Keywords: Cc:

Description

In #4161 I added a shortcut to drop small lines and polygons before any call to the simplification process. I've now noticed that this check could be done before deserializing the geometry since all you need is the geometry type and bounding box.

I'll try to move this check to ST_AsMVTGeom (C function) before the lwgeom_from_gserialized call and measure its impact in this kind of input.

Change History (3)

comment:1 by Algunenano, 6 years ago

PR in https://github.com/postgis/postgis/pull/358 @Komzpa thanks a lot for the comments.

After the changes, on the very best case (polygons with low amount of vertices that are removed by this shortcut), postgis code only amounts to ~6.75% of the time, or 14.45% if we count its children. Any further improvement for this case will need to come from the Postgres side (or something like #4264).

comment:2 by algunenano, 6 years ago

Resolution: fixed
Status: assignedclosed

In 17148:

ST_AsMVTGeom: Do resolution check before deserializing

Closes #4294
Closes https://github.com/postgis/postgis/pull/358

comment:3 by algunenano, 6 years ago

In 17219:

ST_AsMVTGeom: Fix bug that oversimplified vertical or horizontal lines

References #4294
Closes https://github.com/postgis/postgis/pull/367

Note: See TracTickets for help on using tickets.