1

PostGIS now comes with a set of functions that allow to generate Mapbox Vector Tiles. Among them, the ST_AsMVTGeom allows to transform a geometry into the coordinate space of a tile (typically 4096x4096). Given a geometry containing consecutive points that falls onto the same coordinate after transformation, does the function perform simplication on the fly, or should the ST_Simplify function be called beforehand?

  • Have you experimented to see if there was a difference or reviewed the source? – Vince Jan 22 at 0:54
1

Such points get collapsed:

SELECT ST_AsText(ST_AsMVTGeom(ST_GeomFromText('LINESTRING(0 0, 0 0.1, 1 1)'),
                              ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096))));

         st_astext
---------------------------
 LINESTRING(0 4096,1 4095)

LINESTRING(0 0, 0 0.1) results in NULL, so I don't know why the documentation says that it "might collapse geometry into a lower dimension".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.