Merge pull request #1 from chrieke/imports_explicit_and_clean

explicit imports, cleaned up, remove comments, clean up
This commit is contained in:
Christoph Rieke
2021-08-28 21:05:28 +02:00
committed by GitHub
4 changed files with 19 additions and 52 deletions

View File

@@ -1,3 +1 @@
# Fetch & Draw from .draw import plot
from .draw import *
from .fetch import *

View File

@@ -1,8 +1,8 @@
from matplotlib import pyplot as plt import math
from matplotlib import patches
from matplotlib import text as mtext from matplotlib import text as mtext
import numpy as np import numpy as np
import math
class CurvedText(mtext.Text): class CurvedText(mtext.Text):
""" """

View File

@@ -1,32 +1,18 @@
# OpenStreetMap Networkx library to download data from OpenStretMap
import osmnx as ox
# Matplotlib-related stuff, for drawing
from matplotlib.path import Path
from matplotlib import pyplot as plt
from matplotlib.patches import PathPatch
# CV2 & Scipy & Numpy & Pandas
import numpy as np
from numpy.random import choice
# Shapely
from shapely.geometry import *
from shapely.affinity import *
# Geopandas
from geopandas import GeoDataFrame
# etc
import re import re
import pandas as pd
from functools import reduce
from tabulate import tabulate
from IPython.display import Markdown, display
from collections.abc import Iterable from collections.abc import Iterable
# Fetch import osmnx as ox
from .fetch import * import pandas as pd
import numpy as np
from numpy.random import choice
from shapely.geometry import Polygon, MultiPolygon, MultiLineString, GeometryCollection
from shapely.affinity import translate, scale, rotate
from descartes import PolygonPatch
from tabulate import tabulate
from IPython.display import Markdown, display
from .fetch import get_perimeter, get_layer
# Helper functions # Helper functions
def get_hash(key): def get_hash(key):

View File

@@ -1,28 +1,11 @@
# OpenStreetMap Networkx library to download data from OpenStretMap from functools import reduce
from ast import Mult
from operator import ge
import osmnx as ox import osmnx as ox
# CV2 & Scipy & Numpy & Pandas
import numpy as np import numpy as np
from shapely.geometry import Point, Polygon, MultiPolygon, MultiLineString
# Shapely
from shapely.geometry import *
from shapely.affinity import *
from shapely.ops import unary_union from shapely.ops import unary_union
# Geopandas
from geopandas import GeoDataFrame from geopandas import GeoDataFrame
# Matplotlib
from matplotlib.path import Path
# etc
from collections.abc import Iterable
from functools import reduce
from descartes import PolygonPatch
from functools import reduce
# Compute circular or square boundary given point, radius and crs # Compute circular or square boundary given point, radius and crs
def get_boundary(point, radius, crs, circle = True, dilate = 0): def get_boundary(point, radius, crs, circle = True, dilate = 0):