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

Proj.identify #92

Merged
merged 8 commits into from
Aug 30, 2023
Merged

Proj.identify #92

merged 8 commits into from
Aug 30, 2023

Conversation

alex-s-gardner
Copy link
Contributor

This addresses the first part of #88

@alex-s-gardner
Copy link
Contributor Author

FYI: It appears that failed tests are unrelated to this PR

@alex-s-gardner
Copy link
Contributor Author

I don't think libproj.jl is the right place to put Proj.identify. I think it's autogenerated. Looking through the codebase I don't see a great place to put it. Should we create a new file utilities.jl and put Proj.identify in there?

@visr
Copy link
Member

visr commented Aug 6, 2023

Indeed libproj.jl is generated so it cannot go there. I'd say the existing crs.jl is a fine place.

Regarding the failing tests, indeed it is a known issue, see #87.

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.

Sorry for the wait! Left some comments, curious what you think.

src/crs.jl Outdated Show resolved Hide resolved
src/crs.jl Outdated Show resolved Hide resolved
src/crs.jl Outdated Show resolved Hide resolved
src/crs.jl Outdated Show resolved Hide resolved
src/crs.jl Outdated Show resolved Hide resolved
src/crs.jl Outdated Show resolved Hide resolved
src/crs.jl Outdated Show resolved Hide resolved
src/crs.jl Outdated Show resolved Hide resolved
src/crs.jl Outdated Show resolved Hide resolved
src/crs.jl Outdated Show resolved Hide resolved
@alex-s-gardner
Copy link
Contributor Author

@visr I've adopted all of your suggestions, thanks. One question I have is should we always return a vector of NamedTuples even if there is no crs found or only a single crs found? My thought was that the output should be a consistent type so I always return a vector.

@visr
Copy link
Member

visr commented Aug 30, 2023

One question I have is should we always return a vector of NamedTuples even if there is no crs found or only a single crs found?

Yeah I agree.

I pushed a few final things in e87b0d1. I went back to freeing the confidence, since that is what the docs tell us, and the CRS pointers, we still use and pass back to the user. Still I couldn't trigger a segfault or anything accessing the original confidence values, so not sure if it is being cleaned up properly.

@visr visr merged commit 5beab68 into master Aug 30, 2023
11 checks passed
@visr visr deleted the Proj.identify branch August 30, 2023 20:34
visr added a commit that referenced this pull request Aug 30, 2023
* add high level interface to proj_identify

* add tests for Proj.identify

* move identify from libproj to crs

* address comments on Proj.identify

* update tests

* free pj_list

* final improvements

- standardize docstring
- avoid intermediate Vectors
- free out_confidence

* run JuliaFormatter

---------

Co-authored-by: Martijn Visser <[email protected]>
visr added a commit that referenced this pull request Aug 30, 2023
* Implement GeoInterface for Coord and in Transformations.

* Proj.identify (#92)

* add high level interface to proj_identify

* add tests for Proj.identify

* move identify from libproj to crs

* address comments on Proj.identify

* update tests

* free pj_list

* final improvements

- standardize docstring
- avoid intermediate Vectors
- free out_confidence

* run JuliaFormatter

---------

Co-authored-by: Martijn Visser <[email protected]>

* run JuliaFormatter

---------

Co-authored-by: Alex Gardner <[email protected]>
Co-authored-by: Martijn Visser <[email protected]>
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