Skip to content

Commit

Permalink
set Cache directory for hgt files to user dir instead of cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
treee111 committed Mar 24, 2023
1 parent 06be778 commit 594756a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ osmfilter_tempfile.*
# mac/unix

#windows
/wahoomc/tooling_win/osmconvert_tempfile.*
hgt/*
/wahoomc/tooling_win/osmconvert_tempfile.*
5 changes: 4 additions & 1 deletion wahoomc/osm_maps_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from wahoomc.constants import LAND_POLYGONS_PATH
from wahoomc.constants import VERSION
from wahoomc.constants import OSMOSIS_WIN_FILE_PATH
from wahoomc.constants import USER_DL_DIR

from wahoomc.downloader import Downloader
from wahoomc.geofabrik import CountryGeofabrik, XYGeofabrik
Expand Down Expand Up @@ -490,6 +491,8 @@ def generate_elevation(self, o_input_data):
log.info('-' * 80)
log.info('# Generate contour lines for each coordinate')

hgt_path = os.path.join(USER_DL_DIR, 'hgt')

tile_count = 1
for tile in self.o_osm_data.tiles:
out_file_elevation = os.path.join(
Expand All @@ -509,7 +512,7 @@ def generate_elevation(self, o_input_data):
cmd.extend(['-o', f'{out_file_elevation}', '-s 10', '-c 100,50', '--source=view1,view3,srtm3',
'--jobs=8', '--viewfinder-mask=1', '--start-node-id=20000000000',
'--max-nodes-per-tile=0', '--start-way-id=2000000000', '--write-timestamp',
'--no-zero-contour'])
'--no-zero-contour', '--hgtdir=' + hgt_path])
cmd.append('--earthexplorer-user=' + username)
cmd.append('--earthexplorer-password=' + password)

Expand Down

0 comments on commit 594756a

Please sign in to comment.