Opened 6 years ago
Closed 3 years ago
#4310 closed enhancement (wontfix)
Improve MVT vectortile_layer_combine to remove duplicates
Reported by: | Algunenano | Owned by: | Algunenano |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS Fund Me |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
In the current parallel implementation of ST_AsMVT we combine layers by copying both keys and values from both layers on top of each other.
This is fast but introduces the possibility of duplicates (both in keys and values), which is discouraged in the v2 spec. This means that the final tiles end up being bigger than they should, and might create issues with decoders that incorrectly rely on the keys to be unique (e.g: https://github.com/mapbox/vector-tile/issues/55).
We should look for a performant way to merge the layers removing duplicates, if possible.
Also, that part of the code isn't currently being tested, so we'd need to look for the proper way to do it (raising costs for the test or disabling certain plans).
Change History (4)
comment:1 by , 6 years ago
comment:2 by , 5 years ago
Milestone: | PostGIS 3.0.0 → PostGIS 3.1.0 |
---|
I'd rather not rush this now. Also, a new spec in in progress (soon TM) which changes how some things are stored so this could tackled at the same time.
comment:3 by , 4 years ago
Milestone: | PostGIS 3.1.0 → PostGIS Fund Me |
---|
comment:4 by , 3 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Situational and nobody ever complained. Closing it
I very much wanted to bring MVT into liblwgeom so all the testing could be in Cunit, but never did land those changes… it's somewhat large, involves an LWFEATURE concept so that whole rows can be passed over from the db side to the liblwgeom side, which also seems to unavoidably involve copying the attribute values once. So it's not ideal from a performance point-of-view, but would make testing way easier and allow some infra in the MVT/Geobuf code to be shared.