opencode ergebnis V0.1
This commit is contained in:
1 parent
61d86a3d83
commit
7e498ebc3f
71 files changed
+28982
-46
No files matched your search
@@ -22,7 +22,7 @@ def str2latlong(s):
|
||||
return latlon
|
||||
|
||||
def wkt2polylines(street, wkt_lines):
|
||||
print(" %s : [" % (street, ))
|
||||
print(" '%s' : [" % (street, ))
|
||||
for line in wkt_lines:
|
||||
latlon = str2latlong(line)
|
||||
print(" [")
|
||||
@@ -35,7 +35,7 @@ if __name__ == "__main__":
|
||||
streets = {}
|
||||
for idx, row in enumerate(read_osm_data(STREETS_CSV)):
|
||||
if row['name'] != "":
|
||||
print("ID %(full_id)s : %(name)s = %(WKT)s" % row)
|
||||
# print("ID %(full_id)s : %(name)s = %(WKT)s" % row)
|
||||
# !!! TOO SIMPLE, more than 1 row !!!!
|
||||
#streets[row['full_id']] = {row['name']: row['WKT'][12:-1]}
|
||||
streets.setdefault(row['name'], [])
|
||||
@@ -44,14 +44,9 @@ if __name__ == "__main__":
|
||||
# 0 12 -1
|
||||
wkt_line = row['WKT'][12:-1]
|
||||
streets[row['name']].append(wkt_line)
|
||||
print("")
|
||||
print("--------------------------------")
|
||||
print("KENNEDYALLEE")
|
||||
#print(streets['Kennedyallee'])
|
||||
wkt2polylines("Kennedyallee", streets['Kennedyallee'])
|
||||
print("")
|
||||
print("--------------------------------")
|
||||
print("AUSTRASSE")
|
||||
#print(streets['Austraße'])
|
||||
wkt2polylines("Austraße", streets['Austraße'])
|
||||
|
||||
print("window.STRASSE2POLYLINES = {")
|
||||
for k in streets.keys():
|
||||
# wkt2polylines(k, streets[k])
|
||||
print("%s" % k)
|
||||
print("};")
|
||||
|
||||
Reference in new issue
Block a user