<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html;">
<title>Scalix message content</title>
<style type="text/css">
<!--
.Normal {  text-align: left; text-indent:0pt; margin-top:0pt; margin-bottom:0pt; font-family: Arial; font-size: 12pt; }
.Default_Paragraph_Font {font-family: Arial; color: Black; background-color: white ; font-size: 12pt; font-weight: normal;  font-style: normal; font-variant: normal; vertical-align: normal; text-decoration: none;}
div.ltTOCtitle { font-family: Verdana; font-size: 8pt; font-weight: bold; text-align: center;}
div.ltTOCl1 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:32pt; text-indent:-32pt;}
div.ltTOCl2 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:40pt; text-indent:-32pt;}
div.ltTOCl3 {  font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:48pt; text-indent:-32pt;}
div.ltTOCl4 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:56pt; text-indent:-32pt;}
div.ltTOCl5 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:64pt; text-indent:-32pt;}
div.ltTOCl6 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:72pt; text-indent:-32pt;}
-->
</style>
</head>

<body>
<div class="Normal"><span style='font-size: 10pt; '>Martin, Nicklas</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Thank you for your
responses. To avoid precision problems I modified my query to:</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>select
st_intersection(st_snaptogrid(a.the_geom,0.01), st_snaptogrid(b.the_geom,0.01)),
a.myid</span><br><span style='font-size: 10pt; '>from aline1 as a, aline2 as
b</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>As the result I do get a
MULTIPOINT geometry with three points. These points are exactly the vertex
points of my expected LINESTRING geometry. Why not a LINESTRING?</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Regards</span><br><span style='font-size: 10pt; '>Horst</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>------------------------------------------------</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Dr. Horst
Düster</span><br><span style='font-size: 10pt; '>Stv. Amtschef /
GIS-Koordinator </span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Kanton
Solothurn</span><br><span style='font-size: 10pt; '>Bau- und
Justizdepartement</span><br><span style='font-size: 10pt; '>Amt für
Geoinformation</span><br><span style='font-size: 10pt; '>SO!GIS
Koordination</span><br><span style='font-size: 10pt; '>Rötistrasse
4</span><br><span style='font-size: 10pt; '>CH-4501 Solothurn</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Telefon ++41(0)32 627 25
32</span><br><span style='font-size: 10pt; '>Telefax ++41(0)32 627 22
14</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>mailto:horst.duester@bd.so.ch</span><br><span style='font-size: 10pt; '>http://www.agi.so.ch</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>-----Ursprüngliche
Nachricht-----</span><br><span style='font-size: 10pt; '>Von: Martin Davis
[mailto:mbdavis@refractions.net]</span><br><span style='font-size: 10pt; '>Gesendet
am: Dienstag, 15. September 2009
17:54</span><br><span style='font-size: 10pt; '>An: PostGIS Users Discussion;
Martin Davis</span><br><span style='font-size: 10pt; '>Betreff: Re:
[postgis-users] st_intersection error</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Same result in
JTS.</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>As Nicklas points out, this
is a problem of precision.  The software is
</span><br><span style='font-size: 10pt; '>working as designed, but it's not
designed to use it to perform
</span><br><span style='font-size: 10pt; '>intersections with a
tolerance.</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>Some more sophisticated
approach is required, such as vertex snapping
</span><br><span style='font-size: 10pt; '>the lines to a given tolerance, or
perhaps using a narrow buffer and
</span><br><span style='font-size: 10pt; '>some sort of segment-based
containment tests.</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>strk
wrote:</span><br><span style='font-size: 10pt; '>> On Tue, Sep 15, 2009 at
11:32:48AM +0200, Düster Horst
wrote:</span><br><span style='font-size: 10pt; '>>  
</span><br><span style='font-size: 10pt; '>>>
strk</span><br><span style='font-size: 10pt; '>>></span><br><span style='font-size: 10pt; '>>>
I attached the geometries in my initial
mail.</span><br><span style='font-size: 10pt; '>>></span><br><span style='font-size: 10pt; '>>>
Take a look at aline1.sql and
aline2.sql</span><br><span style='font-size: 10pt; '>>>    
</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
I confirm a POINT and a LINESTRING in a
COLLECTION</span><br><span style='font-size: 10pt; '>> is returned by
ST_Intersection() with latest
version:</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
POSTGIS="1.5.0SVN" GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.6.0, 21 Dec 2007"
USE_STATS</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
Martin, how about JTS
?</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
--strk;
</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
Free GIS & Flash consultant/developer      ()  ASCII Ribbon
Campaign</span><br><span style='font-size: 10pt; '>> 
http://foo.keybit.net/~strk/services.html  /\  Keep it simple!
</span><br><span style='font-size: 10pt; '>></span><br><span style='font-size: 10pt; '>>
</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>--
</span><br><span style='font-size: 10pt; '>Martin
Davis</span><br><span style='font-size: 10pt; '>Senior Technical
Architect</span><br><span style='font-size: 10pt; '>Refractions Research,
Inc.</span><br><span style='font-size: 10pt; '>(250) 383-3022</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>_______________________________________________</span><br><span style='font-size: 10pt; '>postgis-users
mailing
list</span><br><span style='font-size: 10pt; '>postgis-users@postgis.refractions.net</span><br><span style='font-size: 10pt; '>http://postgis.refractions.net/mailman/listinfo/postgis-users</span></div>



</body>

</html>