-
Notifications
You must be signed in to change notification settings - Fork 6
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
Weird behaviour when generating heights (CZ) #7
Comments
I think it will be better to download height data as image and do the transformation with that downloaded image. I think I've found API endpoint for downloading such image (further investigation needed) |
I am going to use the |
Thanks, this would help (certainly this will shorten the execution time), but I'm still afraid that there will still be too much unnecessary amount of data. But start with |
Unfortunately, I can't give so many points' coordinates in one query. In this video you can see why. |
Maybe internal response limit? From documentation:
But HTTP 404 is weird way how to indicate that limit is exceeded. I will try |
I've managed to export image based on lat/long coordinates (spatial reference 4326) and resulting image is in Krovak projection (spatial reference 5514). But then I don't know how to exactly use that image (must figure out later). My idea is:
Resource: Get image - input bounding box in WGS84, output image in S-JTSK |
- CZ part: - elevation data downloading improved: #7 (comment) (use the "getSamples" method instead of "identify") - JSON data is now converting to dictionary (no more string.split operations) - PL part: - "getHeightPL" function replaced by "openUrl" - if the server returns less than 200 points' heights, the script will inform about it - No support for Python 3.8 or newer, and Python older than 3.5 - Code optimization
In spite of all, new version of this script seems to work fine. (2048 x 2048) m terrain in <10 minutes, without the weird behaviour mentioned in the 1st post. |
Great - I will try to do it my way and I will use your solution as reference. |
When generating heights for the map (country=CZ), script (mod2) tends to create download peaks.
I would expect constant network usage when downloading heights data. Also consider bit refactor of mod2. In the script, "stupid" str.split is used to get data out of json. Thats one thing, another thing is, that in case when you will generate 4x4 map (my case), it will open ~4227136 connections just to get one number. Web protection services can detect this ammount of connections as an attack and will cause slow down for that user.
TODO:
Impact:
Because of this issue, this script hard to use for large maps in czech environment.
The text was updated successfully, but these errors were encountered: