Skip to content

Commit

Permalink
Fix style issues
Browse files Browse the repository at this point in the history
Signed-off-by: Adam.Dybbroe <[email protected]>
  • Loading branch information
Adam.Dybbroe committed Dec 2, 2024
1 parent 9df160b commit ba5f81e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion trollsched/shapefiles_from_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ def get_shapely_polygon_from_lonlat(lons, lats):
geodata = np.vstack((lons, lats)).T
return Polygon(np.rad2deg(geodata))


def create_shapefile_filename(satellite_pass_obj):
"""From a trollsched.satpass instance create the shapefile filename."""
satname = satellite_pass_obj.satellite.name.replace(" ", "-")
prefix = f"{satellite_pass_obj.instrument}_{satname}"
return f"{prefix}_{satellite_pass_obj.risetime:%Y%m%d%H%M}_{satellite_pass_obj.falltime:%Y%m%d%H%M}_outline.shp"


def create_shapefile_from_pass(sat_pass, output_filepath):
"""From a satellite overpass (instrument scanning outline) create a shapefile and save."""
sat_poly = get_shapely_polygon_from_lonlat(sat_pass.boundary.contour_poly.lon,
Expand Down Expand Up @@ -102,7 +104,6 @@ def shapefiles_from_schedule_xml_requests(filename, satellites, tle_file, output
create_shapefile_from_pass(overpass, output_filepath)



def parse_args(args):
"""Parse command line arguments."""
parser = argparse.ArgumentParser()
Expand Down

0 comments on commit ba5f81e

Please sign in to comment.