[postgis-tickets] [PostGIS] #5198: Improve Documentation of ST_AsMVTGeom

PostGIS trac at osgeo.org
Wed Aug 3 02:01:39 PDT 2022


#5198: Improve Documentation of ST_AsMVTGeom
---------------------------+---------------------------
 Reporter:  cw             |      Owner:  robe
     Type:  enhancement    |     Status:  new
 Priority:  low            |  Milestone:  PostGIS 3.2.3
Component:  documentation  |    Version:  3.2.x
 Keywords:                 |
---------------------------+---------------------------
 I made a mistake and wrote
 {{{
 SELECT ST_AsMVTGeom(geom, st_transform(ST_TileEnvelope(8, 135, 84), 4326))
 }}}
 instead of
 {{{
 SELECT ST_AsMVTGeom(st_transform(geom, 3857), ST_TileEnvelope(8, 135, 84))
 }}}
 because I thought it would be faster to transform the simple tile than the
 complex geometry.

 This seems to work at first glance, but introduced very small errors which
 were only visible when zooming in more than you would typically zoom in
 such a tile.

 Because it took me a long time to figure this out,
 I would like to change the documentation of ST_AsMVTGeom to clarify two
 things:
 * ST_AsMVTGeom ignores the srid of it's arguments
 * many frameworks expect the 2d tile coordinates to correspond to a
 mercator projection (i.e. SRID 3857)
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5198>
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