<div dir="ltr">Perfect! Thank you guys.<div style>Carsten</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/16 Hugues François <span dir="ltr"><<a href="mailto:hugues.francois@irstea.fr" target="_blank">hugues.francois@irstea.fr</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<div dir="ltr" align="left"><span style="FONT-FAMILY:Arial;FONT-SIZE:10pt"><span>And what about round(st_y(geom)::numeric, 6)
?</span></span></div>
<div dir="ltr" align="left"><span style="FONT-FAMILY:Arial;FONT-SIZE:10pt"><span></span></span> </div>
<div dir="ltr" align="left"><span style="FONT-FAMILY:Arial;FONT-SIZE:10pt"><span>Hug</span></span></div>
<div> </div><br>
<div dir="ltr" lang="fr" align="left">
<hr>
<font face="Tahoma"><div class="im"><b>From:</b> <a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a>
[mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Carsten
Hogertz<br></div><b>Sent:</b> Tuesday, April 16, 2013 4:05 PM<br><b>To:</b> PostGIS
Users Discussion<br><b>Subject:</b> Re: [postgis-users] Cut lat/lon to six
decimal digits<br></font><br></div><div><div class="h5">
<div></div>
<div dir="ltr">Thanks.
<div>Indead I did. I also tried </div>
<div><br></div>
<div>trunc(ST_Y(geom), 6)</div>
<div><br></div>
<div>But it gives back:</div>
<div><br></div>
<div>Function round(double precision, integer) does not exist<br></div>
<div><br></div></div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">2013/4/16 Hugues François <span dir="ltr"><<a href="mailto:hugues.francois@irstea.fr" target="_blank">hugues.francois@irstea.fr</a>></span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote"><u></u>
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>Hello,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>Did you simply
try</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>round(ST_Y(geom),
6) as lat</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span><span>round(ST_X(geom), 6) as lon</span></span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span><span></span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span><span>Hugues.</span></span></font></div><br>
<div dir="ltr" lang="fr" align="left">
<hr>
<font face="Tahoma"><b>From:</b> <a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of
</b>Carsten Hogertz<br><b>Sent:</b> Tuesday, April 16, 2013 3:51
PM<br><b>To:</b> PostGIS Users Discussion<br><b>Subject:</b> [postgis-users]
Cut lat/lon to six decimal digits<br></font><br></div>
<div>
<div>
<div></div>
<div dir="ltr">Hi everyone,
<div>I've got the following SQL to extract the lat/lon of a polygone:</div>
<div><br></div>
<div>SELECT </div>
<div>ROW_NUMBER () over () as id, </div>
<div>name, </div>
<div>geom, </div>
<div>ST_Y(geom) as lat, </div>
<div>ST_X(geom) as lon </div>
<div>FROM (SELECT name, (ST_DumpPoints(geom)).* FROM timezones20032013) as
foo</div>
<div><br></div>
<div>It gives me back the lat and lon as a number with a lot of digits,
e.g.:</div>
<div>42.4734992980957</div>
<div>1.71096694469452</div>
<div><br></div>
<div>Instead what I need is:</div>
<div>42.473499</div>
<div>1.710967</div>
<div><br></div>
<div>How could I change my SQL to get the result cut/rounded?</div>
<div><br></div>
<div>Any help would be appreciated.</div>
<div><br></div>
<div>Thanks in advance</div>
<div>Carsten</div></div></div></div></div><br>_______________________________________________<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="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div>