[PostGIS] #5717: ST_AsMVTGeom simplification causing partial LINESTRING to be displayed

PostGIS trac at osgeo.org
Fri Apr 19 12:11:57 PDT 2024


#5717: ST_AsMVTGeom simplification causing partial LINESTRING to be displayed
--------------------------+---------------------
 Reporter:  mikestrong    |      Owner:  pramsey
     Type:  defect        |     Status:  new
 Priority:  medium        |  Milestone:
Component:  postgis       |    Version:  3.4.x
 Keywords:  ST_AsMVTGeom  |
--------------------------+---------------------
 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.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5717>
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