[postgis-tickets] [PostGIS] #3742: mvt regress failure on debbie and winnie
PostGIS
trac at osgeo.org
Sun Apr 23 14:29:31 PDT 2017
#3742: mvt regress failure on debbie and winnie
----------------------+----------------------------
Reporter: robe | Owner: Björn Harrtell
Type: defect | Status: assigned
Priority: blocker | Milestone: PostGIS 2.4.0
Component: postgis | Version: trunk
Resolution: | Keywords:
----------------------+----------------------------
Comment (by Björn Harrtell):
Thanks for investigating, very valuable as I still haven't mustered up the
guts to make a move on Debbie (or Winnie, I'm not that picky).
Decoding the output vector tile and compare the expected to the failing in
detail will perhaps give some more info. As of yet I've only done naive
inspection of decoded vector tiles using vector-tile-js but I've just
found a more detailed way to inspect using protoc-c --decode.
The failing test case is:
{{{
SELECT 'TA8', encode(ST_AsMVT('test', 4096, 'geom', q), 'base64') FROM (
SELECT 1 AS c1, ST_AsMVTGeom(ST_GeomFromText('POINT(25 17)'),
ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS
geom
UNION
SELECT 1 AS c1, ST_AsMVTGeom(ST_GeomFromText('POINT(26 18)'),
ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS
geom
UNION
SELECT 2 AS c1, ST_AsMVTGeom(ST_GeomFromText('POINT(26 18)'),
ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)), 4096, 0, false) AS
geom) AS q;
}}}
It creates a tile with three point features. Duplicate values for c1
should only be encoded once and reused.
Decode of the expected binary:
{{{
layers {
name: "test"
features {
tags: 0
tags: 0
type: POINT
geometry: 9
geometry: 50
geometry: 8158
}
features {
tags: 0
tags: 1
type: POINT
geometry: 9
geometry: 52
geometry: 8156
}
features {
tags: 0
tags: 2
type: POINT
geometry: 9
geometry: 52
geometry: 8156
}
keys: "c1"
values {
uint_value: 1
}
values {
uint_value: 1
}
values {
uint_value: 2
}
extent: 4096
version: 2
}
}}}
Decode of the unexpected binary:
{{{
layers {
name: "test"
features {
tags: 0
tags: 0
type: POINT
geometry: 9
geometry: 50
geometry: 8158
}
features {
tags: 0
tags: 0
type: POINT
geometry: 9
geometry: 52
geometry: 8156
}
features {
tags: 0
tags: 1
type: POINT
geometry: 9
geometry: 52
geometry: 8156
}
keys: "c1"
values {
uint_value: 1
}
values {
uint_value: 2
}
extent: 4096
version: 2
}
}}}
On first glance it seems that the expected output is incorrectly
containing redundant encoding of the c1 value. Both are valid tiles but
the unexpected encode is more correct. I think I might have a lead on the
problem here. I fixed it for string values recently but it appears I have
similar issues with numeric values. Will look for a solution when time
permits.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3742#comment:9>
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