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