mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-03 08:40:11 +02:00
Fix inner path and outer path drawing. Make flinger more simple.
This commit is contained in:
parent
8d8080181e
commit
f6a15e7a71
10 changed files with 478 additions and 410 deletions
|
@ -3,10 +3,10 @@ Reading OpenStreetMap data from XML file.
|
|||
|
||||
Author: Sergey Vartanov (me@enzet.ru).
|
||||
"""
|
||||
import numpy as np
|
||||
from datetime import datetime
|
||||
from typing import Dict, List, Optional, Set, Union
|
||||
|
||||
from roentgen.flinger import Geo
|
||||
from roentgen.ui import progress_bar
|
||||
from roentgen.util import MinMax
|
||||
|
||||
|
@ -21,7 +21,7 @@ class OSMNode:
|
|||
"""
|
||||
def __init__(self):
|
||||
self.id_: Optional[int] = None
|
||||
self.position: Optional[Geo] = None
|
||||
self.position: Optional[np.array] = None
|
||||
self.tags: Dict[str, str] = {}
|
||||
|
||||
self.visible: Optional[str] = None
|
||||
|
@ -38,8 +38,8 @@ class OSMNode:
|
|||
:param is_full: if false, parse only ID, latitude and longitude
|
||||
"""
|
||||
self.id_ = int(get_value("id", text))
|
||||
self.position = Geo(
|
||||
float(get_value("lat", text)), float(get_value("lon", text)))
|
||||
self.position = np.array((
|
||||
float(get_value("lat", text)), float(get_value("lon", text))))
|
||||
|
||||
if is_full:
|
||||
self.visible = get_value("visible", text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue