[postgis-users] How to use ST_AsMVT to serve MVT to web clients?
Björn Harrtell
bjorn.harrtell at gmail.com
Sat Aug 26 01:44:40 PDT 2017
Seems you found a solution, but to be clear the second argument to
ST_AsMVTGeom should be the geographic coordinates and the docs should
probably refer to "geographic bounds" rather than "geometric bounds".
/Björn
2017-08-06 17:05 GMT+02:00 zimmicz <zimmicz+nabble at gmail.com>:
> Moved a bit forward and got stuck with
> [ST_AsMVTGeom](https://postgis.net/docs/manual-dev/ST_AsMVTGeom.html).
>
> All the tile queries sent to PostGIS looks like
>
> SELECT
> name,
> ST_AsText(ST_AsMVTGeom(
> geom,
> ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)),
> 4096,
> 0,
> false
> )) geom
> FROM cadastre_area
> WHERE ST_Intersects(geom, (SELECT
> ST_Transform(ST_SetSRID(ST_MakeEnvelope(17.55615234375,
> 48.980216985374994,
> 17.578125, 48.99463598353408), 4326), 3857)))
>
> I'm not really sure what the second argument stands for. The docs say
> "bounds is the geometric bounds of the tile contents without buffer." So
> are
> these the abstract coordinates of the tile space, or geographic ones
> (defined in 3857?).
>
> The queries now pass just fine, but return the data shifted to the south of
> the map.
>
>
>
> --
> View this message in context: http://postgis.17.x6.nabble.
> com/How-to-use-ST-AsMVT-to-serve-MVT-to-web-clients-tp5011416p5011417.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170826/9f5f66a0/attachment.html>
More information about the postgis-users
mailing list