Skip to content

Commit

Permalink
fix GeodesyGlobeTransform constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Nov 20, 2024
1 parent 639c3ef commit 0af0c67
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/sphere/globetransform.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,18 @@ struct GeodesyGlobeTransform{CoordType, T} <: GlobeTransform
end


function GeodesyGlobeTransform(dest::Geodesy.Ellipsoid, src::Type{Geodesy.LLA})
return GeodesyGlobeTransform{src}(Geodesy.ECEFfromLLA(dest), zlevel)
function GeodesyGlobeTransform(dest::Geodesy.Ellipsoid, src::Type{Geodesy.LLA}, zlevel)
transf = Geodesy.ECEFfromLLA(dest)
return GeodesyGlobeTransform{src, typeof(transf)}(transf, zlevel)
end


function GeodesyGlobeTransform(dest::Geodesy.Ellipsoid, src::Type{Geodesy.UTM})
return GeodesyGlobeTransform{src}(Geodesy.ECEFfromUTM(dest), zlevel)
function GeodesyGlobeTransform(dest::Geodesy.Ellipsoid, src::Type{Geodesy.UTM}, zlevel)
transf = Geodesy.ECEFfromUTM(dest)
return GeodesyGlobeTransform{src, typeof(transf)}(transf, zlevel)
end

function GeodesyGlobeTransform(dest::Geodesy.Ellipsoid, src::Type{Geodesy.UTMZ})
function GeodesyGlobeTransform(dest::Geodesy.Ellipsoid, src::Type{Geodesy.UTMZ}, zlevel)
return GeodesyGlobeTransform{src}(Geodesy.ECEFfromUTMZ(dest), zlevel)
end

Expand Down

0 comments on commit 0af0c67

Please sign in to comment.