Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
28 lines (20 loc) · 736 Bytes

File metadata and controls

28 lines (20 loc) · 736 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/python
__author__ = 'milu'
import xml.etree.ElementTree
e = xml.etree.ElementTree.parse('mapgraph_new.xml').getroot()
node_list = open("node_list.txt", "w")
node_dict = {}
for atype in e.findall('item'):
prev_id = atype.get('prev_id')
prev_lon = atype.get('prev_lon')
prev_lat = atype.get('prev_lat')
current_id = atype.get('current_id')
current_lon = atype.get('current_lon')
current_lat = atype.get('current_lat')
print prev_id,current_id
node_dict[prev_id] = str(prev_lon) + "," + str(prev_lat)
node_dict[current_id] = str(current_lon) + "," + str(current_lat)
for node,value in node_dict.items():
print node
node_list.write(node + ":" + value +'\n')
print 'Hello World'
Morty Proxy This is a proxified and sanitized view of the page, visit original site.