[postgis-users] Is there any way to find and select parallel lines in 3D?

Shaozhong SHI shishaozhong at gmail.com
Fri Feb 25 02:35:58 PST 2022


Is there any example of implementation for segments to have a look at?

For 2D lines, it is possible to ST_buffer to detect potentially parallel
lines.  That is useful since natural lines do not necessarily in parallel
exactly.

Is there any equivalent to ST_Buffer for dealing with 3D objects?

Regards,

David

On Fri, 25 Feb 2022 at 09:30, Marcin Mionskowski <
mionskowskimarcin at gmail.com> wrote:

> It's easy for segments. Just use general math approach (for example first
> hit with duckduckgo search for line equation 3d -
> https://www.geeksforgeeks.org/equation-of-a-line-in-3d/).
> This is not so simple for linestrings composed from multiple segments.
> For exapmle, are the following lines parallel?
> select ST_GeomFromText('LINESTRING(0 0 0,0 0 4)') geomA
> ,ST_GeomFromText('LINESTRING(0 -1 0,1 0 1,0 1 2,-1 0 3,0 -1 4)') geomB
>
> czw., 24 lut 2022 o 10:53 Shaozhong SHI <shishaozhong at gmail.com>
> napisał(a):
>
>> The following is interesting.
>>
>> How to select parallel lines in postgis - Geographic Information Systems
>> Stack Exchange
>> <https://gis.stackexchange.com/questions/224937/how-to-select-parallel-lines-in-postgis>
>>
>> However, it appears to be full 2D lines.
>>
>> Are there any solutions to find and select parallel lines in 3D?
>>
>> Regards,
>>
>> David
>> _______________________________________________
>> 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/20220225/73e33ee2/attachment.html>


More information about the postgis-users mailing list