Opened 7 months ago

Closed 4 months ago

#5717 closed defect (duplicate)

ST_AsMVTGeom simplification causing partial LINESTRING to be returned in query

Reported by: mikestrong Owned by: pramsey
Priority: medium Milestone: PostGIS 3.4.3
Component: postgis Version: 3.4.x
Keywords: ST_AsMVTGeom Cc:

Description

Description: We have identified a critical use case in our geospatial modeling where linestring geometries loop back on themselves. This functionality is essential for the accuracy of our models.

Issue: When querying our database to generate Mapbox vector tiles, we observe an excessive simplification of these linestrings. This issue results in geometries where segments are completely missing.

Sample Query Demonstrating the Issue:

SELECT

ST_AsMVTGeom(

ST_GeomFromText('LINESTRING (19095.0221602251 6834858.945857642, 19041.721639571162 6834839.288850678, 18971.562253433633 6834858.544009158, 19041.721639571162 6834839.288850678, 19095.0221602251 6834858.945857642)'), ST_TileEnvelope(17, 65598, 43181), 8192, clip_geom ⇒ false

)

It might be beneficial to introduce an adjustable parameter for controlling the level of simplification, akin to the ST_Simplify tolerance option. Such a feature would provide greater flexibility and precision in managing how geometries are simplified, ensuring accurate rendering of complex linestrings.

Change History (3)

comment:1 by mikestrong, 7 months ago

Summary: ST_AsMVTGeom simplification causing partial LINESTRING to be displayedST_AsMVTGeom simplification causing partial LINESTRING to be returned in query

comment:2 by robe, 7 months ago

Milestone: PostGIS 3.4.3

We recently addressed something which sounds similar to your case at #5654. I haven't confirmed it fixes your issue.

comment:3 by pramsey, 4 months ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.