Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix webmercator X check #44

Merged
merged 2 commits into from
Dec 31, 2024
Merged

Bugfix webmercator X check #44

merged 2 commits into from
Dec 31, 2024

Conversation

rafaqz
Copy link
Member

@rafaqz rafaqz commented Dec 31, 2024

No description provided.

@rafaqz rafaqz merged commit b074da0 into master Dec 31, 2024
4 checks passed
@rafaqz rafaqz deleted the bugfix branch December 31, 2024 09:50
Copy link
Member

@visr visr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Perhaps good to change the assert into an ArgumentError.

@@ -122,7 +122,7 @@ function TileGrid(bbox::Extent, zoom::Int, crs::WGS84)
# Mercantile splits the bbox in two along the antimeridian if this happens.
# Decide if that case should be handled here or before, also considering
# antimeridian discussion in https://github.com/rafaqz/Extents.jl/issues/4
@assert bbox.X[1] < bbox.X[2]
@assert bbox.X[1] <= bbox.X[2]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@assert bbox.X[1] <= bbox.X[2]
if bbox.X[1] > bbox.X[2]
throw(ArgumentError("TileGrid Extent has xmin > xmax"))
end

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry I missed this comment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha I was too late. Though in a way it is unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants