<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16850" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=293514706-31082009><FONT color=#0000ff>Thanks.</FONT></SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=293514706-31082009><FONT color=#0000ff></FONT></SPAN> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=293514706-31082009><FONT color=#0000ff>SnapToGrid used in a trigger
should, as far as I understand, act as a layer spatial
tolerance.</FONT></SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=293514706-31082009><FONT color=#0000ff>Then we "just" need to ensure that
all editing operations act accordingly, i.e. not shift any coordinate outside of
the selected tolerance.</FONT></SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=293514706-31082009><FONT color=#0000ff></FONT></SPAN> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=293514706-31082009><FONT color=#0000ff>Best Regards</FONT></SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=293514706-31082009><FONT color=#0000ff></FONT></SPAN> </DIV>
<HR color=#d70005 SIZE=1>
<DIV></DIV>
<DIV style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Verdana"
align=left></DIV>
<DIV style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Verdana" align=left>
<TABLE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; WIDTH: 600px; PADDING-TOP: 0px"
cellSpacing=0>
<TBODY style="FONT-SIZE: 7pt; FONT-FAMILY: Verdana">
<TR vAlign=top>
<TD style="WIDTH: 200px">
<DIV style="FONT-SIZE: 8pt"><B>Andreas Oxenstierna</B></DIV>
<DIV style="FONT-SIZE: 7pt"><BR>Telefon direkt 040-16 70 17 <BR>Mobil
0734-12 80 17 <BR>andreas.oxenstierna@sweco.se</DIV></TD>
<TD style="WIDTH: 200px">
<DIV style="FONT-SIZE: 8pt"><B>Sweco Position AB</B><BR></DIV>
<DIV style="FONT-SIZE: 7pt">Hans Michelsensgatan 2<BR>Box 286<BR>201 22
Malmö<BR>Telefon 040-16 70 00<BR>www.sweco.se</DIV></TD>
<TD style="WIDTH: 103px">
<DIV style="FONT-SIZE: 3pt" align=right><BR> <BR></DIV>
<DIV style="FONT-SIZE: 7pt"
align=right><BR><BR></DIV></TD></TR></TBODY></TABLE></DIV>
<DIV style="FONT-SIZE: 7pt; COLOR: #000000; FONT-FAMILY: Verdana"
align=left></DIV></DIV>
<META content="MSHTML 6.00.6000.16850" name=GENERATOR><!-- Converted from text/plain format -->
<P><FONT size=2><BR><BR>-----Ursprungligt meddelande-----<BR>Från:
postgis-users-bounces@postgis.refractions.net [<A
href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</A>]
För Picavet Vincent<BR>Skickat: den 28 augusti 2009 15:22<BR>Till: PostGIS Users
Discussion<BR>Ämne: Re: [postgis-users] PostGIS layer spatial
tolerance<BR><BR>Hi,<BR><BR>> I come from the ESRI and Oracle world. Both
ArcSDE and Oracle Spatial<BR>> have user-defined spatial tolerance for each
spatially enabled layer.<BR>> This ensures that coordinates are exact, down
to the last decimal (or<BR>> integer for ArcSDE).<BR>> I cannot find in
the documentation or in the functionality that<BR>> PostGIS has an awareness
of spatial tolerance. What I can find is:<BR>> "All floating point
comparisons within the SQL-MM implementation are<BR>> performed to a
specified tolerance, currently 1E-8"<BR>> but nothing about actual
storage.<BR><BR>A solution in order to take spatial tolerance into account,
despite not being automated, would be to systematically use the st_snaptogrid
postgis function when creating or modifying geometries.<BR><BR><A
href="http://postgis.refractions.net/docs/ST_SnapToGrid.html">http://postgis.refractions.net/docs/ST_SnapToGrid.html</A><BR><BR>If
you want a certain level of automation of this process, you should consider
writing a trigger which snaps geometries to a specified grid on insert or
update.<BR><BR>This is probably better than rounding coordinate in the
application code.<BR><BR>Regards,<BR>Vincent<BR><BR>> <BR>> For me,
the easiest solution would be to use a spatial tolerance.<BR>> Otherwise, we
may need to round all coordinates in the application<BR>> code to e.g. 14
valid digits.<BR>> <BR>> Best Regards<BR>> <BR>>
________________________________<BR>><BR>> Andreas
Oxenstierna<BR>><BR>> Telefon direkt 040-16 70 17<BR>> Mobil 0734-12 80
17<BR>> andreas.oxenstierna@sweco.se<BR>> Sweco Position
AB<BR>><BR>> Hans Michelsensgatan 2<BR>> Box 286<BR>> 201 22
Malmö<BR>> Telefon 040-16 70 00<BR>>
www.sweco.se<BR>><BR>> <BR>><BR>><BR>><BR>><BR>_______________________________________________<BR>postgis-users
mailing list<BR>postgis-users@postgis.refractions.net<BR><A
href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR></FONT></P></BODY></HTML>