mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-09 14:21:50 +02:00
Fix boundary box; fix view box detection.
Detect view box out of overpass turbo JSON data.
This commit is contained in:
parent
258cd5d149
commit
c76db0e3f5
2 changed files with 17 additions and 2 deletions
|
@ -372,6 +372,14 @@ class OSMData:
|
|||
node = OSMNode.parse_from_structure(element)
|
||||
node_map[node.id_] = node
|
||||
self.add_node(node)
|
||||
if not self.view_box:
|
||||
self.view_box = BoundaryBox(
|
||||
node.coordinates[1],
|
||||
node.coordinates[0],
|
||||
node.coordinates[1],
|
||||
node.coordinates[0],
|
||||
)
|
||||
self.view_box.update(node.coordinates)
|
||||
|
||||
for element in structure["elements"]:
|
||||
if element["type"] == "way":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue