[postgis-users] ST_3dintersects returns false for linestrings pairs with touching vertex

Nicklas Avén nicklas.aven at jordogskog.no
Fri Nov 13 04:41:22 PST 2020


I filed a ticket and a Merge Request


https://trac.osgeo.org/postgis/ticket/4790



ATB


Nicklas



On 11/13/20 8:18 AM, Nicklas Avén wrote:
>
> Hi Alexandre
>
>
> This seems to be a bug caused by some floating point error or some mis 
> handling of the coordinates.
>
>
> In 3D the intersects function just wrapps ST_3DDistance and checks if 
> it returns 0.
>
> So when trying with the same geometries with ST_3DDistance instead it 
> returns 3.638977870632214e-12
>
>
> I will take a look at it.
>
>
> Could you please file a ticket?
>
>
> ATB
>
>
> Nicklas Avén
>
>
>
> On 11/12/20 2:46 AM, Alexandre Neto wrote:
>> Hi,
>>
>> I am having a strange issue with st_3dintersects. I have two 
>> linestring that share the same end vertex. Nevertheless, using 
>> ST_3dintersects returns false.
>>
>>       SELECT ST_3dintersects(st_geometryfromtext('LINESTRING Z 
>> (-27922.1593 -110233.7616 147.2259,-27928.084 -110230.8462 
>> 147.3629,-27930.6374 -110229.9248 147.3629,-27931.6207 -110229.587 
>> 147.3094,-27932.3841 -110229.275 147.3676,-27933.1861 -110228.9467 
>> 147.4365,-27937.0309 -110227.3638 147.7729,-27937.7892 -110227.0474 
>> 147.8412,-27938.6259 -110226.6885 147.9075,-27939.4617 -110226.3287 
>> 147.9663,-27943.6905 -110224.5169 148.2353,-27944.5442 -110224.1538 
>> 148.2687,-27945.6634 -110223.6871 148.2849,-27946.7835 -110223.2224 
>> 148.2982,-27952.3498 -110220.9011 148.3594,-27953.4568 -110220.4353 
>> 148.3756,-27966.8502 -110214.6482 148.7361,-27969.516 -110213.4996 
>> 148.7961,-27972.1805 -110212.3494 148.8566,-27974.1264 -110211.5032 
>> 148.9768,-27975.4229 -110210.9441 149.0093)'),
>>       st_geometryfromtext('LINESTRING Z (-28001.1829 -110201.8973 
>> 149.4396,-28000.3665 -110199.7073 149.3765,-27995.4183 -110201.8041 
>> 149.3354,-27975.4229 -110210.9441 149.0093)'))
>>
>> Any idea what could be happening in here?
>>
>> Thanks,
>>
>> Alexandre Neto
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201113/9c2534d3/attachment.html>


More information about the postgis-users mailing list