[postgis-devel] ST_Intersection(line,line) error

Rémi Cura remi.cura at gmail.com
Tue Dec 3 10:37:50 PST 2013


Oh cool,
indeed way easier,

Cheers,

Rémi-C


2013/12/3 Paul Ramsey <pramsey at cleverelephant.ca>

> Another workaround is to slightly buffer one of the lines
>
> --
> http://postgis.net
> http://cleverelephant.ca
>
>
> On December 3, 2013 at 9:36:25 AM, Rémi Cura (remi.cura at gmail.com<//remi.cura at gmail.com>)
> wrote:
>
>  Correction :
> it gives the right extremities, but so the segments between are lost.
>
> A work around is to use ST_Split(line,point) instead,
> while snapping point to line (closestPoint)
> but this is painfull
>
> Cheers,
> Rémi-C
>
>
> 2013/12/3 Rémi Cura <remi.cura at gmail.com>
>
>>   Hey list,
>>
>> ST_Intersection(line,line) seems to be faulty in the above case:
>> It should return a line , but strangely enough it returns multipoints
>> with the correct points of the line it should return.
>>
>> I guess I should be happy to have an answer at all.
>> Any thought?
>> Cheers,
>> Rémi-C
>>
>> SELECT row_number() over() as id,  ST_AsText(ST_Intersection(l1,l2)),
>> ST_Intersection(l1,l2) AS  the_intersection, l1,l2
>>             FROM ST_GeomFromtext(' LINESTRING(1602.31065385555
>> 21488.8919364873,1601.3 21494.4,1598.5 21510.2)') AS l1,
>>             ST_GeomFromText('LINESTRING(1605.3 21472.6,1601.3
>> 21494.4,1601.21138045673 21494.9000674227)') AS l2
>>
>>
>>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20131203/4afd197e/attachment.html>


More information about the postgis-devel mailing list