traffic.core.flightplan

class traffic.core.flightplan.FlightPlan(fp, origin=None, destination=None)

Bases: ShapelyMixin

leaflet(**kwargs)

Returns a Leaflet layer to be directly added to a Map.

The elements passed as kwargs as passed as is to the PolyLine constructor.

Return type:

Optional[Polyline]

plot(ax, airports=True, airports_kw=None, labels=None, labels_kw=None, **kwargs)

Plots the trajectory on a Matplotlib axis.

FlightPlans support Cartopy axis as well with automatic projection. If no projection is provided, a default PlateCarree is applied.

Example usage:

from cartes.crs import Mercator
fig, ax = plt.subplots(1, subplot_kw=dict(projection=Mercator())
flightplan.plot(ax, labels=True, alpha=.5)
Return type:

List[Artist]

Note

See also geoencode() for the altair equivalent.