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

Need ability to convert 3D coordinates #150

Open
whitefractal opened this issue Jan 30, 2023 · 4 comments · May be fixed by #176
Open

Need ability to convert 3D coordinates #150

whitefractal opened this issue Jan 30, 2023 · 4 comments · May be fixed by #176

Comments

@whitefractal
Copy link

Proj::convert assumes 2D coordinates, and passes z: 0.0 into proj_sys (which handles 3D just fine).

This is insufficient for conversions to/from (e.g.) ECEF coordinates, where the z coordinate is critical even for locations on the ground.

Then need to access the private c_proj makes it impossible to define a trait with a minimally-modified convert method which takes a 3D point, passes all three values in/out of proj_sys, and returns a 3D point.

Some provision for 3D coords within this crate would be extremely helpful please :-)

@lnicola
Copy link
Member

lnicola commented Jan 30, 2023

Yeah, we should definitely support 3-4D transforms, it's just a question of API design.

@lnicola
Copy link
Member

lnicola commented Jan 30, 2023

CC #121

@urschrei
Copy link
Member

I agree but I don't have time, so (and I mean this in the most constructive way) if you want it, you'll almost certainly have to write it.

@balazsdukai
Copy link

I have a fork that I adapted for 3D coordinate conversion, specifically, because I needed to reproject to ECEF @whitefractal .

Here is the proj.rs fork. Here is an example how I use it.

In my adaptation, I did the minimum necessary for my use case. However, because the current Coord is 2D only, I'm not sure if adding additional members (eg z), would break anything downstream. What do you think @lnicola @urschrei ?

But if you don't see big hurdles in the API, I'll implement the 3D across proj and send a PR.

PaulWagener added a commit to PaulWagener/proj that referenced this issue Aug 6, 2023
@PaulWagener PaulWagener linked a pull request Aug 6, 2023 that will close this issue
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 a pull request may close this issue.

4 participants