Flight Lines¶
- class FlightLine[source]¶
Bases:
objectRepresents a geospatial flight line with properties, validations, and operations.
Altitude is stored as MSL (above mean sea level), which is the standard aviation reference. Sensor calculations that depend on height above ground (AGL) must account for terrain elevation separately.
- property lat1¶
- property lon1¶
- property lat2¶
- property lon2¶
- classmethod start_length_azimuth(lat1, lon1, length, az, **kwargs)[source]¶
- Return type:
- Parameters:
- clip_to_polygon(clip_polygon)[source]¶
Clip the flight line to a specified polygon.
- Parameters:
clip_polygon (Union[Polygon, MultiPolygon]) – The polygon to clip the flight line to.
- Returns:
A list of resulting FlightLine(s), or None if no intersection exists.
- Return type:
Optional[List[“FlightLine”]]
- track(precision=100.0)[source]¶
Generate a LineString representing the flight line.
- Parameters:
precision (Union[Quantity, float]) – Desired distance between interpolated points. Accepts a Quantity with length units or a plain float (assumed meters).
- Returns:
A LineString object containing the interpolated track.
- Return type:
- reverse()[source]¶
Reverse the direction of the flight line.
- Returns:
A new FlightLine object with reversed direction.
- Return type:
- offset_north_east(offset_north, offset_east)[source]¶
Offset the flight line in the north and east directions.
- Parameters:
offset_north (Quantity) – Distance to offset in the north direction (positive or negative).
offset_east (Quantity) – Distance to offset in the east direction (positive or negative).
- Returns:
A new FlightLine object with the offset applied.
- Return type:
- offset_across(offset_distance)[source]¶
Offset the flight line perpendicular to its direction by a specified distance.
- Parameters:
offset_distance (Union[Quantity, float]) – Distance to offset the line (positive for right, negative for left). Plain floats are assumed meters.
- Returns:
A new FlightLine object with the offset applied.
- Return type:
- offset_along(offset_start, offset_end)[source]¶
Offset the flight line along its direction by modifying the start and end points.
- Parameters:
- Returns:
A new FlightLine object with the offset applied.
- Return type:
- rotate_around_midpoint(angle)[source]¶
Rotate the flight line around its midpoint by a specified angle.
- Parameters:
angle (float) – Rotation angle in degrees. Positive values indicate counterclockwise rotation.
- Returns:
A new FlightLine object rotated around its midpoint.
- Return type:
- split_by_length(max_length, gap_length=None)[source]¶
Split the flight line into segments of a specified maximum length with an optional gap between segments.
- Parameters:
max_length (Quantity) – Maximum length of each segment (meters).
gap_length (Optional[Quantity]) – Length of the gap between segments (meters). Default is None.
- Returns:
List of FlightLine objects representing the segments.
- Return type:
List[FlightLine]
- to_gdf(flight_lines, crs='EPSG:4326')[source]¶
Convert a list of FlightLine objects to a GeoDataFrame.
- Parameters:
flight_lines (List[FlightLine]) – Flight lines to convert.
crs (str) – Coordinate reference system (default: “EPSG:4326”).
- Returns:
GeoDataFrame with flight line attributes and geometries.
- Return type:
gpd.GeoDataFrame