Skip to content

Commit 03012dd

Browse files
committed
Make UnitSphericalPoints reconstruct to themselves even in the two arg case (trait, point)
This didn't happen earlier meaning that "caching" did not work
1 parent 5977c7b commit 03012dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils/UnitSpherical/point.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ UnitSphericalPoint(p::UnitSphericalPoint) = p
5555
## handle the GeoInterface case, this is the catch-all method
5656
UnitSphericalPoint(v) = UnitSphericalPoint(GI.trait(v), v)
5757
UnitSphericalPoint(::GI.PointTrait, v) = UnitSphereFromGeographic()(v) # since it works on any GI compatible point
58+
UnitSphericalPoint(::GI.PointTrait, v::UnitSphericalPoint) = v
5859
## finally, handle the case where a vector is passed in
5960
## we may want it to go to the geographic pipeline _or_ direct materialization
6061
Base.@propagate_inbounds function UnitSphericalPoint(v::AbstractVector{T}) where T

0 commit comments

Comments
 (0)