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

Error when fetching #15

Open
Khalilsqu opened this issue Oct 1, 2021 · 2 comments
Open

Error when fetching #15

Khalilsqu opened this issue Oct 1, 2021 · 2 comments

Comments

@Khalilsqu
Copy link

Thanks for this exceptional library,

would you help why I get this error,

HTTPError: 400 Client Error: 400 for url: https://portal.opentopography.org/API/globaldem?demtype=SRTMGL3&south=5&north=45&west=10&east=70&outputFormat=GTiff

This is the code snippet.

topo = Topography(
    dem_type="SRTMGL3",
    south=5,
    north=45,
    west=10,
    east=70,
    output_format="GTiff",
    cache_dir="."
    )

fname = topo.fetch()
print(fname)
@mdpiper
Copy link
Member

mdpiper commented Oct 1, 2021

Hi @Khalilsqu -- thanks for reporting this issue. When I (via a tip from @mcflugen) entered the request URL generated by Topography

https://portal.opentopography.org/API/globaldem?demtype=SRTMGL3&south=5&north=45&west=10&east=70&outputFormat=GTiff

into my browser, I got a helpful error message from OpenTopography:

<error>
Error: The maximum area for SRTMGL3 is 4,050,000 km2. The selected area is 29,549,914 km2
</error>

I'm reopening this issue because I think it would be a good feature for Topography to warn a user when creating an instance that they're requesting an area greater than the max size supported by OpenTopography.

Please let me know if you run into any other issues; I'd like to continue improving this library!

@Khalilsqu
Copy link
Author

Indeed, I figured out later the issue is related to the selected maximum area, and thus closed the report here!

Thanks again for your efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants