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).
Generally, pycontrails assumes all geospatial data is provided in WGS84. In the
GeoVectorDataset
docstring, we write:The
GeoVectorDataset
interface gives an option to set a custom CRS through itsattrs
. This attribute is not consistently used in geospatial calculations. As a concrete example,Flight.length
andFlight.segment_length
both check the crs attribute, whereasFlight.segment_angle
andFlight.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).