def __init__(self): """ Initialization """ GdalAux.check_gdal_data() GdalAux.check_proj4_data() self.geo = Geod(ellps='WGS84')
def __init__(self): # same as LibInfo variables self.app_name = name self.app_version = __version__ self.app_author = "G.Masetti (CCOM/JHC)" self.app_author_email = "*****@*****.**" self.app_license = "LGPL v3" self.app_license_url = "https://www.hydroffice.org/license/" self.app_path = os.path.abspath(os.path.dirname(__file__)) self.app_url = "https://www.hydroffice.org/abc/" self.app_manual_url = "https://www.hydroffice.org/manuals/abc/index.html" self.app_support_email = "*****@*****.**" self.app_latest_url = "https://www.hydroffice.org/latest/abc.txt" # additional AppInfo-specific variables self.app_media_path = os.path.join(self.app_path, "media") self.app_main_window_object_name = "MainWindow" self.app_license_path = os.path.join(self.app_media_path, "LICENSE") self.app_icon_path = os.path.join(self.app_media_path, "app_icon.png") self.app_tabs_icon_size = 36 self.app_toolbars_icon_size = 24 GdalAux.check_gdal_data() GdalAux.check_proj4_data()
from PySide2 import QtCore, QtWidgets from hyo2.abc.lib.gdal_aux import GdalAux GdalAux.check_proj4_data() from mpl_toolkits.basemap import Basemap, __version__ import matplotlib.pyplot as plt print(__version__) map = Basemap(projection='ortho', lat_0=0, lon_0=0) map.drawmapboundary(fill_color='aqua') map.fillcontinents(color='coral', lake_color='aqua') map.drawcoastlines() lons = [0, 10, -20, -20] lats = [0, -10, 40, -20] x, y = map(lons, lats) map.scatter(x, y, marker='D', color='m') plt.show()