From 397c4c799b860346ab6a3482fec6a18be306837a Mon Sep 17 00:00:00 2001 From: Maneesha Premasiri <129958530+MPremasiri@users.noreply.github.com> Date: Fri, 15 Mar 2024 09:57:50 +0100 Subject: [PATCH] Reorgarnized imports in constraints module --- WeatherRoutingTool/constraints/constraints.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/WeatherRoutingTool/constraints/constraints.py b/WeatherRoutingTool/constraints/constraints.py index b3fbc6f..c5f167e 100644 --- a/WeatherRoutingTool/constraints/constraints.py +++ b/WeatherRoutingTool/constraints/constraints.py @@ -1,36 +1,32 @@ +import os import logging import cartopy.crs as ccrs import cartopy.feature as cf import datacube +import geopandas as gpd import matplotlib.pyplot as plt import numpy as np +import pandas as pd +import sqlalchemy import xarray as xr from global_land_mask import globe +from shapely.geometry import Point, LineString, box +from shapely.strtree import STRtree -from maridatadownloader import DownloaderFactory import WeatherRoutingTool.utils.graphics as graphics import WeatherRoutingTool.utils.formatting as form +from maridatadownloader import DownloaderFactory from WeatherRoutingTool.routeparams import RouteParams from WeatherRoutingTool.utils.maps import Map from WeatherRoutingTool.weather import WeatherCond -# used as a part of the continuouscheck class ## -import os -import sqlalchemy -import pandas as pd -import geopandas as gpd -from shapely.geometry import Point, LineString, box -from shapely.strtree import STRtree - - # Load the environment variables from the .env file parent = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) logger = logging.getLogger("WRT.Constraints") -# # Constraint: Main class for handling of constraints # PositiveConstraint: handling of constraints where the ship NEEDS to take a certain route (e.g. waterways) # NegativeConstraint: handling of constraints where the ship MUST NOT pass a certain area (too low water depth,