Skip to content

Commit 2cc1c09

Browse files
committed
fix bbox_to_affine
1 parent 9688b3a commit 2cc1c09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/geoutils.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ end
5252

5353
function bbox_to_affine(size::Tuple{Integer, Integer}, bbox::NamedTuple{(:min_x, :min_y, :max_x, :max_y),Tuple{Float64, Float64, Float64, Float64}})
5454
AffineMap(
55-
SMatrix{2,2}((bbox.max_x - bbox.min_x) / size[1], 0, 0, (bbox.max_y - bbox.min_y)/size[2]),
56-
SVector(bbox.min_x, bbox.min_y)
55+
SMatrix{2,2}((bbox.max_x - bbox.min_x) / size[1], 0, 0, -(bbox.max_y - bbox.min_y)/size[2]),
56+
SVector(bbox.min_x, bbox.max_y)
5757
)
5858
end
5959

0 commit comments

Comments
 (0)