Skip to content

Commit

Permalink
Fix: functions for visualization now works
Browse files Browse the repository at this point in the history
  • Loading branch information
kcwongaz committed Aug 28, 2022
1 parent 8b98113 commit 1ad5ef3
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions air_traffic/visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,32 @@ def draw_map(boundary=[111, 117.5, 19, 25.5]):
"""
Create plt ax obtject with cartopy map on the given boundary box.
"""
ax = plt.axes(projection=ccrs.PlateCarree())
ax.set_extend(boundary, ccrs.PlateCarree())

fig, ax = plt.subplots(subplot_kw={"projection": ccrs.PlateCarree()})
ax.set_extent(boundary, ccrs.PlateCarree())

# Add map features
ax.add_feature(cfeature.LAND)
ax.add_feature(cfeature.OCEAN)

# Draw gridlines
gridlines = ax.gridlines(draw_labels=True, zorder=0,
linestyle="dashed", linewidth=0.5, color="dimgrey")
linestyle="dashed", linewidth=0.5,
color="dimgrey")
gridlines.top_labels = False
gridlines.right_labels = False

return ax
return fig, ax


def get_hkia_coordinates():

lat = 22.308046
lon = 113.918480

return lat, lon


def get_fir_corners():

return [111, 117.5, 19, 25.5]

0 comments on commit 1ad5ef3

Please sign in to comment.