Giter Club home page Giter Club logo

Comments (8)

CrusheerPL avatar CrusheerPL commented on June 25, 2024 1

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.

LoogleCZ avatar LoogleCZ commented on June 25, 2024

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)

https://ags.cuzk.cz/arcgis2/rest/services/dmr5g/ImageServer/exportImage?bbox=-904703.61%2C-1227416.66%2C-431605.61%2C-935124.6599999999&bboxSR=&size=4096%2C4096&imageSR=&time=&format=jpgpng&pixelType=F32&noData=&noDataInterpretation=esriNoDataMatchAny&interpolation=+RSP_BilinearInterpolation&compression=&compressionQuality=&bandIds=&mosaicRule=&renderingRule=&f=html

from demgen.

CrusheerPL avatar CrusheerPL commented on June 25, 2024

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.

LoogleCZ avatar LoogleCZ commented on June 25, 2024

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.

CrusheerPL avatar CrusheerPL commented on June 25, 2024

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.

LoogleCZ avatar LoogleCZ commented on June 25, 2024

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.

LoogleCZ avatar LoogleCZ commented on June 25, 2024

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:

  1. generate array of points on which we want to know heights (in WGS84, because I know how to do in this coordinate system - approx.)
  2. Download image (min and max values from previous step, in WGS84 - SRS 4326) in Krovak projection (SRS 5514)
  3. 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.
  4. Use sampled values as height values.

Resource:

Get image - input bounding box in WGS84, output image in S-JTSK

from demgen.

LoogleCZ avatar LoogleCZ commented on June 25, 2024

Great - I will try to do it my way and I will use your solution as reference.

from demgen.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.