mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-08-19 21:02:11 +02:00
Merge pull request #1 from chrieke/imports_explicit_and_clean
explicit imports, cleaned up, remove comments, clean up
This commit is contained in:
@@ -1,3 +1 @@
|
|||||||
# Fetch & Draw
|
from .draw import plot
|
||||||
from .draw import *
|
|
||||||
from .fetch import *
|
|
@@ -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):
|
||||||
"""
|
"""
|
||||||
|
@@ -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):
|
||||||
|
@@ -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):
|
||||||
|
Reference in New Issue
Block a user