Fix code style.

This commit is contained in:
Sergey Vartanov 2020-09-24 23:55:04 +03:00
parent c9fe5e55b6
commit 2667ee9d02
16 changed files with 228 additions and 240 deletions

View file

@ -37,15 +37,15 @@ class Flinger:
"""
Convert geo coordinates into SVG position points.
"""
def __init__(self, geo_boundaries: MinMax, scale: float = 1000):
def __init__(self, geo_boundaries: MinMax, scale: float = 18):
"""
:param geo_boundaries: minimum and maximum latitude and longitude
:param scale: OSM zoom level
"""
self.geo_boundaries: MinMax = geo_boundaries
self.ratio: float = (
osm_zoom_level_to_pixels_per_meter(scale) *
EQUATOR_LENGTH / 360)
osm_zoom_level_to_pixels_per_meter(scale) *
EQUATOR_LENGTH / 360)
self.size: np.array = self.ratio * (
pseudo_mercator(self.geo_boundaries.max_) -
pseudo_mercator(self.geo_boundaries.min_))