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

Constructing OpHandle for EPSG:4326 results in error #79

Closed
frewsxcv opened this issue Nov 22, 2023 · 7 comments
Closed

Constructing OpHandle for EPSG:4326 results in error #79

frewsxcv opened this issue Nov 22, 2023 · 7 comments

Comments

@frewsxcv
Copy link
Contributor

EPSG:4326 from crs-definitions:

Def { code: 4326, proj4: "+proj=longlat +datum=WGS84 +no_defs", wkt: "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]" }

The relevant part being the proj4 string: "+proj=longlat +datum=WGS84 +no_defs".

When using parse_proj on that string, this returns "longlat datum=WGS84 no_defs".

Attempting to construct an OpHandle from that via geodesy::Plain::new().op(...).unwrap() results in this error:

Result::unwrap()` on an `Err` value: NotFound("longlat", ": longlat datum=WGS84 no_defs")
@frewsxcv
Copy link
Contributor Author

frewsxcv commented Nov 22, 2023

@busstoptaktik
Copy link
Owner

Resolved in 220a37f and backported in preparation of 0.11.1

@busstoptaktik
Copy link
Owner

@Rennzie I think @frewsxcv will also need the unitconvert operator, which I see you have implemented for geodesy-wasm. Is there any chance you will consider a PR here?

Of course, I know I can just, with proper attribution, copy directly from your repo, but that would mean that the commit would be signed by me, rather than directly attributed to you in the log, which feels a bit like academic misconduct.

@Rennzie
Copy link
Contributor

Rennzie commented Nov 23, 2023

@busstoptaktik yes absolutely! I actually have this on my list to ask if you'd want that. I'll PR it later today. Worth noting that it does NOT implement any time based conversion. Only angular and linear unit conversions.

@busstoptaktik
Copy link
Owner

@Rennzie Awesome! And I'm sure angular+linear covers the vast majority of use cases, so that's neat. I will hold point release 0.11.1 back until your PR is merged

@Rennzie
Copy link
Contributor

Rennzie commented Nov 23, 2023

PR here #80

@frewsxcv
Copy link
Contributor Author

Thank you so much @busstoptaktik and @Rennzie!

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

No branches or pull requests

3 participants