-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add CRS constructor. #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. I added some comments.
src/crs.jl
Outdated
function is_geographic(crs::CRS) | ||
proj_get_type(crs.pj) in ( | ||
PJ_TYPE_GEOGRAPHIC_CRS, | ||
PJ_TYPE_GEOGRAPHIC_2D_CRS, | ||
PJ_TYPE_GEOGRAPHIC_3D_CRS) | ||
end | ||
|
||
function is_projected(crs::CRS) | ||
proj_get_type(crs.pj) == PJ_TYPE_PROJECTED_CRS | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if this covers everything? What about PJ_TYPE_TEMPORAL_CRS or PJ_TYPE_COMPOUND_CRS? Could they also be geographic or projected? If we can't be certain, perhaps we should just stick to the PROJ API and add proj_get_type(::CRS)
for slightly more convenience.
@rafaqz This PR includes a method to convert between GFT instances, like ArchGDAL. |
Not sure why the tests are suddenly failing, like the PROJ version changed in between, but can't replicate it. @visr, any thoughts? |
That's your own show change from #73 ;) Fixed in 29e3415 The new show is better, it shows explicitly it is a no-op (old then new):
|
LGTM |
It would be better to directly do this in the style of yeesian/ArchGDAL.jl#349 and JuliaGeo/LibGEOS.jl#149, since this adds a bunch of methods like |
The style being |
Yes indeed, then we don't need to take out the pointer ourselves, which is less code and safer for GC. |
No description provided.