<!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=828055612-28082009>My first question, although we have used PostGIS for
more than one year for several projects and are very happy and
impressed.</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009></SPAN> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>We have implemented an area topology editor for
ZIP code areas, i.e. all polygons must completely cover without any holes
("Skin-of-the-Earth").</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>It is implemented in OpenLayers, i.e. builds and edits
client topology in JavaScript, and uses PostGIS functions for merging and
splitting (with a line) areas.</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>We encounter some problems which may be related to
slightly different coordinates and number of vertices for adjacent areas. We
will pin-point the problem when we receive actual examples from the customer.
But we strongly suspect floating-point problems, i.e. the last decimal is random
when stored to the database.</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>The data is imported from an ArcInfo coverage and
checked with PostGIS UNION to be topologically correct (i.e. all polygons have
exact the same coordinates). So the errors should have been introduced in
editing operations. OpenLayers just copies the coordinates as a string so we
suspect the PostGIS split/merge functions.</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009></SPAN> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>I come from the ESRI and Oracle world. Both ArcSDE and
Oracle Spatial have user-defined spatial tolerance for each spatially enabled
layer. This ensures that coordinates are exact, down to the last decimal (or
integer for ArcSDE). </SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>I cannot find in the documentation or in the
functionality that PostGIS has an awareness of spatial tolerance. What I can
find is:</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>"All floating point comparisons within the SQL-MM
implementation are performed to a specified tolerance, currently
1E-8"</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>but nothing about actual storage.</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009></SPAN> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>For me, the easiest solution would be to use a spatial
tolerance. Otherwise, we may need to round all coordinates in the application
code to e.g. 14 valid digits.</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009></SPAN> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009>Best Regards</SPAN></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align=left><SPAN
class=828055612-28082009></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="MS Exchange Server version 6.5.7036.0" name=Generator><!-- Converted from text/plain format --></BODY></HTML>