<div dir="ltr">Hi,<br><br>World equator width is known in EPSG:3857 Mercator (delete/upgrade the software that calls it 900913) and pixels at the zoom you're interested in.<br>I've got these in my .psqlrc, so that I can write ST_Buffer(geom, 20 * :at_z12) to buffer something 20px at z12:<br><br>\set at_z12 38.22<div>\set at_z11 76.44</div><div>\set at_z10 152.87</div><div>\set at_z9 305.75</div><div>\set at_z8 611.5</div><div>\set at_z7 1222.99</div><div>\set at_z6 2445.98</div><div>\set at_z5 4891.97</div><div>\set at_z4 9783.94</div><div>\set at_z3 19567.88</div><div>\set at_z2 39135.76</div><div>\set at_z1 78271.52</div><div>\set at_z0 156543.04</div></div><br><div class="gmail_quote"><div dir="ltr">сб, 13 мая 2017 г. в 2:59, Hemant Bist <<a href="mailto:hemantbist@gmail.com">hemantbist@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div>I want to figure out how big a geometry (line, polygon) is in osm map for a given zoomlevel. i.e. length of the line, area of the polygon.</div><div>The data is stored in  lan/lon coordinates (EPSG:4326). I know I can do something like st_area(st_transform(geometry, 900913)) to get the</div><div>numbers in a other projections. But I am not sure if there is some magical projection number for each osm zoomlevel.</div><div>I will appreciate any pointers for this.</div><div><br></div><div>1) I am not sure if there is a relation between area in 900913 projection and x,y coordinates for osm.</div><div><br></div><div>2) If someone has written some pl/sql or any other language utilities to do that,  I can use them as well. I am not necessarily looking for an</div><div>easy solution...</div><div><br></div><div>3) Here are actual functions that describe how to map the lat  lon to x, y coordinates for a osm zoomlevel. If I remove the int rounding from the following osm link, I would get the x,y coordiantes for a given lat/lon for a given zoomlevel.</div><a href="http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Python" target="_blank">http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Python</a><br><div><br></div><div>Best regards,</div><div>Hemant Bist.</div><div><br></div><div><br></div></div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div>