-
Notifications
You must be signed in to change notification settings - Fork 1
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
Overpass API import script #37
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks excellent! Added some comments and things to fix before merging.
The details about file paths, testing etc. can be fixed also after merging.
df8d640
to
b9d535a
Compare
Import OSM data from Overpass API to PostGIS.
Remove osm2pgsql dependency, rework arg parsing.
6cea876
to
d9fccbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log path needs fixing, but otherwise this looks very good!
util.py
Outdated
import sys | ||
from pathlib import Path | ||
|
||
LOG_PATH = Path('/app/logs') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid we will have to use
log_file = os.path.join(os.path.dirname(__loader__.path), IMPORT_LOG_PATH, f"{city}.log")
or something similar here, so that this setup works
- inside the container
- outside the container, with a totally different directory inside the repo,
- when called on the command line in the top directory
- when called by flask.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise I will get
FileNotFoundError: [Errno 2] No such file or directory: '/app/logs/helsinki.log'
when running locally.
d9fccbf
to
c72bd48
Compare
Add script for importing data from Overpass API to PostGIS.
todos: