<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19412"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=652525913-16042013>Hello,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=652525913-16042013></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=652525913-16042013>Did you simply try</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=652525913-16042013></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=652525913-16042013>round(ST_Y(geom), 6) as lat</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=652525913-16042013><SPAN class=652525913-16042013>round(ST_X(geom), 6) as
lon</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=652525913-16042013><SPAN
class=652525913-16042013></SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=652525913-16042013><SPAN
class=652525913-16042013>Hugues.</SPAN></SPAN></FONT></DIV><BR>
<DIV dir=ltr lang=fr class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> postgis-users-bounces@lists.osgeo.org
[mailto:postgis-users-bounces@lists.osgeo.org] <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 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></BODY></HTML>