[PostGIS] #5758: Documentation bug in SQL query example for ST_AsMVTGeom

PostGIS trac at osgeo.org
Wed Jul 3 23:36:31 PDT 2024


#5758: Documentation bug in SQL query example for ST_AsMVTGeom
-------------------------------+---------------------------
 Reporter:  azakh              |      Owner:  robe
     Type:  defect             |     Status:  new
 Priority:  medium             |  Milestone:  PostGIS 3.4.3
Component:  documentation      |    Version:  3.4.x
 Keywords:  MVT, ST_AsMVTGeom  |
-------------------------------+---------------------------
 Currently:

 {{{
 SELECT ST_AsMVTGeom(
             ST_Transform( geom, 3857 ),
             ST_TileEnvelope(12, 513, 412), extent => 4096, buffer => 64)
 AS geom
   FROM data
   WHERE geom && ST_TileEnvelope(12, 513, 412, margin => (64.0 / 4096))
 }}}

 Should be:

 {{{
 SELECT ST_AsMVTGeom(
             ST_Transform( geom, 3857 ),
             ST_TileEnvelope(12, 513, 412), extent => 4096, buffer => 64)
 AS geom
   FROM data
   WHERE ST_Transform(geom, 3857) && ST_TileEnvelope(12, 513, 412, margin
 => (64.0 / 4096))
 }}}

 Namely, the `geom` column should be transformed both in SELECT and WHERE
 clauses.

 Related issue: https://trac.osgeo.org/postgis/ticket/5198
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5758>
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