Skip to content

Commit

Permalink
Debugging finding the bounds of Tilted Regions
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Jul 26, 2024
1 parent c39a4a8 commit e567197
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/georegions/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function show(io::IO, geo::TiltRegion)
" Position (X,Y) : ",[geo.X,geo.Y], '\n',
" Size (ΔX,ΔY) : ",[geo.ΔX,geo.ΔY], '\n',
" Tilt (θ) : ",[geo.θ], '\n',
" Bounds (N,S,E,W) : ",[geo.N,geo.S,geo.E,geo.W], '\n',
" (is180,is360) : ",(geo.is180,geo.is360),"\n",
)
end
Expand Down
7 changes: 2 additions & 5 deletions src/georegions/tilt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ function getTiltBounds(
θ :: Real;
)

W = X - ΔX * cosd(θ)
E = X + ΔX * cosd(θ)
S = Y - ΔY * sind(θ)
N = Y + ΔY * sind(θ)
lon,lat = getTiltShape(X,Y,ΔX,ΔY,θ)

return N,S,E,W
return maximum(lat), minimum(lat) , maximum(lon), minimum(lon)

end

Expand Down

0 comments on commit e567197

Please sign in to comment.