mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-15 01:56:47 +02:00
Fix code style.
This commit is contained in:
parent
c9fe5e55b6
commit
2667ee9d02
16 changed files with 228 additions and 240 deletions
|
@ -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_))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue