-
Notifications
You must be signed in to change notification settings - Fork 214
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 [inv|fwd]_intermediate()
- to calculate intermediate points (like improved Geod.npts()
)
#841
Conversation
Maybe I'll change this flag into an tuple of Enum so other return types could be supported in the future, like (points, lons, lats, ranges, azimuths) |
@idanmiara, I am planning on doing a release soon since PROJ 8.0.1 was just released. Do you want to try to include this in this release or do you need more time? |
Hi, thanks for your letting me know! |
I had a few other related ideas, I've implemented them in
I've never used Cython before. from what I see it's not too complicated. Do you have some pointers on how to start besides the Cython official tutorials? How do you debug it? I'm thinking if I can make it to the next release, when are you planning on making it? |
That sounds like a good place to start. Also, looking through the existing code could be helpful. For debugging, I usually rebuild the cython after each change with:
And then test it like normal python code. |
No rush. If you are regularly working on it, it can wait until you are done. |
One thought I had was to potentially break out the different types of inputs/responses into different methods. This will add clarify for expected input/output to the user and simplify the logic for each method. |
d5acdf3
to
8098312
Compare
return_points
to Geod.npts() to determinate the return typea899842
to
527c0b5
Compare
f8ef2ca
to
9fc888f
Compare
I see a commit where you say: |
@idanmiara thanks for your patience with this PR! I think it is very close to being ready for merge. |
Sure. |
Thank you, I highly appreciate your thorough review! |
…od.npts() test/test_geod.py - test the new functionality
…ions that uses given buffers `out_lons`, `out_lats` (and `out_azis`) buffers instead of creating new buffers test/test_geod.py - add tests for `inv_intermediate`
c26a239
to
f99cee6
Compare
…_intermediate` (improved version of `npts()`) functions; add `out_lons`, `out_lats` params to `npts()`; add examples and some more docs pyproj/enums.py, docs/api/enums.rst - add `GeodIntermediateFlag` flag test/test_geod.py - add tests for new functions
@idanmiara this looks good. Ready to merge? |
Absolutely! |
Thanks @idanmiara 👍 |
pyproj/geod.py - add a parameter
return_points
to Geod.npts() to determinate the return type; improve return type hintpyproj/geod.py - add a parameters
initial_idx
,terminus_idx
to Geod.npts()pyproj/[geod.py, _geod.pyi, _geod.pyx] - add
inv_intermediate_by_npts
functions that uses given buffersout_lons
,out_lats
(andout_azis
) buffers instead of creating new bufferspyproj/_geod.pxd - add interface for
geod_lineinit
pyproj/[geod.py, _geod.pyi, _geod.pyx] - add
inv_intermediate_by_del
,fwd_intermediate_by_npts
,fwd_intermediate_by_del
functions, similar toinv_npts
but using forward calculationtest/test_geod.py - add tests for new functions
Related PR
#825