georust / georust/proj

Add `inverse` parameter to `convert` and `transform` methods

Open
#240 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
186
Forks
63
PR merge metrics
No merged PRs in 30d

Description

The `project` method for the `Proj` struct accepts an `inverse` parameter. No such parameter exists in the `transform` and `transformed` methods of the `Transform` trait. Internally, those methods are calling the `convert` and `convert_array` methods on `Proj`, which also do not have an `inverse` parameter. However, the `proj_trans` function, which is called by these conversion methods, accepts a `direction` parameter which is currently set to `PJ_DIRECTION_PJ_FWD`.

My suggestion would be to introduce a breaking change and, in doing so, also improve the naming:
- Rename the `convert` and `convert_array` methods in `Proj` to `transform` and `transform_array`, and add a boolean ìnverse` parameter.
- Add a boolean `inverse` parameter to the `transform` and `transformed` methods in the `Transform` trait

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing Proj::project, Transform::transform and transformed, Proj::convert and convert_array, and the proj_trans call described in the issue. Determine the public API changes needed to expose inverse direction consistently, rename the conversion methods, and update affected callers and tests; done means forward and inverse transformations work through all renamed methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.