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

Implement crstrait. #140

Merged
merged 5 commits into from
Jul 13, 2024
Merged

Implement crstrait. #140

merged 5 commits into from
Jul 13, 2024

Conversation

evetion
Copy link
Member

@evetion evetion commented Jul 4, 2024

To distinguish between geographic and projected coordinate systems. Fixes #119.

@asinghvi17
Copy link
Member

I think we would also want similar traits in GFT or some kind of trait wrapper, so that users can choose to have CRS traits evaluated at compile time too! It should be possible to detect this using Proj I think.

@evetion
Copy link
Member Author

evetion commented Jul 5, 2024

I think we would also want similar traits in GFT or some kind of trait wrapper, so that users can choose to have CRS traits evaluated at compile time too! It should be possible to detect this using Proj I think.

Agreed, this is would be the setup for that. For now, the default UnknownTrait() should be compiled away.

src/interface.jl Outdated Show resolved Hide resolved
"An ProjectedTrait for all projected coordinate reference systems"
struct ProjectedTrait <: AbstractProjectedTrait end
"An UnknownTrait for all unknown (assumed projected) coordinate reference systems"
struct UnknownTrait <: AbstractProjectedTrait
Copy link
Member

Choose a reason for hiding this comment

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

Should this inherit from AbstractCRStrait?

Copy link
Member

Choose a reason for hiding this comment

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

If we assume projected anyway then dispatch can just be on AbstractProjectedTrait right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I assume you implement GeometryOps with Abstractprojected and catch both.

src/types.jl Show resolved Hide resolved
src/types.jl Show resolved Hide resolved
src/fallbacks.jl Outdated Show resolved Hide resolved
@evetion evetion merged commit f306295 into main Jul 13, 2024
8 of 10 checks passed
@evetion evetion deleted the feat/crstrait branch July 13, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add CRS traits
3 participants