Skip to content

Commit 6fb0e70

Browse files
committed
Give out points of a linestring
1 parent 98f8f5b commit 6fb0e70

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/geometry_primitives.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ function convert_simplex(::Type{Point{N, T}}, x) where {N, T}
5656
N2 = length(x)
5757
return (Point{N, T}(ntuple(i-> i <= N2 ? T(x[i]) : T(0), N)),)
5858
end
59+
function convert_simplex(::Type{Point{N, T}}, x::Line) where {N, T}
60+
N2 = length(x)
61+
return (Point{N, T}[x[1], x[2]])
62+
end
5963

6064
function convert_simplex(::Type{Vec{N, T}}, x) where {N, T}
6165
N2 = length(x)

0 commit comments

Comments
 (0)