Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3768676
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/viperserv/fantoir/files/extract_streets.py b/roles/viperserv/fantoir/files/extract_streets.py
index fccb431..cdb6c98 100644
--- a/roles/viperserv/fantoir/files/extract_streets.py
+++ b/roles/viperserv/fantoir/files/extract_streets.py
@@ -1,36 +1,36 @@
#!/usr/bin/env python3
# -------------------------------------------------------------
# FANTOIR — Extract streets
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-11-14
# License: Trivial work, not eligible to copyright
# Data license: FANTOIR is licensed under Licence Ouverte
# -------------------------------------------------------------
import sys
def extract_streets(filename_source, filename_out):
with open(filename_out, 'w') as output,\
open(filename_source, 'r') as input:
for line in input:
# Streets and other « voies » are the record where
# the 109th position (« type de voie ») is 1.
try:
if line[108] == "1":
output.write(line)
except IndexError:
pass
if __name__ == "__main__":
argc = len(sys.argv)
- if (argc != 3):
+ if argc != 3:
print("Usage: {} <FANTOIR filename> <street filename>"
.format(sys.argv[0]),
file=sys.stderr)
sys.exit(1)
extract_streets(sys.argv[1], sys.argv[2])
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Nov 25, 09:38 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259941
Default Alt Text
(1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment