Given some arbitrary geometry in the standard ESPG-4326 (latitude & longitude), that was converted to an MVT tile geometry with ST_AsMvtGeom()
postgis function (in web mercator 3857), I need to convert it back to the 4326 using postgis functionality.
select st_astext(
st_asmvtgeom(
st_transform(ST_GeomFromText('POINT(-73.985130 40.748817)', 4326), 3857),
st_tileenvelope(8, 75, 96),
extent := 4096, buffer := 0, clip_geom := true));
The above returns POINT(1591 890)
. I need to write a similar SQL statement to convert it back to POINT(-73.985130 40.748817)
using the inputs of 'POINT(1591 890)', 8, 75, 96
(geometry + tile coordinates). The result would obviously be slightly different from the original.