Skip to content

Commit 4b04c2f

Browse files
committedNov 8, 2017
maps labben
1 parent e370df0 commit 4b04c2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+854878
-0
lines changed
 

‎maps_labb/README.md

Whitespace-only changes.

‎maps_labb/imap/#nodeCount.py#

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Parser example
2+
# Usage python parser_ex.py
3+
4+
import sys
5+
from datetime import datetime
6+
7+
from mapvis.osm_parser import get_default_parser
8+
9+
# The first argument after the python module on the commandline
10+
#filename = sys.argv[0]
11+
12+
# Parse the supplied OSM file
13+
start = datetime.now()
14+
15+
parser = get_default_parser('Ourmap.osm')
16+
17+
nodes = 0
18+
for node in parser.iter_nodes():
19+
nodes += 1
20+
21+
end = datetime.now()
22+
23+
print("The data contains", nodes, "nodes")
24+
print("Parsing the date took", (end - start).total_seconds(), "seconds")

0 commit comments

Comments
 (0)