Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bugs for --saveID and --add-timestamp #50

Merged
merged 2 commits into from Jan 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion ogr2osm.py
Expand Up @@ -52,6 +52,8 @@
from osgeo import osr
from geom import *

from datetime import datetime

# Determine major Python version is 2 or 3
IS_PYTHON2 = sys.version_info < (3, 0)

Expand Down Expand Up @@ -780,7 +782,7 @@ def main():
TRANSLATIONS.preOutputTransform(Geometry.geometries, Feature.features)
output()
if OPTIONS.saveid:
with open(OPTIONS.saveid, 'wb') as ff:
with open(OPTIONS.saveid, 'w') as ff:
ff.write(str(Geometry.elementIdCounter))
l.info("Wrote elementIdCounter '%d' to file '%s'"
% (Geometry.elementIdCounter, OPTIONS.saveid))
Expand Down