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

Credentials supports and fixed bug #43

Open
wants to merge 2 commits into
base: nwagers-EarthDataLogin
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions srtm/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ def __init__(self, srtm1_files=None, srtm3_files=None, version='v2.1a',

"""
# Deprecated parameter handling
if srtm1_files is not None or srtm3_files is not None:
if srtm1_files or srtm3_files:
mod_warnings.warn("Use of srtm1_files and srtm3_files is "
"deprecated. Use version instead",
DeprecationWarning)
if srtm1_files is not None:
if srtm1_files:
version = 'v2.1a'
elif srtm3_files is not None:
elif srtm3_files:
version = 'v2.3a'
# End deprecated parameter handling

Expand Down
7 changes: 4 additions & 3 deletions srtm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@

def get_data(srtm1=None, srtm3=None, version='v2.1a', fallback=True,
leave_zipped=False, file_handler=None,
use_included_urls=True, batch_mode=False):
use_included_urls=True, batch_mode=False,
EDuser='', EDpass=''):
"""
Get the utility object for querying elevation data.

Expand Down Expand Up @@ -79,8 +80,8 @@ def get_data(srtm1=None, srtm3=None, version='v2.1a', fallback=True,
if not srtm1: srtm1_files = {}
if not srtm3: srtm3_files = {}

return mod_data.GeoElevationData(srtm1_files, srtm3_files, file_handler=file_handler,
leave_zipped=leave_zipped, batch_mode=batch_mode)
return mod_data.GeoElevationData(srtm1_files, srtm3_files, version=version, file_handler=file_handler,
leave_zipped=leave_zipped, batch_mode=batch_mode, EDuser=EDuser, EDpass=EDpass)

def _get_urls(use_included_urls, file_handler):
files_list_file_name = 'list.json'
Expand Down