kopia lustrzana https://github.com/kartoza/docker-osm
remove poly file from downloader
rodzic
d051b4b210
commit
d7a4b8e9e7
|
@ -59,7 +59,6 @@ for folder in folders:
|
||||||
# Test files
|
# Test files
|
||||||
state_file = None
|
state_file = None
|
||||||
osm_file = None
|
osm_file = None
|
||||||
poly_file = None
|
|
||||||
for f in listdir(default['SETTINGS']):
|
for f in listdir(default['SETTINGS']):
|
||||||
if f == 'last.state.txt':
|
if f == 'last.state.txt':
|
||||||
state_file = join(default['SETTINGS'], f)
|
state_file = join(default['SETTINGS'], f)
|
||||||
|
@ -67,9 +66,6 @@ for f in listdir(default['SETTINGS']):
|
||||||
if f.endswith('.pbf'):
|
if f.endswith('.pbf'):
|
||||||
osm_file = join(default['SETTINGS'], f)
|
osm_file = join(default['SETTINGS'], f)
|
||||||
|
|
||||||
if f.endswith('.poly'):
|
|
||||||
poly_file = join(default['SETTINGS'], f)
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# Todo : need fix custom URL and sporadic diff : daily, hourly and minutely
|
# Todo : need fix custom URL and sporadic diff : daily, hourly and minutely
|
||||||
if f == 'custom_url_diff.txt':
|
if f == 'custom_url_diff.txt':
|
||||||
|
@ -85,11 +81,6 @@ if not osm_file:
|
||||||
print >> stderr, 'OSM file *.osm.pbf is missing in %s' % default['SETTINGS']
|
print >> stderr, 'OSM file *.osm.pbf is missing in %s' % default['SETTINGS']
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
if not poly_file:
|
|
||||||
print 'No *.poly detected in %s' % default['SETTINGS']
|
|
||||||
else:
|
|
||||||
print '%s detected for clipping.' % poly_file
|
|
||||||
|
|
||||||
# In docker-compose, we should wait for the DB is ready.
|
# In docker-compose, we should wait for the DB is ready.
|
||||||
print 'The checkup is OK. The container will continue soon, after the database.'
|
print 'The checkup is OK. The container will continue soon, after the database.'
|
||||||
sleep(45)
|
sleep(45)
|
||||||
|
@ -134,8 +125,6 @@ while True:
|
||||||
|
|
||||||
# Command
|
# Command
|
||||||
command = ['osmupdate', '-v']
|
command = ['osmupdate', '-v']
|
||||||
if poly_file:
|
|
||||||
command.append('-B=%s' % poly_file)
|
|
||||||
command += ['--max-days=' + default['MAX_DAYS']]
|
command += ['--max-days=' + default['MAX_DAYS']]
|
||||||
command += [default['DIFF']]
|
command += [default['DIFF']]
|
||||||
command += ['--max-merge=' + default['MAX_MERGE']]
|
command += ['--max-merge=' + default['MAX_MERGE']]
|
||||||
|
|
Ładowanie…
Reference in New Issue