Comments (8)
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.
Maybe your idea would be good, but let's see how the new version will work :)
New version: 44fcaf0
from demgen.
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)
from demgen.
I am going to use the getSamples
method (https://ags.cuzk.cz/arcgis2/rest/services/dmr5g/ImageServer/getSamples) instead of identify
.
The getSamples
method allows you to enter the coordinates of more than one point, if the geometryType
parameter is set to esriGeometryMultipoint
. As a result, the mod2
execution time may be shorter.
More info: http://ags.cuzk.cz/arcgis2/sdk/rest/index.html#/Get_Samples/02ss000000ms000000/
from demgen.
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 GetSamples
method is a good approach of course, then I will try to use ExportImage
for processing area tile. (I think we don't need samples or identify because we want to sample continuous area). And processing images in python is not a problem at all
from demgen.
Unfortunately, I can't give so many points' coordinates in one query. In this video you can see why.
https://streamable.com/ojw5q
38 points in one query – OK.
39 and more – HTTP 404.
But always something.
from demgen.
Maybe internal response limit? From documentation:
The number of sample locations in the response is based on the sampleDistance or sampleCount parameter and cannot exceed the limit of the image service (the default is 1000, which is an approximate limit).
But HTTP 404 is weird way how to indicate that limit is exceeded. I will try ExportImage
now and let you kow my results
from demgen.
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:
- generate array of points on which we want to know heights (in WGS84, because I know how to do in this coordinate system - approx.)
- Download image (min and max values from previous step, in WGS84 - SRS 4326) in Krovak projection (SRS 5514)
- Somehow address the image as 2D image array with S-JTSK coordinates. Shifting along axis X in WGS84 != shifting along X in S-JTSK. But maybe simple transformation from WGS84 will be enough to get index into the image. I'm too tired for this math now.
- Use sampled values as height values.
Resource:
Get image - input bounding box in WGS84, output image in S-JTSK
from demgen.
Great - I will try to do it my way and I will use your solution as reference.
from demgen.
Related Issues (10)
- multiprocessing.pool.MaybeEncodingError HOT 1
- a
- problem HOT 4
- Exception while running demGenerator_mod2.py in Python 3.8
- Add posibility to enter only center of map and size HOT 1
- Refactor: possibility to add other countries in the future
- Add posibility to batch processing whole folder (mod2)
- Do not use hardcoded workspace in generate scripts HOT 1
- Unable to collect elevation data from Czech Geoportal HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from demgen.