Opened 11 months ago

Last modified 3 months ago

#5654 closed defect

Missing line segment with self-intersection and MVT — at Version 1

Reported by: mhkeller Owned by: pramsey
Priority: medium Milestone: PostGIS 3.4.3
Component: postgis Version: 3.4.x
Keywords: mvt, self-intersection Cc: mhkeller

Description (last modified by pramsey)

I'm trying to generate a vector tile layer of a linestring consisting of four points (you could use more than four points but this is just a simplified example). Here is the linestring in geojson (https://gist.github.com/mhkeller/9a65553c28d5063b45817b7d996b59c3)

The second and the fourth points are the same, so the line doubles back on itself. When I use this query (https://gist.github.com/mhkeller/05d7eafc43966a2b3b5b2d41784b300b) in a tile server, the third point in the line string is missing.

I've made a full but simple reproduction with photos here: https://github.com/mhkeller/postgis-line-repro

I also tried using the dirt-simple-postgis-http-api (https://github.com/tobinbradley/dirt-simple-postgis-http-api) instead of the one I wrote and I get the same result.

However, if I generate the tiles using geojson2mvt (https://github.com/NYCPlanning/labs-geojson2mvt), the line renders correctly. A stack exchange user reported that generating the tiles with MapTiler also renders the line correctly (https://gis.stackexchange.com/questions/471851/missing-line-segment-when-serving-a-vector-tile-from-postgis#comment772175_471851).

Change History (1)

comment:1 by pramsey, 10 months ago

Description: modified (diff)

In what XYZ tile address do you see the effect? All at all Z scales? Multiple Z scales? One? A useful repro from my PoV is a piece of SQL that generates an obviously wrong tile.

Note: See TracTickets for help on using tickets.