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

Deprecate or remove GeoVectorDataset.attrs["crs"] #151

Closed
zebengberg opened this issue Feb 7, 2024 · 0 comments · Fixed by #252
Closed

Deprecate or remove GeoVectorDataset.attrs["crs"] #151

zebengberg opened this issue Feb 7, 2024 · 0 comments · Fixed by #252

Comments

@zebengberg
Copy link
Contributor

Generally, pycontrails assumes all geospatial data is provided in WGS84. In the GeoVectorDataset docstring, we write:

Expect latitude-longitude CRS in WGS 84.

The GeoVectorDataset interface gives an option to set a custom CRS through its attrs. This attribute is not consistently used in geospatial calculations. As a concrete example, Flight.length and Flight.segment_length both check the crs attribute, whereas Flight.segment_angle and Flight.segment_groundspeed do not. In the cases where the CRS is checked, an error is raised when the data is not WGS84 (the default).

The GeoVectorDataset.attrs["crs"] can likely be removed without impacting the end user. It would result in a slightly cleaner code base, slight performance improvements, and simplify some patterns (for example, Fleet constructions).

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.

1 participant