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

Make reproject safer across CRS #205

Open
asinghvi17 opened this issue Sep 17, 2024 · 4 comments
Open

Make reproject safer across CRS #205

asinghvi17 opened this issue Sep 17, 2024 · 4 comments

Comments

@asinghvi17
Copy link
Member

asinghvi17 commented Sep 17, 2024

Apparently it can error if your point is completely outside the valid area. Should we make it return:

  • All points NaN
  • An empty geometry
  • A better error
  • Something else
    ?

cc @alex-s-gardner who brought this up on Slack

@alex-s-gardner
Copy link
Contributor

@asinghvi17 what are you defining as a valid area? Is it just anywhere where the algorithm doesn't error?

It would be nice if reproject had a clip_src option... and maybe a clip2validdomain = true/false

@asinghvi17
Copy link
Member Author

asinghvi17 commented Sep 17, 2024

Yeah that would be nice...the problem is, that we don't actually have access to valid bounds :D

https://github.com/MakieOrg/GeoMakie.jl/blob/e897be2d7227e9b935efc0657276004f51fcd138/src/projection.jl#L37-L46 is what I use to handle this in GeoMakie, it could be useful here - but it does add a bit of time to the algorithm.

@alex-s-gardner
Copy link
Contributor

What about returning an error along the lines of "some points fall outside of valid projection domain, try supplying a valid extent to clipsrc"

@rafaqz
Copy link
Member

rafaqz commented Sep 17, 2024

If we just error by default but we let users pass an argument to get slower but correct/NaN results?

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

No branches or pull requests

3 participants